# Bayesian: learning about a normal mean and variance

OK, question edited in response to comment from @user158565 for those not in possession of the Jackman book. I tried to abstract the relevant information below.

I'm struggling with Simon Jackman's example 2.12 on p82 of his 2009 book Bayesian Analysis for the Social Sciences, specifically what happens with the value of $$n$$ (from proposition 2.4 on p81) in the calculation $$\theta^*$$ and $$\sigma^{2*}$$.

For example in the calculation of $$\theta^*$$ below there are two terms in the left parentheses $$\frac{.491}{.000484}$$ and $$\frac{.548}{.000486}$$ the second of which corresponds to $$\bar{y}\frac{n}{\sigma^2}$$ in Proposition 2.4 on p81. Since $$\bar{y}=.548$$ and $$\sigma^2=.000486$$ then $$n=1$$. However, Jackman gives $$n=\alpha+\beta$$ where $$\alpha=279$$ and $$\beta=230$$. If anyone could help me understand what's going on here I'd appreciate. Some more details:

The example is about voting intentions for one of two candidates with $$\theta$$, the probability of voting for one, given by $$\theta \sim Beta(\alpha,\beta)$$. The exercise is to approximate this Beta distribution with a Normal distribution $$\theta \sim N(\tilde{\theta},\sigma^2)$$ with

$$\sigma^2=V(\theta; \alpha, \beta)=\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}$$

known and

$$\tilde{\theta}=E(\theta; \alpha,\beta)=\frac{\alpha}{\alpha+\beta}$$

to be estimated given a prior $$\theta\sim N(.491,.000484)$$ and data $$\alpha=279$$ and $$\beta=230$$ giving $$\tilde{\theta}=.548$$ and $$\sigma^2=.000486$$

The text now reads "the poll result $$\tilde{\theta}$$ is observed data, generated by a sampling process governed by $$\theta$$ and the poll's sample size (n.b. $$n=\alpha+\beta$$). Specifically, using the normal approximation, $$\tilde{\theta} \sim N(\theta,\sigma^2)$$ or $$.548 \sim N(\theta, .000486)$$. We are now in a position to use the result in Proposition 2.4".

Proposition 2.4 gives:

$$\mu \vert\mathbf{y} \sim N \left(\frac{\mu_0\sigma_0^{-2}+\bar{y}\frac{n}{\sigma^2}}{\sigma_0^{-2}+\frac{n}{\sigma^2}},\left(\sigma_0^{-2}+\frac{n}{\sigma^2}\right)^{-1}\right)$$

where the subscript 0 indicates prior information. The example continues giving the posterior estimate for $$\theta$$:

$$\theta^*=\left(\frac{.491}{.000484}+\frac{.548}{.000486}\right)\left(\frac{1}{.000484}+\frac{1}{.000486}\right)^{-1}=.519$$

• The condition to understand your question is to have that book. Could you describe your question based on your understanding without refer to that book? Commented Jul 5, 2019 at 2:57

You are right that $$n=1$$, i.e., you have only one observation.

The thought process goes like this.

You are trying to infer $$\theta$$ from your data, where $$\theta$$ is the proportion of people likely to vote for a particular candidate.

Prior: You think that $$\theta$$ is normally distributed.

Observation: You collect data, which consists of only 1 observation, because your data is a single poll which tells you that 54.8% of respondents will vote for this candidate. The likelihood that you observe 54.8% is beta distributed, but because $$\alpha$$, $$\beta$$ are large, you can approximate this with the normal distribution, with variance 0.000486.

An important thing to note here is that we have assumed the variance of the data generating process to be known (0.000486), and we are only trying to infer the mean of the data generating process.

Posterior: The posterior mean is then a combination of the prior and observation weighted by their precisions or inverse variances. If you have multiple polls, you will compute $$\bar{y}$$ as the mean of the proportions that you get in each poll, and change $$n$$ accordingly.

I don't think the author claims that $$n=\alpha +\beta$$ here, he merely used it to allude to the beta distribution. If you had used the beta distribution as the data generating process, you can think of $$n$$ as the size of the poll, because each respondent is an observation (we observe either 0 or 1, for or against). If we are using the normal distribution, then we no longer have $$n$$ as the size of the poll, because our observation is now the proportion of people voting for a particular candidate.