In: Statistics and Probability
32) An online blog asked the following question and surveyed a random sample of followers. “Do you think it should be legal or illegal for a child to use the Internet to harass another child?” Data were tabulated based on their political view and the responses. A chi-square test was conducted to test whether the opinion and the political ideology are related. The chi-square test statistic was calculated to be
Conservative |
Moderate |
Liberal |
|
Legal |
27 |
22 |
14 |
Illegal |
119 |
196 |
124 |
Not Sure |
19 |
24 |
21 |
a. State the hypotheses:
H0:
H1:
b. Find the df:________________and the p-value (four decimal places): __________________________
c. If the test statistic χ2 = 7.6645, state your conclusion at 0.05 significance level for the relationship of opinion and political view.
Solution:
Part a
H0: There is no any relationship between the given two categorical variables opinion and the political view.
H1: There is a relationship between the given two categorical variables opinion and the political view.
We are given level of significance = α = 0.05
Test statistic formula is given as below:
Chi square = ∑[(O – E)^2/E]
Where, O is observed frequencies and E is expected frequencies.
E = row total * column total / Grand total
We are given
Number of rows = r = 3
Number of columns = c = 3
Degrees of freedom = df = (r – 1)*(c – 1) = 2*2 = 4
df = 4
α = 0.05
Critical value = 9.487729
(by using Chi square table or excel)
Part b
We are given
Test Statistic = Chi square = ∑[(O – E)^2/E] = 7.6645
χ2 statistic = 7.6645
P-value = 0.1047
(By using Chi square table or excel)
P-value > α = 0.05
So, we do not reject the null hypothesis
Part c
There is not sufficient evidence to conclude that there is a relationship between the given two categorical variables opinion and the political view.