Answer:
Now we can calculate the degrees of freedom for the statistic given by:
And we can calculate the p value given by:
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 , 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:
The table given represent the observed values, we just need to calculate the expected values with the following formula
And the calculations are given by:
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:
Now we can calculate the degrees of freedom for the statistic given by:
And we can calculate the p value given by:
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 , we can reject the null hypothesis at 5% of significance, and we can conclude that the two variables are dependent at 5% of significance.