# Find posterior distribution given beta prior

The output of a certain integrated-circuit production line is checked daily by inspecting a sample of $$100$$ units. Over a long period of time, the process has maintained a yield of $$80$$ percent, that is, a proportion defective of $$20$$ percent, and the variation of the proportion defective from day to day is measured by a standard deviation of $$0.04$$.
If on a certain day the sample contains $$38$$ defectives, find the mean of the posterior distribution of $$\theta$$ as an estimate of that day’s proportion defective. Assume that the prior distribution of $$\theta$$ is a Beta distribution.

I know $$\textbf{posterior} \propto \textbf{likelihood} \times \textbf{prior}$$, and it seems like the likelihood function is binomial so $$f(x|\theta)\propto \theta ^x(1-\theta)^{n-x}$$ and the prior is $$h(\theta )\propto \theta^{\alpha - 1} (1- \theta)^{\beta - 1}~,$$ right? It seems like the posterior is supposed to look like a beta distribution, but where do the values $$0.04$$ and $$38$$ come into play here?

## 1 Answer

On this certain day the Binomial as you stated has $$n = 100$$ and $$x = 38$$.

The Beta prior as you stated $$h(\theta )\propto \theta^{\alpha - 1} (1- \theta)^{\beta - 1}$$ has parameters such that

• the mean is $$\dfrac{ \alpha }{ \alpha + \beta } = 0.2$$

• the variance is $$\dfrac{ \alpha \beta }{ (\alpha + \beta)^2 (\alpha + \beta + 1) } = 0.04$$

which determines uniquely the values to be $$~\alpha = \frac35$$ and $$\beta = \frac{12}5$$.