In: Statistics and Probability
Suppose a luxury ship colluded and sank. The ship had 2224 passengers and crew and 1502 people died. The ship had three classes of passengers, 323 passengers in the first class, 277 in the second class, and 709 in the third class. The number of passengers survived were 200 in the first class, 119 in the second, and 181 in the third, respectively.
a. Find the chi-square statistic and the p-value.
b. What are the hypotheses?
c. Construct the table for expected frequency and explain it. d.
What is the conclusion of this test?
Solution:
Here, we have to use chi square test for independence of two categorical variables.
b. What are the hypotheses?
Null hypothesis: H0: Two variables class of passenger and whether he/she survives are independent.
Alternative hypothesis: Ha: Two variables class of passenger and whether he/she survives are dependent.
We assume/given level of significance = α = 0.05
a. Find the chi-square statistic and the p-value.
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 = 3
Degrees of freedom = df = (r – 1)*(c – 1) = 1*2 = 2
α = 0.05
Critical value = 5.991465
(by using Chi square table or excel)
c. Construct the table for expected frequency and explain it.
Calculation tables for test statistic are given as below:
Observed Frequencies |
||||
Class of Passenger |
||||
Survive or died? |
First |
Second |
Third |
Total |
Survive |
200 |
119 |
181 |
500 |
Died |
123 |
158 |
528 |
809 |
Total |
323 |
277 |
709 |
1309 |
Expected Frequencies |
||||
Class of Passenger |
||||
Survive or died? |
First |
Second |
Third |
Total |
Survive |
123.3766 |
105.806 |
270.8174 |
500 |
Died |
199.6234 |
171.194 |
438.1826 |
809 |
Total |
323 |
277 |
709 |
1309 |
(O - E)^2/E |
|||
First |
Second |
Third |
|
Survive |
47.58715 |
1.645302 |
29.78822 |
Died |
29.41109 |
1.016874 |
18.41052 |
Test Statistic = Chi square = ∑[(O – E)^2/E] = 127.8592
χ2 test statistic = 127.8592
P-value = 0.0000
(By using Chi square table or excel)
d. What is the conclusion of this test?
P-value < α = 0.05
So, we reject the null hypothesis
There is sufficient evidence to conclude that two variables class of passenger and whether he/she survives are dependent.