chi square fr chris - st francis high school march 2006
TRANSCRIPT
Chi SquareFr Chris - St Francis High School
March 2006
Two Applications
• Goodness of Fit (one way)
Two-Way (Contingency) Table
1-Way(Univariate) Data
• Observed frequencies are from a RANDOM SAMPLE
Large Sample size (expect at least 5 in each category)
Stolen Cars by Color
Null Hypothesis: Color makes no difference
San Luis Obispo Telegram-Tribune 9/2/96
Alternative Hypothesis: Color makes a difference
15% white, 15% blue, 35% red, 30% black, 5% other
white blue red black other
Observed 140 100 270 230 90Expected 124.5 124.5 290.5 249.5 41.5
white blue red black other
Observed 140 100 270 230 90Expected 124.5 124.5 290.5 249.5 41.5
SRS, and All EXPECTED cells >5 so large enough sample
Since P(Chi-sq, df=4 > 18.46) < .001so we reject the null hypothesis,
and conclude certain colors are more likely to be stolen
Now you try: According to SLO Trib, 12/15/99,
SRS of 200 purchases of California Lotto tix:
Age 18-34 35-64 65+played 36 130 34
California in 1999 had 35% 18-34, 51% 35-64, 14% over 65
Try a Chi-Sq Goodness of Fit Test
2 way Chi-Square is even more Fun!According to Research Quarterly for Exercise and Sport, (1990) p 315-320, SRS of 1200 looked at
hours of TV and a cardiovascular test
Hrs of TV Fit Unfit
0 35 147
1-2 101 629
3-4 28 222
5+ 4 34
But we compute df=(r-1)(c-1)
and the expected frequencies are
computed with by the marginal totals
Hrs of TV Fit Unfit Totals
0 35 147 1821-2 101 629 730
3-4 28 222 250
5+ 4 34 38168 1032 1200
Hrs of TV Fit Unfit Totals
0 25.5 156.5 1821-2 102.2 627.8 730
3-4 35.0 215.0 250
5+ 5.3 32.7 38168 1032 1200
Expected Frequency = (Row)(Col)/total
df=(4-1)(2-1)=3, So we reject the Null Hypothesis at the .05 level for any
Chi Square over 12.83
less than 12.83, so there is not enough evidence to reject the null hypothesis at the .05 level, so there is little evidence here that would suggest that the hours watching TV is associated with
one’s cardiovascular fittness.
sex died lived
men 630 168women 136 323
class died lived
high 117 187
middle 163 112
low 536 192Would you rather be rich or a woman if you were on the Titanic?
Actually the Chi-Square statistic tests against the null hypothesis (no difference according to category)...
you need to look at the numbers to see what’s going on...