Answer:
1)
2)
Where c represent the number of categories c=2
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:
Tall =30 , Short =20
We need to conduct a chi square test in order to check the following hypothesis:
H0: The deviations from a 1:1 ratio (25 tall and 25 short) are due to chance.
H1: The deviations from a 1:1 ratio (25 tall and 25 short) are NOT due to chance.
Part 1
So then we know that the expected values would be 25 for each case
The statistic to check the hypothesis is given by:
And if we replace we got:
Part 2
For this case the degreed of freedom are given by:
Where c represent the number of categories c=2
And we can calculate the p value given by:
And we can find the p value using the following excel code:
"=1-CHISQ.DIST(2,1,TRUE)"