In: Math
Do workers prefer to buy lunch rather than pack their own lunch? A survey of employed Americans found that 75% of the 18 to 24 year-olds, 77% of the 25 to 34 year-olds, 72% of the 35 to 44 year-olds, 58% of the 45 to 54 year-olds, 57% of the 55 to 64 year-olds, and 55% of the 65 + year-olds buy lunch throughout the workweek. Suppose the survey was based on 200 employed Americans in each of six age groups.
a. At the 0.05 level of significance, is there evidence of a difference among the age groups in the preference for buying lunch?
b. Determine the p-value in (a) and interpret its meaning.
a) Null hypothesis:Ho: preference for buying lunch is similar among different age groups
Alternate hypothesis:Ho: preference for buying lunch is different among different age groups
degree of freedom(df) =(rows-1)*(columns-1)= | 5 | ||
for 5 df and 0.05 level of signifcance critical region χ2= | 11.070 | ||
Applying chi square test of independence: |
Expected | Ei=row total*column total/grand total | 18-24 | 25-34 | 35-44 | 45-54 | 55-64 | 65+ | Total |
buy | 131.3333 | 131.3333 | 131.3333 | 131.3333 | 131.3333 | 131.3333 | 788 | |
not buy | 68.6667 | 68.6667 | 68.6667 | 68.6667 | 68.6667 | 68.6667 | 412 | |
total | 200 | 200 | 200 | 200 | 200 | 200 | 1200 | |
chi square χ2 | =(Oi-Ei)2/Ei | 18-24 | 25-34 | 35-44 | 45-54 | 55-64 | 65+ | Total |
buy | 2.6531 | 3.9120 | 1.2217 | 1.7902 | 2.2876 | 3.4653 | 15.3299 | |
not buy | 5.0744 | 7.4822 | 2.3366 | 3.4239 | 4.3754 | 6.6278 | 29.3204 | |
total | 7.7276 | 11.3942 | 3.5582 | 5.2141 | 6.6631 | 10.0931 | 44.6503 | |
test statistic X2 = | 44.650 |
since test statistic falls in rejection region we reject null hypothesis |
we have sufficient evidence to conclude that preference for buying lunch is different among different age groups |
b)
for above test statistic and 5 df, p value <0.0001
this is the probability of having above or more extreme sample if preference for buying lunch is similar among different age groups