Problem 1: Chi-squared test In this problem, assume a typical one-tailed P-value
ID: 3357418 • Letter: P
Question
Problem 1: Chi-squared test In this problem, assume a typical one-tailed P-value threshold of 0.05. Consider the following table in which the quantity a seems to be low: outcome 1 outcome 21 group 1 group 2 a-15 45 35 120 (a) Use Chi-squared to test whether the above outcome is a result of pure ran- domness, i.e. probabilities (1/4, 1/4, 1/4, 1/4) (b) Repeat part (a) if the probabilities are obtained from the table itself, i.e (c) Perhaps it is a good reminder at this point that the Chi-squared test is approzimate. Comment on why it is so. Then the probability of a conditioned on the sums of rows and columns outcome outcome 21 group 1 group 2 1 40 60 60 120 is exactly: 40 80 60 -i 120 60Explanation / Answer
Solution:
Problem 1
Part a
Here, we have to use Chi square test to check whether the outcomes is a result of pure randomness or not.
H0: Outcomes are result of pure randomness.
Ha: Outcomes are not a result of pure randomness.
Test statistic is given as below:
Chi square = [(O – E)^2/E]
Where O is observed frequencies and E is expected frequencies.
We are given a level of significance as 5% or = 0.05.
Calculation table is given as below:
No.
O
E
(O - E)^2
(O - E)^2/E
1
15
120*(1/4) = 30
225
7.5000
2
25
120*(1/4) = 30
25
0.8333
3
45
120*(1/4) = 30
225
7.5000
4
35
120*(1/4) = 30
25
0.8333
Total
120
120
Chi square =
16.6667
P-value =
0.0008
For this test, we get the p-value as 0.0008 which is less than = 0.05, so we reject the null hypothesis that Outcomes are result of pure randomness.
There is insufficient evidence to conclude that Outcomes are result of pure randomness.
Part b
Now, we have to use same test for checking the hypothesis whether the outcomes and groups are independent or not.
Null hypothesis: H0: The two categorical variables outcomes and groups are independent.
Alternative hypothesis: Ha: The two categorical variables outcomes and groups are not independent.
Test statistic is given as below:
Chi square = [(O – E)^2/E]
Where O is observed frequencies and E is expected frequencies.
We are given a level of significance as 5% or = 0.05.
Calculation table is given as below:
No.
O
E
(O - E)^2
(O - E)^2/E
1
15
120*(1/6) = 20
25
1.2500
2
25
120*(1/6) = 20
25
1.2500
3
45
120*(1/3) = 40
25
0.6250
4
35
120*(1/3) = 40
25
0.6250
Total
120
120
Chi square =
3.7500
P-value =
0.2898
Here, we get p-value as 0.2898 which is greater than = 0.05, so we do not reject the null hypothesis that two categorical variables outcomes and groups are independent.
There is sufficient evidence to conclude that the two categorical variables outcomes and groups are independent.
Part c
In this test, we are dealing with the expected values and not a real distribution values. Also, we use approximation criterion for chi square test statistic. We calculate the expected values or frequencies based on the row total, column total, and grand total.
No.
O
E
(O - E)^2
(O - E)^2/E
1
15
120*(1/4) = 30
225
7.5000
2
25
120*(1/4) = 30
25
0.8333
3
45
120*(1/4) = 30
225
7.5000
4
35
120*(1/4) = 30
25
0.8333
Total
120
120
Chi square =
16.6667
P-value =
0.0008