Bayesian Pricing of a Threshold Digital
A coin has an unknown bias $p$ drawn from a $\text{Beta}(a, b)$ prior. You flip it $n$ times and observe $H$ heads.
A derivative contract pays $\
- What is the fair price of this contract?
- Simplify for the special case $t = k$ (all $k$ flips must be heads).
- Simplify for $t = \lceil k/2 \rceil$ (strict majority of the next $k$ flips are heads), and comment on what happens when the posterior is symmetric.
Hints
- The fair price is the posterior predictive probability of the payoff event. Start by updating the Beta prior with the observed data -- what is the posterior distribution on $p$?
- For a quick estimate, plug in the posterior mean $\hat{p} = (a+H)/(a+b+n)$ and compute the Binomial tail probability. Then think about how parameter uncertainty (over-dispersion) shifts that estimate for extreme versus moderate thresholds.
- The posterior predictive for future heads is Beta-Binomial. For $t = k$, only one term in the sum survives; use $\Gamma(z+m)/\Gamma(z) = z(z+1)\cdots(z+m-1)$ to collapse the Beta ratio into a product -- this is the Polya urn formula.
Worked Solution
How to Think About It: You are making a market on a digital option whose payoff depends on future coin flips, but you do not know the coin's true bias. Your first move as a trader: get a point estimate for $p$ and price off that. The posterior mean is $\hat{p} = (a + H)/(a + b + n)$, which is just the Bayesian-smoothed fraction of heads. If you plug that in and treat $p$ as known, you get a vanilla Binomial tail probability -- that is your quick-and-dirty quote. But here is the catch: you are uncertain about $p$, and that uncertainty fattens the tails of the predictive distribution relative to a plain Binomial. So the true Bayesian price is higher than the plug-in for extreme thresholds (like $t = k$) and can be lower for moderate ones. In an interview, say this in the first 30 seconds -- it shows you understand the economics before you touch the math.
Quick Estimate: Take a concrete example: $a = b = 1$ (uniform prior), $n = 20$, $H = 14$, $k = 10$, $t = 7$. The posterior is $\text{Beta}(15, 7)$, so $\hat{p} = 15/22 \approx 0.682$.
*Plug-in Binomial approach:* Pretend $p = 0.682$ is known. The number of heads $X$ in 10 flips has mean $\mu = 10 \times 0.682 = 6.82$ and standard deviation $\sigma = \sqrt{10 \times 0.682 \times 0.318} \approx 1.473$. By the CLT with continuity correction:
$P(X \geq 7) \approx P(X \geq 6.5) = \Phi\!\left(\frac{6.82 - 6.5}{1.473}\right) = \Phi(0.217) \approx 0.586$
So the plug-in price is about $0.59$.
*Bayesian correction:* The Beta-Binomial has variance $k\hat{p}(1 - \hat{p}) \cdot (\alpha + \beta + k)/(\alpha + \beta + 1) = 10 \times 0.682 \times 0.318 \times 32/23 \approx 3.017$, giving $\sigma_{\text{BB}} \approx 1.737$ versus the Binomial $\sigma \approx 1.473$. The fatter tails push the upper tail probability slightly higher. Using the normal approximation with the Beta-Binomial variance:
$P(X \geq 6.5) \approx \Phi\!\left(\frac{6.82 - 6.5}{1.737}\right) = \Phi(0.184) \approx 0.573$
Interestingly, the over-dispersion actually lowers the price slightly for this moderate threshold ($t = 7$ out of $k = 10$, which is close to the mean). For extreme thresholds the effect reverses -- for instance, the $t = k = 10$ (all heads) case: the plug-in gives $0.682^{10} \approx 0.0215$, but the Bayesian Polya urn price (computed below) gives $\prod_{i=0}^{9} (15 + i)/(22 + i) = 15 \cdot 16 \cdots 24 \;/\; 22 \cdot 23 \cdots 31 \approx 0.0442$, which is more than double. That is parameter uncertainty fattening the tails.
Bottom line: for a quick quote, use $\hat{p}$ and the Binomial, then adjust up for extreme thresholds and down for moderate ones.
Approach: For the exact answer, use conjugate Bayesian updating (Beta-Binomial posterior predictive) and sum the tail probability. The key integral is a Beta function ratio, and the $t = k$ special case collapses to a Polya urn product.
Formal Solution
Step 1 -- Posterior on $p$.
The prior is $p \sim \text{Beta}(a, b)$. After observing $H$ heads in $n$ tosses, conjugacy gives:
$p \mid \text{data} \sim \text{Beta}(\alpha, \beta), \quad \alpha = a + H, \quad \beta = b + n - H.$
Step 2 -- Posterior predictive distribution.
Conditional on $p$, the number of heads $X$ in the next $k$ flips is $\text{Binomial}(k, p)$. Integrating out $p$:
$P(X = j) = \binom{k}{j} \int_0^1 p^{j}(1-p)^{k-j} \cdot \frac{p^{\alpha - 1}(1-p)^{\beta - 1}}{B(\alpha, \beta)} \, dp = \binom{k}{j} \frac{B(\alpha + j, \; \beta + k - j)}{B(\alpha, \beta)}$
This is the $\text{BetaBin}(k, \alpha, \beta)$ distribution.
Step 3 -- Fair price (general case).
The contract pays $\
$V = \sum_{j=t}^{k} \binom{k}{j} \frac{B(\alpha + j, \; \beta + k - j)}{B(\alpha, \beta)}$
Using the rising factorial identity $B(\alpha + j, \beta + k - j)/B(\alpha, \beta) = \prod_{i=0}^{j-1}(\alpha + i) \cdot \prod_{i=0}^{k-j-1}(\beta + i) \;/\; \prod_{i=0}^{k-1}(\alpha + \beta + i)$, this is a finite closed-form sum.
Step 4 -- Special case $t = k$ (all heads).
Only the $j = k$ term survives, and there is a clean simplification:
$V_{t=k} = \frac{B(\alpha + k, \; \beta)}{B(\alpha, \beta)} = \prod_{i=0}^{k-1} \frac{\alpha + i}{\alpha + \beta + i}$
This is the Polya urn formula: imagine an urn with $\alpha$ red and $\beta$ blue balls. Draw $k$ balls one at a time, replacing each drawn ball plus one extra of the same color. The probability all $k$ draws are red is exactly this product. The first factor is $\alpha/(\alpha + \beta) = \hat{p}$, the posterior mean. Each subsequent factor is slightly higher (if $\alpha > \beta$), reflecting positive correlation between draws -- seeing heads makes the next head more likely. This is why $V_{t=k} > \hat{p}^{k}$: the product of correlated draws exceeds the product of their marginal probabilities.
Step 5 -- Special case $t = \lceil k/2 \rceil$ (strict majority).
The price is:
$V_{\text{maj}} = \sum_{j=\lceil k/2 \rceil}^{k} \binom{k}{j} \frac{B(\alpha + j, \; \beta + k - j)}{B(\alpha, \beta)}$
No single-product simplification exists in general, but there is a useful symmetry. Swapping $\alpha \leftrightarrow \beta$ maps $P(X = j)$ to $P(X = k - j)$. So when $\alpha = \beta$ (symmetric posterior, i.e., $a + H = b + n - H$):
- If $k$ is odd, the distribution of $X$ is symmetric about $k/2$, so $P(X \geq \lceil k/2 \rceil) = 1/2$ and $V = 1/2$.
- If $k$ is even, $\lceil k/2 \rceil = k/2$ when $k$ is even, so the "majority" threshold includes the exact tie $j = k/2$. By symmetry, $V = (1 + P(X = k/2))/2 > 1/2$.
In both cases the price is near
Answer:
$V = \sum_{j=t}^{k} \binom{k}{j} \frac{B(a + H + j, \; b + n - H + k - j)}{B(a + H, \; b + n - H)}$
For $t = k$: $\;V = \displaystyle\prod_{i=0}^{k-1} \frac{a + H + i}{a + b + n + i}$.
For $t = \lceil k/2 \rceil$ with symmetric posterior ($a + H = b + n - H$): $V = 1/2$ when $k$ is odd.
Intuition
This problem illustrates the core Bayesian pricing paradigm: when a model parameter is uncertain, you do not plug in a point estimate -- you integrate over the full posterior. The resulting Beta-Binomial distribution is over-dispersed relative to a plain Binomial with fixed $p$, meaning the tails are fatter. In practice, extreme-threshold contracts are worth more than a naive plug-in suggests (the Polya urn product exceeds the plug-in power $\hat{p}^{k}$), while moderate-threshold contracts can be worth slightly less. This is the same principle behind why options tend to be priced with fatter tails than a simple model implies -- parameter uncertainty inflates tail risk.
The Polya urn interpretation for the $t = k$ case is worth remembering beyond this problem. Each successive flip is positively correlated with the previous ones because they share the latent bias $p$. This positive exchangeable correlation shows up constantly in Bayesian models -- correlated defaults in credit risk, contagion effects in market microstructure, and streaky performance in sports analytics. Whenever you see exchangeable but not independent trials, think Beta-Binomial. And in an interview, always lead with the plug-in estimate before diving into the exact Bayesian machinery -- it shows you can think on your feet and calibrate your intuition before grinding through math.