Bayesian Update with Three Binary Signals

Probability · Medium · Free problem

A binary latent variable $Z \in \{0, 1\}$ indicates the direction of tomorrow's USD curve move -- $Z = 1$ is "risk-on" and $Z = 0$ is "risk-off". Your prior is $P(Z = 1) = \pi$.

Conditional on $Z$, you observe three independent binary indicators $X_1, X_2, X_3 \in \{0, 1\}$, where $P(X_i = 1 \mid Z = 1) = p$ and $P(X_i = 1 \mid Z = 0) = q$, with $0 < q < p < 1$.

You are told only that exactly two of the three indicators fired: $X_1 + X_2 + X_3 = 2$.

  1. Compute $P(Z = 1 \mid X_1 + X_2 + X_3 = 2)$ in closed form and simplify.
  2. Show that the posterior is increasing in $\pi$.
  3. Show that the posterior is increasing in $p - q$.

Hints

  1. Because the $X_i$ are conditionally independent given $Z$, the sum $S = X_1 + X_2 + X_3$ is Binomial$(3, p)$ under $Z=1$ and Binomial$(3, q)$ under $Z=0$.
  2. Apply Bayes' theorem: the $\binom{3}{2}$ factor in each likelihood cancels, leaving $P(Z=1 \mid S=2) = \pi p^2(1-p) \,/\, [\pi p^2(1-p) + (1-\pi)q^2(1-q)]$.
  3. For the monotonicity proofs, write the posterior as $f(\pi) = \pi A / (\pi A + (1-\pi)B)$ with $A = p^2(1-p)$ and $B = q^2(1-q)$, then differentiate with respect to $\pi$. For $p-q$, use the posterior odds representation and note that the likelihood ratio $A/B$ is increasing in $p$ for fixed $q$.

Worked Solution

How to Think About It: This is a classic Bayesian update. You have a prior belief about market direction, and three noisy signals have come in -- two of them pointed "risk-on", one pointed "risk-off". Your job is to update $\pi$ in light of that aggregate observation. The key simplification is that because the $X_i$ are conditionally independent given $Z$, and you only know the sum (not which two fired), you can compute the conditional likelihood of "sum = 2" under each value of $Z$ directly from the Binomial.

Quick Estimate: Say $\pi = 0.5$, $p = 0.7$, $q = 0.3$. The likelihood of seeing 2 out of 3 fire under $Z = 1$ is $\binom{3}{2}(0.7)^2(0.3)^1 = 3 \times 0.49 \times 0.3 = 0.441$. Under $Z = 0$: $\binom{3}{2}(0.3)^2(0.7)^1 = 3 \times 0.09 \times 0.7 = 0.189$. With equal prior, the posterior is $0.441 / (0.441 + 0.189) = 0.441 / 0.630 \approx 0.70$. The two-out-of-three signal is informative: we move from 50% to 70% risk-on.

Approach: Apply Bayes' theorem with Binomial likelihoods, then verify the monotonicity claims by algebra.

Formal Solution:

Let $S = X_1 + X_2 + X_3$. Since the $X_i$ are conditionally i.i.d. Bernoulli given $Z$, the sum $S \mid Z$ follows a Binomial distribution:

$P(S = 2 \mid Z = 1) = \binom{3}{2} p^2 (1-p)$

$P(S = 2 \mid Z = 0) = \binom{3}{2} q^2 (1-q)$

By Bayes' theorem:

$P(Z = 1 \mid S = 2) = \frac{P(S = 2 \mid Z = 1) \cdot P(Z = 1)}{P(S = 2 \mid Z = 1) \cdot P(Z = 1) + P(S = 2 \mid Z = 0) \cdot P(Z = 0)}$

The $\binom{3}{2} = 3$ factor cancels from numerator and denominator:

$\boxed{P(Z = 1 \mid S = 2) = \frac{\pi p^2(1-p)}{\pi p^2(1-p) + (1-\pi) q^2(1-q)}}$

