0% found this document useful (0 votes)
9 views6 pages

Stat t09 Sol

The document discusses statistical analyses using Chi-square and ANOVA tests to explore relationships between variables such as sleeping duration and happiness levels in children, as well as stress reduction techniques for individuals with hypertension. Results indicate significant associations and differences in means, with evidence supporting claims of relationships between variables. Additionally, it provides guidance on using SPSS for conducting these tests.

Uploaded by

yi98981234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

Stat t09 Sol

The document discusses statistical analyses using Chi-square and ANOVA tests to explore relationships between variables such as sleeping duration and happiness levels in children, as well as stress reduction techniques for individuals with hypertension. Results indicate significant associations and differences in means, with evidence supporting claims of relationships between variables. Additionally, it provides guidance on using SPSS for conducting these tests.

Uploaded by

yi98981234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Tung Wah College

Statistics – by Dr. Mark Tsang (ARH)

Tutorial 9: Chi-square Test and ANOVA Test

Structured Questions

1. There is a study on the sleeping duration and the levels of happiness of healthy
children. Samples of children are interviewed and the time they spent on sleep at
night and their levels of happiness are recorded. The contingency table below
shows the number of children with different sleeping durations and happiness
levels. You want to test the relationship between the two variables at 𝛼 = 0.01
using 𝜒 2 -test.

Happiness levels
Sleeping Duration Depressed Sad Content Happy
Less than 6 hours 16 20 10 5
6 to 8 hours 30 26 29 20
8 to 10 hours 40 32 60 51
More than 10 hours 17 28 30 24

[Solution]

𝐻0 : There is no association between sleeping duration and the levels of happiness of


healthy children.
𝐻1 : There is such an association. (claim)

The degree of freedom is (4 – 1)(4 – 1) = 9. At 𝛼 = 0.01, the critical value is 21.666.

Decision rule: Reject the null hypothesis if the test statistic value is greater than or
equal to 21.666.
The 𝜒 2 -test statistic value is found using the following table:

(𝑂 − 𝐸)2 Happiness levels


(𝑂, 𝐸, )
𝐸
Sleeping Duration Depressed Sad Content Happy Total

Less than 6 hours (16, 11.99, (20, 12.34, (10, 15.02, (5, 11.64, 51
1.34) 4.75) 1.68) 3.79)
6 to 8 hours (30, 24.69, (26, 25.41, (29, 30.92, (20, 23.97, 105
1.14) 0.01) 0.12) 0.66)
8 to 10 hours (40, 43.03, (32, 44.29, (60, 53.9, (51, 41.78, 183
0.21) 3.41) 0.69) 2.03)
More than 10 hours (17, 23.28, (28, 23.96, (30, 29.16, (24, 22.6, 99
1.69) 0.68) 0.02) 0.09)
Total 103 106 129 100 438

(𝑂 − 𝐸)2
𝜒2 = ∑ = 1.34 + 4.75 + 1.68 + ⋯ + 0.09 = 22.327
𝐸

Since the test statistic value (22.327) is greater than the critical value (21.666), we
reject the null hypothesis at the 1% significance level.

We have very strong evidence to support the claim that there is an association between
sleeping duration and the levels of happiness of healthy children.

It is observed that children who sleep less than 6 hours at night are more likely to feel
sad but less likely to feel happy. For children who sleep 8 to 10 hours at night, they
are more likely to feel happy, but less likely to feel sad.

2
2. A researcher wishes to try three different techniques to lower the stress level of
individuals diagnosed with hypertension. The subjects are randomly assigned to
three groups; the first group takes medication, the second group exercises, and
the third group follows a special diet. After four weeks, the reduction in each
person’s stress level is recorded. The data are shown below.

Medication Exercise Diet


10 6 5
12 8 9
9 3 12
15 0 8
13 2 4

By using Excel, the following ANOVA table is generated.


Source of Variation SS df MS F P-value
Between Groups 160.1333 (i) (iii) (v) 0.003831
Within Groups 104.8 (ii) (iv)
Total ? ?

