In: Statistics and Probability
Here are the figures for the loyalty of a sample of imperial
soldiers on the Death Star:
traitors | loyal | |
stormtroopers | 250 | 2000 |
officers | 190 | 1200 |
Please fill in the appropriate totals:
traitors | loyal | total | |
stormtroopers | 250 | 2000 | |
officers | 190 | 1200 | |
total |
Assuming these totals, what counts would be expected in each cell
(to two places after the decimal) if soldier type and loyalty
status were independent?
traitors | loyal | |
stormtroopers | ||
officers |
Assuming soldier type and loyalty status are independent, fill in
(two two places after the decimal) each chi-square
contribution:
traitors | loyal | |
stormtroopers | ||
officers |
What is the value of the chi-square test-statistic (to one place
after the decimal)?
Using an online chi-square calculator, what is the p-value for this
rounded chi-square value?
Do we have evidence at the 10% level that soldier type and loyalty
status (for all Death Star soldiers) are dependent (0 = no, 1 =
yes)?
Do we have evidence at the 5% level that soldier type and loyalty
status (for all Death Star soldiers) are dependent (0 = no, 1 =
yes)?
Do we have evidence at the 1% level that soldier type and loyalty
status (for all Death Star soldiers) are dependent (0 = no, 1 =
yes)?
Here, we have to use chi square test for independence of two categorical variables.
Null hypothesis: H0: Two variables soldier type and loyalty status are independent.
Alternative hypothesis: Ha: Two variables soldier type and loyalty status are dependent.
Test statistic formula is given as below:
Chi square = ∑[(O – E)^2/E]
Where, O is observed frequencies and E is expected frequencies.
E = row total * column total / Grand total
We are given
Number of rows = r = 2
Number of columns = c = 2
Degrees of freedom = df = (r – 1)*(c – 1) = 1*1 = 1
Calculation tables for test statistic are given as below:
Observed Frequencies |
|||
Column variable |
|||
Row variable |
Traitors |
Loyal |
Total |
Storm troopers |
250 |
2000 |
2250 |
Officers |
190 |
1200 |
1390 |
Total |
440 |
3200 |
3640 |
Expected Frequencies |
|||
Column variable |
|||
Row variable |
Traitors |
Loyal |
Total |
Storm troopers |
271.978 |
1978.022 |
2250 |
Officers |
168.022 |
1221.978 |
1390 |
Total |
440 |
3200 |
3640 |
Calculations |
|||
(O - E) |
|||
Row variable |
Traitors |
Loyal |
Total |
Storm troopers |
-21.978022 |
21.97802198 |
|
Officers |
21.97802198 |
-21.97802198 |
|
Total |
Chi-square contribution: |
|||
(O - E)^2/E |
|||
Row variable |
Traitors |
Loyal |
Total |
Storm troopers |
1.776001776 |
0.244200244 |
2.02020202 |
Officers |
2.874823019 |
0.395288165 |
3.270111184 |
Total |
5.290313204 |
Test Statistic = Chi square = ∑[(O – E)^2/E] = 5.290313204
χ2 test statistic = 5.290313204
P-value = 0.021444
(By using Chi square table or excel)
For α = 0.10
P-value < α = 0.10
So, we reject the null hypothesis
Yes, we have sufficient evidence at 10% that two variables soldier type and loyalty status are dependent.
For α = 0.05
P-value < α = 0.05
So, we reject the null hypothesis
Yes, we have sufficient evidence at 10% that two variables soldier type and loyalty status are dependent.
For α = 0.01
P-value > α = 0.01
So, we do not reject the null hypothesis
No, we don’t have sufficient evidence at 10% that two variables soldier type and loyalty status are dependent.