In: Statistics and Probability
Victoria is doing a chi-square test to see if people in California have the same color preferences as people in Arizona. A sample of 100 Californians were polled. Thirty-five people prefer yellow, fifty people prefer green, and fifteen people prefer red. A sample of 50 Arizonans were polled. Ten people prefer yellow, ten people prefer green, and thirty people prefer red. Calculate the test statistic. State the critical value. Come to a conclusion about the null hypothesis. And state what Victoria should conclude about Californian’s and Arizonan’s color preferences? Let α = .05.
california
sample size=100
color | no of people |
yellow | 35 |
green | 50 |
red | 15 |
Arizona
sample size=50
color | no of people |
yellow | 10 |
green | 10 |
red | 30 |
Victoria is doing a chi-square test to see if people in California have the same color preferences as people in Arizona, thus the
HYPOTHESIS STATEMENTS be:
H0: people in California have the same color preferences as people in Arizona
Ha: people in California have different color preferences as people in Arizona( α = .05.)
Step 1.LAY OUT THE DATA IN A TABLE
state\color | yellow | green | red |
california | 35 | 50 | 15 |
arizona | 10 | 10 | 30 |
Step 2. Select the appropriate test statistic.
The formula for the test statistic is:
In the test statistic, O = observed frequency and E=expected frequency in each of the response categories
The condition for appropriate use of the above test statistic is that each expected frequency is at least 5. In Step 4 we will compute the expected frequencies and we will ensure that the condition is met.
Step3: Add up rows and columns:
state\color | yellow | green | red | |
california | 35 | 50 | 15 | 100 |
arizona | 10 | 10 | 30 | 50 |
45 | 60 | 45 | 150 |
Step4: Calculate "Expected Value" for each entry:
Multiply each row total by each column total and divide by the overall total:
state\color | yellow | green | red | |
california | (45*100)/150 | (60*100)/150 | (45*100)/150 | 100 |
arizona | (45*50)/150 | (60*50)/150 | (45*50)/150 | 50 |
45 | 60 | 45 | 150 |
Which gives us:
state\color | yellow | green | red | |
california | 30 | 40 | 30 | 100 |
arizona | 15 | 20 | 15 | 50 |
45 | 60 | 45 | 150 |
Subtract expected from observed, square it, then divide by expected:
In other words, use formula (O−E)2 /E where
state\color | yellow | green | red | |
california | 100 | |||
arizona | 50 | |||
45 | 60 | 45 | 150 |
Which gets us:
state\color | yellow | green | red | |
california | 0.833 | 2.5 | 7.5 | 100 |
arizona | 1.66 | 5 | 15 | 50 |
45 | 60 | 45 | 150 |
Now add up those calculated values:
0.833+2.5+7.5+1.66+5+15 = 32.493
Chi-Square is 32.493
Step 5. Set up decision rule.
The decision rule depends on the level of significance and the degrees of freedom, defined as df = (r-1)(c-1), where r and c are the numbers of rows and columns in the two-way data table.
The row variable is the residential state which are 2 , thus r=2. The column variable is color preference and 3 responses are considered, thus c=3. For this test, df=(2-1)(3-1)=2.
With χ2 tests there are no upper, lower or two-tailed tests. If the null hypothesis is true, the observed and expected frequencies will be close in value and the χ2 statistic will be close to zero. If the null hypothesis is false, then the χ2 statistic will be large.
The rejection region for the χ2 test of independence is always in the upper (right-hand) tail of the distribution. For df=2 and a 5% level of significance, the appropriate critical value is 5.99 and the decision rule is as follows: Reject H0 if chi 2> 5.99.
Step 6. Conclusion
We reject H0 because 32.493 > 5.99.
Thus Victoria has statistically significant evidence at a =0.05 to show that H0 is false or people in California have different color preferences as people in Arizona..