/2$. After seeing a success, we should shift our belief upward. Higher values of $\theta$ are more likely to have produced $X = 1$, so the posterior should put more weight on large $\theta$. The posterior mean should be above
/2$ -- intuitively around
/3$ (one success out of one trial, plus the "pseudo-count" from the uniform prior).
Approach: Apply Bayes' theorem with a continuous prior.
Formal Solution:
Part 1: Posterior derivation.
Prior: $f(\theta) = 1$ for $\theta \in [0, 1]$ (uniform = $\text{Beta}(1,1)$).
Likelihood: $P(X = 1 \mid \theta) = \theta$.
By Bayes' theorem:
$f(\theta \mid X = 1) = \frac{P(X=1 \mid \theta) \cdot f(\theta)}{P(X=1)}$
The normalizing constant:
$P(X = 1) = \int_0^1 \theta \cdot 1 \, d\theta = \frac{1}{2}$
So:
$f(\theta \mid X = 1) = \frac{\theta}{1/2} = 2\theta, \quad \theta \in [0, 1]$
This is a $\text{Beta}(2, 1)$ distribution. We can verify: the $\text{Beta}(a, b)$ density is $\frac{\theta^{a-1}(1-\theta)^{b-1}}{B(a,b)}$. For $a = 2, b = 1$: $\frac{\theta^1 \cdot 1}{B(2,1)} = \frac{\theta}{1/2} = 2\theta$. Checks out.
Part 2: Posterior mean.
$E[\theta \mid X = 1] = \frac{\alpha'}{\alpha' + \beta'} = \frac{2}{2 + 1} = \frac{2}{3}$
This confirms our quick estimate. The posterior mean
/3$ is above the prior mean /2$, pulled upward by the observed success.
Part 3: General formula.
With a $\text{Beta}(\alpha, \beta)$ prior and $k$ successes in $n$ trials:
$\theta \mid \text{data} \sim \text{Beta}(\alpha + k, \, \beta + n - k)$
The posterior mean is:
$E[\theta \mid \text{data}] = \frac{\alpha + k}{\alpha + \beta + n}$
This can be rewritten as a weighted average of the prior mean and the MLE:
$E[\theta \mid \text{data}] = \frac{\alpha + \beta}{\alpha + \beta + n} \cdot \underbrace{\frac{\alpha}{\alpha + \beta}}_{\text{prior mean}} + \frac{n}{\alpha + \beta + n} \cdot \underbrace{\frac{k}{n}}_{\text{MLE}}$
As $n \to \infty$, the weight on the prior goes to zero and the posterior concentrates around the MLE. The prior parameters $\alpha$ and $\beta$ act as "pseudo-observations" -- $\alpha$ prior successes and $\beta$ prior failures.
For our specific problem: $\alpha = 1, \beta = 1, k = 1, n = 1$, giving $\text{Beta}(2, 1)$ with mean
/3$.