Respuesta :
Answer:
The critical value would be: [tex]\chi^2_{crit}=11.345[/tex] and we use the following excel code to find it: "=CHISQ.INV(1-0.01,3)"
[tex]p_v = P(\chi^2_{3} >3.29)=0.349[/tex]
And we can find the p value using the following excel code:
"=1-CHISQ.DIST(3.29,3,TRUE)"
Since the p value is higher than the significance level we FAIL to reject the null hypothesis at 5% of significance that the two variables are independent.
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".
Assume the following dataset:
           F      B     S    Bs   Total
home wins   39    156    25    83    303
Visitor wins  31     98     19    75    223
Total        70    254    44    158    526
We need to conduct a chi square test in order to check the following hypothesis:
H0: The number of home team and visiting team losses is independent of the sport.
H1: The number of home team and visiting team losses is dependent of the sport.
The level of significance assumed for this case is [tex]\alpha=0.01[/tex]
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{70*303}{526}=40.32[/tex]
[tex]E_{2} =\frac{254*303}{526}=146.32[/tex]
[tex]E_{3} =\frac{44*303}{526}=25.35[/tex]
[tex]E_{4} =\frac{158*303}{526}=91.02[/tex]
[tex]E_{5} =\frac{70*223}{526}=29.68[/tex]
[tex]E_{6} =\frac{254*223}{526}=107.68[/tex]
[tex]E_{7} =\frac{44*223}{526}=18.65[/tex]
[tex]E_{8} =\frac{158*223}{526}=66.98[/tex]
And the expected values are given by:
            F      B       S      Bs   Total
home wins   40.32   146.32   25.35   91.02   303
Visitor wins  29.68  107.68   18.65   66.98   223
Total         70     254      44     158    526
And now we can calculate the statistic:
[tex]\chi^2 = \frac{(39-40.32)^2}{40.32}+\frac{(156-146.32)^2}{146.32}+\frac{(25-25.35)^2}{25.35}+\frac{(83-91)^2}{91}+\frac{(31-29.68)^2}{29.68}+\frac{(98-107.68)^2}{107.68}+\frac{(19-18.65)^2}{18.65}+\frac{(75-66.98)^2}{66.98} =3.29[/tex]Now we can calculate the degrees of freedom for the statistic given by:
[tex]df=(rows-1)(cols-1)=(4-1)(2-1)=3[/tex]
The critical value would be: [tex]chi^2_{crit}=11.345[/tex] and we use the following excel code to find it: "=CHISQ.INV(1-0.01,3)"
And we can calculate the p value given by:
[tex]p_v = P(\chi^2_{3} >3.29)=0.349[/tex]
And we can find the p value using the following excel code:
"=1-CHISQ.DIST(3.29,3,TRUE)"
Since the p value is higher than the significance level we FAIL to reject the null hypothesis at 5% of significance that the two variables are independent.