Answer :
Answer:
1) H0: There is independence between the marital status and the diagnostic of alcoholic
H1: There is association between the marital status and the diagnostic of alcoholic
2) The statistic to check the hypothesis is given by:
[tex]\sum_{i=1}^n \frac{(O_i -E_i)^2}{E_i}[/tex]
3) [tex]\chi^2 = \frac{(21-33.143)^2}{33.143}+\frac{(37-41.429)^2}{41.429}+\frac{(58-41.429)^2}{41.429}+\frac{(59-46.857)^2}{46.857}+\frac{(63-58.571)^2}{58.571}+\frac{(42-58.571)^2}{58.571} =19.72[/tex]
4) [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.72)=5.22x10^{-5}[/tex]
And we can find the p value using the following excel code:
"=1-CHISQ.DIST(19.72,2,TRUE)"
Since the p value is lower than the significance level so then we can reject the null hypothesis at 5% of significance, and we can conclude that we have association between the two variables analyzed.
Step-by-step explanation:
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".
Assume the following dataset:
Diag. Alcoholic Undiagnosed Alcoholic Not alcoholic Total
Married 21 37 58 116
Not Married 59 63 42 164
Total 80 100 100 280
Part 1
We need to conduct a chi square test in order to check the following hypothesis:
H0: There is independence between the marital status and the diagnostic of alcoholic
H1: There is association between the marital status and the diagnostic of alcoholic
The level os significance assumed for this case is [tex]\alpha=0.05[/tex]
Part 2
The statistic to check the hypothesis is given by:
[tex]\sum_{i=1}^n \frac{(O_i -E_i)^2}{E_i}[/tex]
Part 3
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{80*116}{280}=33.143[/tex]
[tex]E_{2} =\frac{100*116}{280}=41.429[/tex]
[tex]E_{3} =\frac{100*116}{280}=41.429[/tex]
[tex]E_{4} =\frac{80*164}{280}=46.857[/tex]
[tex]E_{5} =\frac{100*164}{280}=58.571[/tex]
[tex]E_{6} =\frac{100*164}{280}=58.571[/tex]
And the expected values are given by:
Diag. Alcoholic Undiagnosed Alcoholic Not alcoholic Total
Married 33.143 41.429 41.429 116
Not Married 46.857 58.571 58.571 164
Total 80 100 100 280
And now we can calculate the statistic:
[tex]\chi^2 = \frac{(21-33.143)^2}{33.143}+\frac{(37-41.429)^2}{41.429}+\frac{(58-41.429)^2}{41.429}+\frac{(59-46.857)^2}{46.857}+\frac{(63-58.571)^2}{58.571}+\frac{(42-58.571)^2}{58.571} =19.72[/tex]
Part 4
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.72)=5.22x10^{-5}[/tex]
And we can find the p value using the following excel code:
"=1-CHISQ.DIST(19.72,2,TRUE)"
Since the p value is lower than the significance level so then we can reject the null hypothesis at 5% of significance, and we can conclude that we have association between the two variables analyzed.