- Describe a situation where a Goodness-of-Fit Test could be used
We know, that chi-square goodness-of-fit test is a non-parametric test which helps us to understand if there is a significant difference between observed and expected frequencies of some experiment.
Where f0 are observed frequencies, fe are expected frequencies.
For example, consider the coin tossed 100 times with the result of 65 tails and 35 heads. We want to test hypothesis if the coin is symmetric. If the coin is symmetric, then expected frequencies will be 50 and 50.
So,
X 2Pearson = (Oi-Ei) 2/Ei = (65-50) 2/50 + (35-50) 2/50 = 2*225/50 = 9.
The resulting value should be compared with those that can take a random variable χ2n=1, defined as the square of the standard normal value χ2n=1 =T12 ≥ 9 T1≥3 or T1≤-3. The probability of such events is very low P(χ2n=1≥9) = 0.006.. Therefore, the coin cannot be considered symmetrical : H0 should be rejected . That the number of degrees of freedom cannot be equal to the number of bits can be seen from the fact that the sum of the observed frequencies is always equal to the sum of the expected , such as O1 + O2 = 65 +35 = E1 + E2 = 50 +50 = 100 . Therefore, the random points with coordinates O1 and O2 are located on the line : O1 + O2 = E1 + E2 = 100 and the distance to the center is less than if this restriction was not, and they settled on the whole plane . Valid for two independent random variables with expectation E1 = 50 , E2 = 50, the sum of their implementations should not always be equal to 100 - would be permissible , for example , the values of 60 O1 = , O2 = 55 .
- Give an example of when a Test for Independence would be used
For example, a psychologist wants to know whether or not that teachers are more biased to boys than to girls. Ie girls are more likely to praise. To do this, the psychologist analyzed the characteristics of students, written by teachers, for the frequency of occurrence of three words: "active", "studious", "disciplined", synonyms of words counted as well. Data on the frequency of occurrence of words were tabulated:
For processing the data obtained using the chi-square test.
For this we construct empirical frequency distribution table, i.e. those frequencies that we observe:
Theoretically, we expect that the frequencies are distributed with equal probability, ie, frequency distributed proportionally between boys and girls. Theoretical construct the table of frequencies. To do this, multiply the amount on the line for the amount of the column and divide the total by the total bag of (n).
Summary Table for the calculation would look like this:
Chi-Square= ∑(E - Т)² / Т
df = (R - 1) * (C - 1) where R - number of rows in the table, C - number of columns.
In this case the chi-square = 3.79; df = 2.
According to the table of critical values of the criteria we find that when df = 2 and the error level 0.05 critical χ2 = 5,99.
The resulting value is less than the critical value, so the null hypothesis is accepted. Conclusion: The teachers do not attach importance to the child sex characteristics when writing it.