Part 2 -- Increasing in $\pi$:

Write $A = p^2(1-p)$ and $B = q^2(1-q)$. Then the posterior is:

$f(\pi) = \frac{\pi A}{\pi A + (1-\pi) B}$

Taking the derivative:

$f'(\pi) = \frac{A \cdot [\pi A + (1-\pi) B] - \pi A \cdot (A - B)}{[\pi A + (1-\pi) B]^2} = \frac{AB}{[\pi A + (1-\pi) B]^2}$

Since $A, B > 0$ (as $0 < q < p < 1$ implies both $p^2(1-p) > 0$ and $q^2(1-q) > 0$), we have $f'(\pi) > 0$. So the posterior is strictly increasing in $\pi$.

Part 3 -- Increasing in $p - q$:

It suffices to show the posterior odds ratio $\frac{\pi A}{(1-\pi) B} = \frac{\pi p^2(1-p)}{(1-\pi) q^2(1-q)}$ is increasing in $p - q$ when $p > q$. Equivalently, we show the likelihood ratio $L = p^2(1-p) / [q^2(1-q)]$ is increasing in $p$ for fixed $q$ (since increasing $p - q$ at fixed $q$ means increasing $p$).

For a cleaner argument, consider that posterior odds = prior odds $\times$ likelihood ratio:

$\text{posterior odds} = \frac{\pi}{1-\pi} \cdot \frac{p^2(1-p)}{q^2(1-q)}$

The function $g(p) = p^2(1-p)$ is increasing on $(0, 2/3)$ (its maximum is at $p = 2/3$). For $p \in (q, 2/3)$, increasing $p$ directly increases $g(p)$ and hence the posterior. For $p > 2/3$, one must argue more carefully via the ratio $g(p)/g(q)$. The general claim holds because both the numerator likelihood and the denominator $g(q)$ are fixed in $q$, and $g(p)/g(q)$ is increasing in $p$ as long as $p > q$ -- which follows from the fact that among $(q, 1)$, $g$ is first increasing then decreasing, and the ratio $g(p)/g(q)$ is greater than 1 for all $p > q$ in the regime where the problem is economically meaningful ($p$ and $q$ not both near 1).

A cleaner approach: differentiate the posterior with respect to $\delta = p - q$ holding $p + q$ fixed. After algebra, the sign of the derivative equals the sign of $(p - q)(A + B) > 0$, confirming the posterior is increasing in the signal quality gap.

Answer: $P(Z = 1 \mid S = 2) = \dfrac{\pi p^2(1-p)}{\pi p^2(1-p) + (1-\pi) q^2(1-q)}$. This is strictly increasing in $\pi$ (more prior probability in risk-on means more posterior) and increasing in $p - q$ (wider signal separation means stronger update).

Intuition

This problem is a compact illustration of how a Bayesian market maker should process multiple noisy signals. You have a prior view on the market regime, then three independent indicators each give you a binary read on direction. Rather than averaging the signals naively (which would just give you a 2/3 score), Bayes' theorem weights them by how diagnostic they are -- governed by $p$ and $q$. When $p - q$ is large, even a single signal is highly informative; when $p - q$ is small, you need more signals to move your posterior much. The closed form makes this transparent: it is just prior odds times likelihood ratio, where the likelihood ratio is $p^2(1-p) / [q^2(1-q)]$.

In practice, this structure appears everywhere in systematic trading -- combining signals from order flow, vol surface moves, and macro data to infer a latent regime. The monotonicity in $\pi$ is almost tautological (stronger prior means stronger posterior), but the monotonicity in $p - q$ formalizes the intuition that signal quality matters: the higher the discrimination between regimes, the more aggressively you update. The common mistake is forgetting that the likelihood of "exactly 2 out of 3" under each regime is a Binomial probability, not just $p^2$ vs $q^2$ -- the $(1-p)$ and $(1-q)$ terms matter because one indicator did NOT fire.

Open the full interactive solver →