Implementation Example

The cases in which a convenient conjugate prior is available are few, and ideally the choice of model and prior should not be limited to those that allow an analytical solution. Perhaps the best way to allow the reader to appreciate the range of alternative approaches, and the difficulties that arise, is to examine a simple example. A small deviation from that example (replacing the Normal prior with a Teachers prior with $\nu=4$) makes it impossible to treat the example analytically but makes little difference to numerical methods.

Consider the manufacture of some component in which a particular measurement, $x$, is of interest. This may be modeled as being a value of a random variable $X$ having a Normal distribution with mean $\mu $ and variance $\sigma^2$ $N(\mu, \sigma^2)$. In this context the mean $\mu $ represents the `setting' of the manufacturing process, while the variance $\sigma^2$ represents the `process variability'.

The parameter $\mu $ is unknown, but prior knowledge about it may be represented by a $N(\mu_0, \sigma_0^2)$ density, and for this example values of $\mu_0 =
3.5, \sigma_0^2 = 1$ are suitable. The choice of $\sigma_0^2$ is in fact largely uninformative as a wide range ( $0.5 \mbox{ to } 6.5$ say) of values of $\mu $ are all quite likely.

Assume the parameter $\sigma$ is known: $\sigma = 0.01$.

The sample data to hand



3.51 3.50 3.52 3.50 3.51 3.50 3.52 3.50 3.51 3.51



can be summarised as $n=10, \mbox{ and } \sum x_i = 35.08$.

For this example both analytic and numerical solutions are readily available.



Subsections
danny 2009-07-23