]> No Title

Question (lecture 17).

In January 2011 Durham police were reported as disappointed by the increase in the num‐ ber of people arrested for drinking and driving. Between December 1st 2010 and December 31st 2010 they had 52 positive breath tests out of 1799 breath tests administered, while for the same period in 2009 they had 41 positive tests out of 1433 administered. Construct a 95% confidence interval for the difference in proportion of drivers who tested positive. Source: http://www.bbc. co.uk/news/uk‐england‐12261462

36

Question (lecture 17).

I observe two dice. For one die I notice that it gives a six 20 times out of 100 and for the second die I notice that it gives a six 22 times out of 80. Test at the 5% level whether the two dice give the $\mathrm{s}\mathrm{a}\mathrm{m}{\mathrm{e}}_{\mathrm{3}\mathrm{7}}\mathrm{p}$ robability of showing a six.

Question (lecture 18).

If $\mathit{X}\mathrm{\sim }{\mathit{\chi }}_{\mathrm{4}\mathrm{,}\mathrm{3}\mathrm{8}}^{\mathrm{2}}$ for what value of $\mathit{x}$ is $\mathrm{p}\mathrm{r}\mathrm{\left\{}\mathit{X}\mathrm{>}\mathit{x}\mathrm{\right\}}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{0}\mathrm{5}$? Answer:

Question (lecture 19).

I roll a die 100 times and observe the following results.

Outcome $\mathit{i}$ 1 2 3 4 5 6 Observed frequency 16 15 16 15 15 23

Test at the 5% level whether the die is fair. Answer:

39

ions $\mathrm{-}\mathrm{t}$ ips‐2011.html

Two binomial proportions here. ${\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{1}}\mathrm{=}\mathrm{4}\mathrm{/}\mathrm{7}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{5}\mathrm{7}\mathrm{1}\mathrm{,}$ ${\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{2}}\mathrm{=}\mathrm{3}\mathrm{/}\mathrm{1}\mathrm{0}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{3}\mathrm{0}\mathrm{0}\mathrm{,}$ ${\mathit{n}}_{\mathrm{1}}\mathrm{=}\mathrm{7}\mathrm{,}$ ${\mathit{n}}_{\mathrm{2}}\mathrm{=}\mathrm{1}\mathrm{0}$. Common estimated proportion is $\mathit{\theta }\mathrm{=}\frac{\mathrm{7}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{1}}\mathrm{+}\mathrm{1}\mathrm{0}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{2}}}{\mathrm{1}\mathrm{7}}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{4}\mathrm{1}\mathrm{2}$. Approximate test statistic is $\mathit{z}\mathrm{=}\frac{\mathrm{|}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{1}}\mathrm{-}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{2}}\mathrm{|}}{\sqrt{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}\mathrm{\left(}\mathrm{1}\mathrm{-}\stackrel{\mathrm{ˆ}}{\mathit{\theta }}\mathrm{\right)}\mathrm{\left(}\frac{\mathrm{1}}{{\mathit{n}}_{\mathrm{1}}}\mathrm{+}\frac{\mathrm{1}}{{\mathit{n}}_{\mathrm{2}}}\mathrm{\right)}}}\mathrm{=}\mathrm{1}\mathrm{.}\mathrm{1}\mathrm{1}\mathrm{9}$. reject Ho at 5% level if $\mathrm{|}\mathit{z}\mathrm{|}\mathrm{>}\mathrm{1}\mathrm{.}\mathrm{9}\mathrm{6}$, so here accept the hypothesis that the two proportions are equal.

