You are on page 1of 4

Lab 3

1. (Two sample t)
Example 1. To test whether or not newly directed reading activities in the classroom
will help students improve their reading ability. An educator selects 21 students from
the third grade to take part in these activities. A control classroom of 23 third-graders
follows the same curriculum without the activities. At the end of the experiment, all
participants are given a Degree of Reading Power (DRP) test, which measures the
aspects of reading ability that the treatment is designed to improve. The data appear
in Table 7.4

(a) Test directed reading activity improves the DRP score.


Answer: Two sample one-sided test. The test statistic tcalc = 2.31. Use two
different degrees of freedom for the test.
i. By manual calculation, df = min(n1 1, n2 1).
p value = P (tdf =20 2.31) = 0.016
ii. By Minitab or formula
2
s21
s22
+
n1 n2
df =
 2 2
 2 2
1
s1
1
s2
+
n1 1 n1
n2 1 n2


we have df = 37,
p value = P (t(37) 2.31) = 0.013

(b) Construct a 95% confidence interval for (1 2 ).


Answer:
Similarly, with two different degrees of freedom, we have two different results.
Using degrees of freedom min(n1 1, n2 1), we have (1.0, 18.9);
Using another df, we have (1.23, 18.68).
Remark 0.1. The formula to use is as follows
Suppose that an SRS of size n1 is drawn from one population with mean 1 ; and the other
SRA of size n2 is drawn from another population with mean 2 .
To test the equality of two population means with unequal variances
H0 : 1 = 2
compute the two-sample t statistic
x1 x2
tcalc = s
s21
s2
+ 2
n1 n2
Use p-value P (Tdf > tcalc ), P (Tdf < tcalc ), or 2P (Tdf > |tcalc |), or critical values for
decision making, with T following t distribution with degrees of freedom given by
2
s21
s22
+
n1 n2
df =
 2 2
 2 2
1
s1
1
s2
+
n1 1 n1
n2 1 n2


Alternatively, conservatively, df can also use the smaller of n1 1 and n2 1.


The confidence interval for 1 2 is
s
s21
s2
(
x1 x2 ) t ,df
+ 2
2
n1 n2
where t ,df has t distribution with the df equal to the values discussed above.
2

(c) Practice the test of the difference between means using Minitab
Answer:
Input data
Select Stat Basic Statistics 2- Sample t . . .
2

In the 2-Sample t (Test and Confidence Interval) window, select the


Samples in different columns button. Enter C1 in the First window and C2
in the Second window. Check/uncheck the Assume equal variances box.
Click the Options button. Be sure that the Test difference window is set
to 0.0 and the Alternative window is set correctly. Click OK twice. The
result appears in the Session Window.
2. (Non-parametric: matched pair)
Remark 0.2. In the non-parametric test for matched pairs,
If there are zeros in the differences, then those zeros are dropped from the data
before ranking, and the size n is the number of nonzero differences within pairs.
If there are tied values in the differences, then those tied values receive the average
of their ranks.
Example 2. A matched pairs study had the following scores to record improvements
between treatment and after treatment for 20 patients.
2 0 6 6 3 3 2
6 6 3 0 1 1 0

3 -6 6
2 3 3

Compute W +
Answer:
Rank 17 non-zero differences
Diff:
1
1 2 2
Order: 1
2 3 4
Rank: 1.5 1.5 4 4

2 3
3
3
3
3
3
6
6
6
6
6
6
5 6
7
8
9
10 11
12
13
14
15
16
17
4 8.5 8.5 8.5 8.5 8.5 8.5 14.5 14.5 14.5 14.5 14.5 14.5

This gives W + = 138.5


Using Minitab to find the test result:
Input the differences
Select Select Stat Nonparametrics 1- Sample Wilcoxon . . .
Example 3. A project measures heart rates before and after exercise. Here are the
data for five subjects. For each subjects, we give the resting heart rate before the
exercise, and the heart rate after the exercise.

Subject
1
2
3
4
5

sport
Resting
60
90
87
78
84

1
Final
75
99
93
87
84

Do the exercise of the sport raise heart rate significantly? Test at 5% level of significance.
Answer:

H0 : The distribution of the heart rate are the same before and after the sport.
Ha : The heart rate after sport is systematically higher.
The test statistic W + = 10 (The first four differences are positive, and the fifth
is 0, so we drop it)


9.5 5
p value = P (W 9.5) = P Z
= P (Z 1.64) = 0.0505
2.739
With = 5%, it is not significant to claim that the heart rate increases.

You might also like