Complete the ANOVA table. At 𝛼 = 0.05, test the claim that, among the three
mean reduction in stress level, at least one of them is different from the
others.

[Solution]

Let 𝜇1 , 𝜇2 and 𝜇3 be the population mean reduction in stress level by taking


medication, doing exercises, and following a special diet respectively.

𝐻0 : 𝜇1 = 𝜇2 = 𝜇3
𝐻1 : Not all population means are identical

The following ANOVA table is obtained.


Source of Variation SS df MS F P-value
Between Groups 160.1333 2 80.06667 9.167939 0.003831
Within Groups 104.8 12 8.733333
Total 264.9333 14

Since the p-value (0.003831) is less than 𝛼 (0.05), we reject the null hypothesis at
the 5% significance level.

3
We have very strong evidence to support the claim that for the mean reduction in
stress level by medication, exercises and diet, at least one of them is different from the
others.

4
SPSS Lab Exercise

3. The SPSS file, STAT_T09_SPSS_Chi-square.sav, records the happiness level of


people in different income groups. There are 3 levels of happiness and 3 income
groups. Use SPSS to perform the Chi-square Test and see if there is any
association between the two variables.

Steps to perform Chi-square Test:


1) Analyze → Descriptive Statistics → Crosstabs
2) Choose “HAPPINESS” as Row(s) and “INCOME” as Column(s)
3) Click “Statistics”, select “Chi-square” to display results of Chi-square test
4) Click “Cells”, select “Observed”, “Expected” in “Counts” and “Standardized”
in “Residuals”, so that the observed frequency, expected frequency and
standardized residuals are displayed

[Solution]

A summary of results
𝐻0 : There is no association between the income and the happiness levels
𝐻1 : There is such an association

The Pearson Chi-square Test statistic value is 17.426.


The P-value of the Chi-square Test is 0.002.

In the crosstabulation table, the following cells have standardized residuals greater
than or equal to 2, or less than or equal to –2:
Item Income group Happiness level Standardized residual
(i) Low Unhappy 2.0
(ii) High Unhappy -2.1
(iii) High Happy 2.3

In your report

There is a strong association between the income and the happiness levels, as
determined by the Pearson Chi-square Test (𝜒 2 (4, 90) = 17.426, p = .002). It is
found that people with low income are more likely to feel unhappy. People with high
income are less likely to feel unhappy but more likely to feel happy.

5
4. The SPSS file, STAT_T09_SPSS_ANOVA.sav, records the scores of a statistic
test of students from Class A, Class B and Class C. Use SPSS to perform the
ANOVA test and see if there is a significant difference in the test scores of
students in these three classes.

Steps to perform ANOVA test:


1) Analyze → Compare Means → One-way ANOVA
2) Dependent: Test scores
3) Factor: Class of students
4) In Post Hoc, tick “Bonferroni”
5) In Options, tick “Descriptives”

[Solution]

A summary of results
𝐻0 : 𝜇1 = 𝜇2 = 𝜇3
𝐻1 : Not all population means are identical
𝐹 df P-value of the test Decision (𝛼 = 0.05)
11.964 𝑑𝑓1 = 2 0.000023 Reject 𝐻0
𝑑𝑓2 = 95

Post Hoc Tests


Class of students Class of students Sig 95% C.I.
Class A Class B 0.000 [–10.47, –3.21]
Class C 0.462 [–5.96, 1.54]
Class B Class C 0.003 [1.35, 7.91]

In your report

There was a statistically significant difference in the test scores among groups of
students in Class A, Class B and Class C, as determined by one-way ANOVA (F(2,95)
= 11.964, p < .001). A Bonferroni post hoc test revealed that the test scores of Class B
students (M = 75.93, SD = 5.47) was statistically higher than that of Class A students
(M = 69.08, SD = 6.079, p < .001) and Class C students (M = 71.29, SD = 5.896, p
=.003). There was no statistically significant difference in the test scores of Class A
and Class C students. (p =.462).

You might also like