13.1 Test for Goodness of Fit
Perform and analyze a chi-squared test for goodness of fit.
Chi-Squared ( ) test for goodness of fit- a single test that can be applied to see if the observed sample distribution is different from the hypothesized population distribution. H₀:The distribution of the sample data is the SAME as the population Ha:The distribution of the sample data is DIFFERENT than the population
Chi-Squared test statistic:
1-Random Sample 2-All expected counts are greater than 1 3-No more than 20% of expected counts are less than 5 **You need to list out your expected counts as part of your assumptions** Degrees of freedom = n-1 where, n= # of categories
1- L₁: input your observed L₂: input your expected 2- stat-test-x²GOF test This will give you your x² and p-value.
If it’s a multiple choice and they just give you the x² value and ask for the p-value, use: 2nd vars: x²cdf(x²,1000,df)=p-value Try this example: x²=6.7 with df=5 2nd vars: x²cdf(6.7,1000,5)= Your p-value is !
Area under the curve= 1 Skewed to the right (since we are squaring, we can’t have a negative value) As the degrees of freedom increase, the closer to a normal distribution your curve becomes
Ex 1: The “graying of America” is the recent belief that with better medicine and healthier lifestyles, people are living longer, and consequently a larger percentage of the population is of retirement age. Is this perception accurate? (Is there evidence that the distribution of ages changed drastically in 1996 from 1980?) US Population by age group, 1980 Age Group Population(in thousandths) Percent , , , older25, Total 226,
We select an SRS of 500. We first calculate our expected counts AgeObserved Count 1980 pop %Expected Counts (.4139) (.2768) (.1964) (.1128)56.4
H₀: the distribution of the ages in 1996 is the SAME as it was in 1980 Ha: the distribution of the ages in 1996 is DIFFERENT than it was in 1980 Assumptions: -random sample -all expected counts are ≥ 1 -no more than 20% of expected counts are < 5 (See chart of expected counts) Chi-squared test (goodness of fit) w/ α=0.05 P(x²>8.214)= df=4-1=3 Since p<α, it is statistically significant, therefore we reject H₀. There is enough evidence to say the distribution of ages in 1996 is different than it was in 1980
Ex 2: A wheel at a carnival game is divided into 5 equal parts. You suspect the wheel is unbalanced. The results of 100 spins are listed below. Perform a goodness of fit test. Is there evidence the wheel is not balanced? H₀:The wheel is balanced Ha: The wheel is unbalanced OutcomesFree SpinYou LoseTeddy Bear Baseball Card Airplane Frequency
Assumptions: -random sample -all expected counts are ≥ 1 -no more than 20% of expected counts are < 5 Chi-Squared Test (goodness of fit) w/ α=0.05 P(x²>6.8)=0.146 df=4 Since p∡α, it is not statistically significant, therefore we do not reject H₀. There is not enough evidence to say the wheel is unbalanced. Expected counts Free SpinYou LoseTeddy Bear Baseball Card Airplane Frequency20