MATH1725 Introduction to Statistics: Worked examples
MATH1725 Introduction to Statistics: Worked examples
MATH1725 Introduction to Statistics: Worked examples
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Question (lecture 19).<br />
I live 55 miles commuting distance from the University. Over 35 car journeys I count the number<br />
X of road accidents observed and obtain the following data.<br />
Number of accidents observed per journey X 0 1 2<br />
Observed frequency 28 5 2<br />
Test at the 5% level whether a Poisson distribution gives a good fit <strong>to</strong> the data. Why is the Poisson<br />
distribution a suitable model for these data<br />
Answer: 40<br />
Question (lecture 20).<br />
Two surveys were conducted about a certain product and the following results obtained.<br />
Like OK Dislike Total<br />
Survey A 44 23 33 100<br />
Survey B 30 20 30 80<br />
Total 74 43 63 180<br />
Test whether the like/OK/dislike population proportions for the two surveys are equal.<br />
Answer: 41<br />
Number of cells is 6; number of estimated parameters is 0; number of constraints on expected frequencies is 1.<br />
Number of degrees of freedom is k = 6 − 0 − 1 = 5. Test statistic is χ 2 obs = 2.960. Reject H 0 if χ 2 obs > χ 2 5(5%). As<br />
χ 2 5(5%) = 11.071, we accept the null hypothesis that the die is fair.<br />
40 ¯x = 9/35 = 0.257. Best fitting Poisson distribution is X ∼ Poisson(µ = 0.257). Fitted probabilities are<br />
pr{X = x} = µx e −µ<br />
x!<br />
for x = 0,1, 2, . . .. Fitted frequencies are E x = 35 × pr{X = x} for x = 0,1, 2, . . ..<br />
Number of accidents X 0 1 ≥ 2<br />
Observed frequency O i 28 5 2<br />
Expected frequency E i 27.06 6.959 0.977<br />
(by difference)<br />
(O i − E i) 2 /E i 0.0324 0.5516 1.0723 sum=1.656<br />
Number of cells is 3; number of estimated parameters is 1; number of constraints on expected frequencies is 1.<br />
Number of degrees of freedom is k = 3 − 1 − 1 = 1. Test statistic is χ 2 obs = 1.656. Reject H 0 if χ 2 obs > χ 2 1(5%). As<br />
χ 2 1(5%) = 3.841, we accept the Poisson distribution fit.<br />
Poisson distribution sensible model by thinking of a Poisson process. If accidents happen randomly and independently<br />
in time, number in one journey of an hour has a Poisson distribution.<br />
In practice we might pool cells <strong>to</strong> ensure all expected frequencies are at least five. Also for χ 2 -tests with one degree<br />
of freedom a better test uses Yates’s continuity correction so that χ 2 obs = X (|O i − E i| − 1 2 )2<br />
.<br />
E i<br />
i<br />
41 (row <strong>to</strong>tal) × (column <strong>to</strong>tal)<br />
Expected frequencies are . Thus:<br />
grand <strong>to</strong>tal<br />
Like OK Dislike Total<br />
Survey A (100 × 74)/180 = 41.11 23.89 35.00 100<br />
Survey B 32.89 19.11 28.00 80<br />
Total 74 43 63 180<br />
Number of degrees of freedom is k = (3 − 1)(2 − 1) = 2.<br />
(O i − E i) 2 /E i Like OK Dislike<br />
Survey A 0.2030 0.0331 0.1143<br />
Survey B 0.2538 0.0413 0.1429<br />
Test statistic is χ 2 obs = X i<br />
(O i − E i) 2 /E i = 0.7883. Reject H 0 if χ 2 obs > χ 2 2(5%). As χ 2 2(5%) = 5.991, so accept<br />
hypothesis that the two surveys have the same overall proportions for each category.<br />
Note that the test is whether the proportion liking is the same for surveys A and B, and the proportions saying OK<br />
are the same for A and B, and the proportions disliking are the same for A and B.<br />
18