36 Two binomial proportions again. ${\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{1}}\mathrm{=}\mathrm{5}\mathrm{2}\mathrm{/}\mathrm{1}\mathrm{7}\mathrm{9}\mathrm{9}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{0}\mathrm{2}\mathrm{8}\mathrm{9}\mathrm{0}\mathrm{5}\mathrm{,}$ ${\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{2}}\mathrm{=}\mathrm{4}\mathrm{1}\mathrm{/}\mathrm{1}\mathrm{4}\mathrm{3}\mathrm{3}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{0}\mathrm{2}\mathrm{8}\mathrm{6}\mathrm{1}\mathrm{1}\mathrm{,}$ ${\mathit{n}}_{\mathrm{1}}\mathrm{=}\mathrm{1}\mathrm{7}\mathrm{9}\mathrm{9}\mathrm{,}$ ${\mathit{n}}_{\mathrm{2}}\mathrm{=}\mathrm{1}\mathrm{4}\mathrm{3}\mathrm{3}\mathrm{.}$ Common estimated proportion is $\mathit{\theta }\mathrm{=}\frac{\mathrm{1}\mathrm{7}\mathrm{9}\mathrm{9}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{1}}\mathrm{+}\mathrm{1}\mathrm{4}\mathrm{3}\mathrm{3}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{2}}}{\mathrm{3}\mathrm{2}\mathrm{3}\mathrm{2}}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{0}\mathrm{2}\mathrm{8}\mathrm{8}$. (This is very small so the normal approxima‐ tion is doubtful. In practice we would transform to give approximate normality.) Approximate test statistic is $\mathit{z}\mathrm{=}\frac{\mathrm{|}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{1}}\mathrm{-}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{2}}\mathrm{|}}{\sqrt{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}\mathrm{\left(}\mathrm{1}\mathrm{-}\stackrel{\mathrm{ˆ}}{\mathit{\theta }}\mathrm{\right)}\mathrm{\left(}\frac{\mathrm{1}}{{\mathit{n}}_{\mathrm{1}}}\mathrm{+}\frac{\mathrm{1}}{{\mathit{n}}_{\mathrm{2}}}\mathrm{\right)}}}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{0}\mathrm{4}\mathrm{9}\mathrm{6}$. Reject Ho at 5% level if $\mathrm{|}\mathit{z}\mathrm{|}\mathrm{>}\mathrm{1}\mathrm{.}\mathrm{9}\mathrm{6}$, so here accept the hypothesis that the two proportions are equal.

37

${\mathit{n}}_{\mathrm{1}}\mathrm{=}\mathrm{1}\mathrm{0}\mathrm{0}$, x1 $\mathrm{=}\mathrm{2}\mathrm{0}\mathrm{,}$ ${\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{1}}\mathrm{=}\mathrm{2}\mathrm{0}\mathrm{/}\mathrm{1}\mathrm{0}\mathrm{0}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{2}\mathrm{0}\mathrm{0}$, n2 $\mathrm{=}\mathrm{8}\mathrm{0}$, x2 $\mathrm{=}\mathrm{2}\mathrm{2}\mathrm{,}$ ${\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{2}}\mathrm{=}\mathrm{2}\mathrm{2}\mathrm{/}\mathrm{8}\mathrm{0}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{2}\mathrm{7}\mathrm{5}$. We test Ho: ${\mathit{\theta }}_{\mathrm{1}}\mathrm{=}$ ${\mathit{\theta }}_{\mathrm{2}}\mathrm{\left(}\mathrm{=}\mathit{\theta }\mathrm{\right)}\mathit{v}\mathit{s}\mathrm{.}$ ${\mathrm{H}}_{\mathrm{1}}\mathrm{:}{\mathit{\theta }}_{\mathrm{1}}\mathrm{\ne }{\mathit{\theta }}_{\mathrm{2}}$. This is equivalent to testing Ho: ${\mathit{\theta }}_{\mathrm{1}}\mathrm{-}{\mathit{\theta }}_{\mathrm{2}}\mathrm{=}\mathrm{0}\mathit{v}\mathit{s}\mathrm{.}$ ${\mathrm{H}}_{\mathrm{1}}\mathrm{:}{\mathit{\theta }}_{\mathrm{1}}\mathrm{-}{\mathit{\theta }}_{\mathrm{2}}\mathrm{\ne }\mathrm{0}$. Assuming Ho is true, the estimated common proportion $\mathit{\theta }$ is estimated by $\stackrel{\mathrm{ˆ}}{\mathit{\theta }}\mathrm{=}\frac{{\mathit{n}}_{\mathrm{1}}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{1}}\mathrm{+}{\mathit{n}}_{\mathrm{2}}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{2}}}{{\mathit{n}}_{\mathrm{1}}\mathrm{+}{\mathit{n}}_{\mathrm{2}}}\mathrm{=}\frac{\mathrm{2}\mathrm{0}\mathrm{+}\mathrm{2}\mathrm{2}}{\mathrm{1}\mathrm{8}\mathrm{0}}\mathrm{=}\mathrm{0}\mathrm{.}\mathrm{2}\mathrm{3}\mathrm{3}\mathrm{3}$. Test statistic is $\mathit{z}\mathrm{=}\frac{{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{1}}\mathrm{-}{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}}_{\mathrm{2}}}{\sqrt{\frac{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}\mathrm{\left(}\mathrm{1}\mathrm{-}\stackrel{\mathrm{ˆ}}{\mathit{\theta }}\mathrm{\right)}}{{\mathit{n}}_{\mathrm{1}}}\mathrm{+}\frac{\stackrel{\mathrm{ˆ}}{\mathit{\theta }}\mathrm{\left(}\mathrm{1}\mathrm{-}\stackrel{\mathrm{ˆ}}{\mathit{\theta }}\mathrm{\right)}}{{\mathit{n}}_{\mathrm{2}}}}}\mathrm{=}\frac{\mathrm{0}\mathrm{.}\mathrm{2}\mathrm{0}\mathrm{0}\mathrm{-}\mathrm{0}\mathrm{.}\mathrm{2}\mathrm{7}\mathrm{5}}{\sqrt{\mathrm{0}\mathrm{0}\mathrm{0}\mathrm{1}\mathrm{7}\mathrm{8}\mathrm{8}\mathrm{9}\mathrm{+}\mathrm{0}\mathrm{0}\mathrm{0}\mathrm{1}\mathrm{4}\mathrm{9}\mathrm{0}\mathrm{7}}}\mathrm{=}\mathrm{-}\mathrm{1}\mathrm{.}\mathrm{3}\mathrm{1}$. Test rule is reject Ho if $\mathrm{|}\mathit{z}\mathrm{|}\mathrm{>}\mathrm{1}\mathrm{.}\mathrm{9}\mathrm{6}$, so accept Ho at 5% level.

38From tables, $\mathit{x}\mathrm{=}\mathrm{9}\mathrm{.}\mathrm{4}\mathrm{8}\mathrm{8}\mathrm{.}$

39 Let $\mathit{X}$ denote the outcome of the die. We test whether $\mathrm{p}\mathrm{r}\mathrm{\left\{}\mathit{X}\mathrm{=}\mathit{i}\mathrm{\right\}}\mathrm{=}\mathrm{1}\mathrm{/}\mathrm{6}$ for all $\mathit{i}$. Expected frequency for any outcome would then be $\mathrm{1}\mathrm{0}\mathrm{0}\mathrm{×}\frac{\mathrm{1}}{\mathrm{6}}\mathrm{=}\mathrm{1}\mathrm{6}\mathrm{.}\mathrm{6}\mathrm{6}\mathrm{7}\mathrm{.}$

Outcome $\mathit{i}$ 1 2 3 4 5 6

Observed frequency Oi 16 15 16 15 15 23

Expected frequency Ei 16.67 16.67 16.67 16.67 16.67 16.67

$\mathrm{\left(}{\mathit{O}}_{\mathit{i}}\mathrm{-}{\mathit{E}}_{\mathit{i}}{\mathrm{\right)}}^{\mathrm{2}}\mathrm{/}{\mathit{E}}_{\stackrel{\mathrm{˙}}{\mathrm{i}}}$ 0.0267 0.1667 0.0267 0.1667 0.1667 2.407 sum $\mathrm{=}\mathrm{2}\mathrm{.}\mathrm{9}\mathrm{6}\mathrm{0}$

17