Respuesta :
Answer:
[tex]\chi^2 = \frac{(32-42)^2}{42}+\frac{(18-8)^2}{8}+\frac{(68-63)^2}{63}+\frac{(7-12)^2}{12}+\frac{(89-84)^2}{84}+\frac{(11-16)^2}{16}=19.221[/tex]
Now we can calculate the degrees of freedom for the statistic given by:
[tex]df=(rows-1)(cols-1)=(3-1)(2-1)=2[/tex]
And we can calculate the p value given by:
[tex]p_v = P(\chi^2_{2} >19.221)=0.000067[/tex]
And we can find the p value using the following excel code:
"=1-CHISQ.DIST(19.221,2,TRUE)"
Since the p values is higher than a significance level for example [tex]\alpha=0.05[/tex], we can reject the null hypothesis at 5% of significance, and we can conclude that the two variables are dependent at 5% of significance.
Step-by-step explanation:
Previous concepts
A chi-square goodness of fit test "determines if a sample data matches a population".
A chi-square test for independence "compares two variables in a contingency table to see if they are related. In a more general sense, it tests to see whether distributions of categorical variables differ from each another".
Solution to the problem
Assume the following dataset:
Size Company/ Heal. Ins. Yes No Total
Small 32 18 50
Medium 68 7 75
Large 89 11 100
_____________________________________
Total 189 36 225
We need to conduct a chi square test in order to check the following hypothesis:
H0: independence between heath insurance coverage and size of the company
H1: NO independence between heath insurance coverage and size of the company
The statistic to check the hypothesis is given by:
[tex]\sum_{i=1}^n \frac{(O_i -E_i)^2}{E_i}[/tex]
The table given represent the observed values, we just need to calculate the expected values with the following formula [tex]E_i = \frac{total col * total row}{grand total}[/tex]
And the calculations are given by:
[tex]E_{1} =\frac{50*189}{225}=42[/tex]
[tex]E_{2} =\frac{50*36}{225}=8[/tex]
[tex]E_{3} =\frac{75*189}{225}=63[/tex]
[tex]E_{4} =\frac{75*36}{225}=12[/tex]
[tex]E_{5} =\frac{100*189}{225}=84[/tex]
[tex]E_{6} =\frac{100*36}{225}=16[/tex]
And the expected values are given by:
Size Company/ Heal. Ins. Yes No Total
Small 42 8 50
Medium 63 12 75
Large 84 16 100
_____________________________________
Total 189 36 225
And now we can calculate the statistic:
[tex]\chi^2 = \frac{(32-42)^2}{42}+\frac{(18-8)^2}{8}+\frac{(68-63)^2}{63}+\frac{(7-12)^2}{12}+\frac{(89-84)^2}{84}+\frac{(11-16)^2}{16}=19.221[/tex]
Now we can calculate the degrees of freedom for the statistic given by:
[tex]df=(rows-1)(cols-1)=(3-1)(2-1)=2[/tex]
And we can calculate the p value given by:
[tex]p_v = P(\chi^2_{2} >19.221)=0.000067[/tex]
And we can find the p value using the following excel code:
"=1-CHISQ.DIST(19.221,2,TRUE)"
Since the p values is higher than a significance level for example [tex]\alpha=0.05[/tex], we can reject the null hypothesis at 5% of significance, and we can conclude that the two variables are dependent at 5% of significance.