One difference of squares from two. Posteriors with Gaussians.
\( (a-x)^2 + (x-b)^2 \)
This expression appears when dealing with posterior probabilities for the
mean parameter of a Gaussian distribution. Can you remember how?
Minimum at \( x = \frac{a + b}{2} \)
Let \( a < b \) and define \( d=b - a \). If \( x \) is constrained to be between \( a \) and \( b \), then the
expression is maximized when \( x=a \) or lx=b \). The maximum value is \( d^2 \). If \( x \) is not constrained to
\( [a, b] \), then the value of the expression can grow unbounded. The expression is minimized when \( x=\frac{d}{2}
\). Let \( h=\frac{d}{2} \) be the half-width of the interval. When \( x \) is at the midpoint, \( x=a + h \), then
the expression becomes:
\[
h^2 + h^2 = 2h^2 = \frac{d^2}{2}
\]
If you increase \( x \) slightly, \( x \to x + \varepsilon \), then the expression would become:
Here again we see that the expression is minimized when \( x = \frac{a +
b}{2} \), and the minimum value is \( \frac{(a - b)^2}{2} \).
Posterior probability with Gaussian prior and likelihood
Assume that a random variable \( Y \) is distributed according to a Gaussian
distribution with unknown mean \( X \) and known (fixed) variance
\( \sigma^2 \), \( Y \sim \mathcal{N}(X, \sigma^2) \).
Furthermore, assume that the prior distribution of \( X \) is Gaussian, \(
X \sim \mathcal{N}(\mu_{x}, \sigma_{x}^2) \). In the most simple case, imagine
we are given a single observation \( y_0 \) of \( Y \). The probability of this
observation paired with a value of \( X \) is:
So we see that the posterior probability of \( X \) given the observation
\( y_0 \) is Gaussian with mean \( \frac{y_0 + \mu_{x}}{2} \) and variance
\( \frac{1}{2} \).
Precisions add
Calling 1/variance the precision, we see that the precision of the posterior
distribution is the sum of the precisions of the prior and the likelihood: