In: Statistics and Probability
A survey was taken asking what percent of gender takes public transportation and what percent drive. The results of the survey show that out of the 16 men survey 10 drive and 6 do not, where as with women 10 drive and 4 take public transportation.
Analyze the data by hand using the appropriate inferential technique and explain your choice
- Chi-Square
- Confidence Interval
- t-test,
- ANOVA
Solution:
Here, we have to use chi square test for independence of two categorical variables.
Null hypothesis: H0: Two categorical variables gender and whether they drive are independent.
Alternative hypothesis: Ha: Two categorical variables gender and whether they drive are dependent.
We assume level of significance = α = 0.05
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 data as below:
Observed Frequencies |
|||
Drive |
|||
Gender |
Yes |
No |
Total |
Men |
10 |
6 |
16 |
Women |
10 |
4 |
14 |
Total |
20 |
10 |
30 |
Number of rows = r = 2
Number of columns = c = 2
Degrees of freedom = df = (r – 1)*(c – 1) = 1*1 = 1
α = 0.05
Critical value = 3.841459
(by using Chi square table or excel)
Calculation tables for test statistic are given as below:
Expected Frequencies |
|||
Drive |
|||
Gender |
Yes |
No |
Total |
Men |
10.66667 |
5.333333 |
16 |
Women |
9.333333 |
4.666667 |
14 |
Total |
20 |
10 |
30 |
Calculations |
|
(O - E) |
|
-0.66667 |
0.666667 |
0.666667 |
-0.66667 |
(O - E)^2/E |
|
0.041667 |
0.083333 |
0.047619 |
0.095238 |
Test Statistic = Chi square = ∑[(O – E)^2/E] = 0.267857
χ2 statistic = 0.267857
P-value = 0.604773
(By using Chi square table or excel)
P-value > α = 0.05
So, we do not reject the null hypothesis
There is sufficient evidence to conclude that two categorical variables gender and whether they drive are independent.