# AP Statistics Curriculum 2007 Bayesian Normal

### From Socr

Line 51: | Line 51: | ||

'''Prior Distribution Likelihood from Data Posterior Distribution''' | '''Prior Distribution Likelihood from Data Posterior Distribution''' | ||

- | '''S N(185 , | + | '''S N<math>(185 , 10^2)</math> N<math>(218 , 4^2)</math>''' |

- | '''N(220 , | + | '''N<math>(220 , 4^2)</math>''' |

- | ''' S’ N(200 , | + | ''' S’ N<math>(200 , 30^2)</math> N<math>(224 , 4^2)</math>''' |

## Revision as of 02:18, 26 May 2009

*Normal Example:*

It is known that the speedometer that comes with a certain new sports car is not very accurate, which results in an estimate of the top speed of the car of 185 mph, with a standard deviation of 10 mph. Knowing that his car is capable of much higher speeds, the owner took the car to the shop. After a checkup, the speedometer was replaced with a new one, which gave a new estimate of 220 mph with a standard deviation of 4 mph. The errors are assumed to be normally distributed. We can say that the owner S’s prior beliefs about the top speed of his car were represented by:

**µ ~ N(μ**

_{0}, φ_{0}) = µ ~ N(185,10^{2})We could then say that the measurements using the new speedometer result in a measurement of:

**x ~ N(μ, φ) = x ~ N(µ,4**

^{2})We note that the observation **x** turned out to be 210, and we see that S’s posterior beliefs about **µ** should be represented by:

**µ | x ~ N(μ**

_{1}, φ_{1})where (rounded)

**φ**

_{1}= (10^{ − 2}+ 4^{ − 2})^{ − 1}= 14 = 4^{2}**μ**

_{1}= 14(185 / 10^{2}+ 220 / 4^{2}) = 218Therefore, the posterior for the top speed is:

**μ | x ~ N(218,4**

^{2})Meaning 218 +/- 4 mph.

If the new speedometer measurements were considered by another person S’ who had no knowledge of the readings from the first speedometer, but still had a vague idea (from knowledge of the stock speedometer) that the top speed was about 200 +/- 30 mph, Then:

**μ ~ N(200,30**

^{2})Then **S’** would have a posterior variance:

**φ**

_{1}= (30^{ − 2}+ 4^{ − 2})^{ − 1}= 16 = 4^{2}**S’** would have a posterior mean of:

**μ**

_{1}= 16(200 / 30^{2}+ 220 / 4^{2}) = 224Therefore, the distribution of **S’** would be:

**μ | x ~ N(224,4**

^{2})Meaning 224 +/- 4 mph. This calculation has been carried out assuming that the prior information we have is rather vague, and therefore the posterior is almost entirely determined by the data.

The situation is summarized as follows:

Prior Distribution Likelihood from Data Posterior Distribution

S N(185,10^{2}) N(218,4^{2})

N(220,4^{2})

S’ N(200,30^{2}) N(224,4^{2})