In: Statistics and Probability
7.2 Question 1 Give the degrees of freedom for the chi-square test based on the two-way table.
D | E | F | G | Total | |
---|---|---|---|---|---|
A | 39 | 34 | 43 | 34 | 150 |
B | 78 | 89 | 70 | 93 | 330 |
C | 23 | 37 | 27 | 33 | 120 |
Total | 140 | 160 | 140 | 160 | 600 |
Degrees of freedom =
b. Find the expected count and the contribution to the chi-square statistic for the (Group 2, Yes) cell in the two-way table below.
Yes | No | |
---|---|---|
Group 1 | 733 | 255 |
Group 2 | 1178 | 316 |
Round your answer for the excepted count to one decimal place, and
your answer for the contribution to the chi-square statistic to
three decimal places.
Expected count = Enter your answer; Expected count
contribution to the chi-square statistic = Enter your answer;
contribution to the chi-square statistic
Favorite Skittles Flavor?
C. A poll sampled 81 people, asking them their favorite skittle
flavor by color (green, orange, purple, red, or yellow). A separate
poll sampled 103 people, again asking them their favorite skittle
flavor, but rather than by color they asked by the actual flavor
(lime, orange, grape, strawberry, and lemon, respectively). The
table below shows the results from both polls. Does the way people
choose their favorite Skittles type, by color or flavor, appear to
be related to which type is chosen?
Green |
Orange |
Purple |
Red |
Yellow |
|
---|---|---|---|---|---|
Color |
22 |
11 |
18 |
16 |
14 |
Flavor |
16 |
19 |
23 |
34 |
11 |
Table 1 Skittles popularity
(a) Give a table with the expected counts for each of the 10
cells.
Round your answers to two decimal places.
Green (Lime) |
Orange | Purple (Grape) |
Red (Strawberry) |
Yellow (Lemon) |
|
Color | Enter your answer in accordance to item (a) of the question statement | Enter your answer in accordance to item (a) of the question statement | Enter your answer in accordance to item (a) of the question statement | Enter your answer in accordance to item (a) of the question statement | Enter your answer in accordance to item (a) of the question statement |
Flavor | Enter your answer in accordance to item (a) of the question statement | Enter your answer in accordance to item (a) of the question statement | Enter your answer in accordance to item (a) of the question statement | Enter your answer in accordance to item (a) of the question statement | Enter your answer in accordance to item (a) of the question statement |
(b) Are the expected counts large enough for a chi-square
test?
Choose the answer from the menu in accordance to item (b) of the
question statement
YesNo
(c) How many degrees of freedom do we have for this test?
Degrees of freedom = Enter your answer in accordance to item (c) of
the question statement
(d) Calculate the chi-square test statistic.
Round your answer to two decimal places.
chi-square statistic = Enter your answer in accordance to item (d)
of the question statement
(e) Determine the p-value.
Round your answer to four decimal places.
p-value = Enter your answer in accordance to item (e) of
the question statement
Using a 5 % level, do we find evidence that the method of choice
affects which is chosen?
Choose the answer from the menu in accordance to item (e) of the
question statement
d. Homes for Sale: Chi-Square Test
In previous questions, we examined various relationships between
the variables regarding houses for sale in the dataset
HomesForSale. One topic of repeated interest was
the differences between states. We previously only had the
capability to test for a difference between two states at a time,
but we can now test for relationships across all four states at
once.
The table below shows the number of big (greater than the national
average of 2700 sqft) and not big houses for sale for each of the
four states. Is location associated with the proportion of big
houses? Are the conditions met for a chi-square test? Perform the
test to see if the proportion of big houses is related to location
(states).
California | New Jersey |
New York |
Pennsylvania | Total | |
---|---|---|---|---|---|
Big | 7 | 6 | 7 | 3 | 23 |
Not | 23 | 24 | 23 | 27 | 97 |
Total | 30 | 30 | 30 | 30 | 120 |
Table 1 Houses for sale in four states
Click here for the dataset associated with this question.
Are the conditions met for a chi-square test?
Choose the answer from the menu; Are the conditions met for a
chi-square test?
YesNo
Round your answer for the chi-square statistic to one decimal
place, and your answer for the p-value to three decimal
places.
chi-square statistic = Enter your answer; chi-square
statistic
p-value = Enter your answer; p-value
Conclusion: Choose the answer from the menu; Conclusion
RejectDo not reject H 0 .
Does the test indicate an association between these two
variables?
Choose the answer from the menu; Does the test indicate an
association between these two variables?
YesNo
Number of Rows = 3
Number of Columns = 4
Degrees of Freedom=(#row - 1)(#column -1) = (3- 1 ) * ( 4-
1 ) = 6
=============================
B) group 2, yes
Expected frequency of a cell = sum of row*sum of column / total sum = 1911*1494/2482=1150.3
contribution to chi square= (fo-fe)^2/fe = (1178-1150.3)²/1150.3
= 0.667
=====================
c)
a)
Expected frequency of a cell = sum of row*sum of column / total sum | |||||||
Expected Frequencies | |||||||
green | orange | purple | red | yellow | |||
color | 38*81/184=16.728 | 30*81/184=13.207 | 41*81/184=18.049 | 50*81/184=22.011 | 25*81/184=11.005 | ||
flavor | 38*103/184=21.272 | 30*103/184=16.793 | 41*103/184=22.951 | 50*103/184=27.989 | 25*103/184=13.995 |
b) YES, expected count ≥5
c) Chi-Square Test Statistic,χ² = Σ(fo-fe)^2/fe = 8.01
d)
Level of Significance = 0.05
Number of Rows = 2
Number of Columns = 5
Degrees of Freedom=(#row - 1)(#column -1) = (2- 1 ) * ( 5- 1 )
= 4
p-Value = 0.0910
e)
Decision: p value > α , do not reject Ho