# Test on Pairs of Means – Case I

```Test on Pairs of Means – Case I
• Suppose X 1 , ..., X n 1 are iid N  x ,  x2  independent of Y1 , ..., Yn that
2
2
are iid N  y , y  .
2
2
• Further, suppose that n1 and n2 are large or that  x and  y are known.
• We are interested in testing H0: μx = μy versus a one sided or a two
sided alternative…
• Then,…
week 10
1
Test on Pairs of Means – Case II
• Suppose X 1 , ..., X n are iid N  x ,  x2  independent of Y1 , ..., Yn that are
iid N  y , y2 .
2
1
• Further, suppose that n1 and n2 are small and that  x2 and  y2 are
unknown but we assume they are equal to σ2.
• We are interested in testing H0: μx - μy = δ versus a one sided or a
two sided alternative…
• Then,…
week 10
2
Example
• The strength of concrete depends, to some extent, on the method
used for drying it. Two drying methods were tested on
independently specimens yielding the following results…
• We can assume that the strength of concrete using each of these
methods follows a normal distribution with the same variance.
• Do the methods appear to produce concrete with different mean
strength? Use α = 0.05.
week 10
3
Test on Pairs of Means – Case III
• Suppose X 1 , ..., X n are iid with E(Xi ) = &micro;x and Var(Xi) = σx
independent of Y1 , ..., Yn that are iid with E(Yi ) = &micro;y and Var(Yi) = σy
1
2
• Further, suppose that n1 and n2 are both large.
• We are interested in testing H0: μx - μy = δ versus a one sided or a
two sided alternative…
• Then,…
week 10
4
Test on Two Proportions
• Suppose X 1 , ..., X n are iid Bernoulli(θ1) independent of Y1 , ..., Yn
that are iid Bernoulli(θ2).
1
2
• Further, suppose that n1 and n2 are large.
• We are interested in testing H0: θ1 = θ2 versus a one sided or a two
sided alternative…
• Then,…
week 10
5
Example
week 10
6
Paired Observations
• In a matched pairs study, subjects are matched in pairs and the
outcomes are compared within each matched pair. The experimenter
can toss a coin to assign two treatment to the two subjects in each
pair. One situation calling for match pairs is when observations are
taken on the same subjects, under different conditions.
• A match pairs analysis is needed when there are two measurements
or observations on each individual and we want to examine the
difference. This corresponds to the case where the samples are not
independent.
• For each individual (pair), we find the difference d between the
measurements from that pair. Then we treat the di as one sample and
use the one sample t test and confidence interval to estimate and test
the difference between the treatments effect.
week 10
7
Example
• Seneca College offers summer courses in English. A group of 20
students were given the TOFEL test before the course and after the
course. The results are summarized in the next slide.
• Find a 95% CI for the average improvement in the TOFEL score.
• Test whether attending the course improve the performances on the
TOFEL.
week 10
8
Data Display
Row
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Student
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Pretest
30
28
31
26
20
30
34
15
28
20
30
29
31
29
34
20
26
25
31
29
Posttest
29
30
32
30
16
25
31
18
33
25
32
28
34
32
32
27
28
29
32
32
improvement
-1
2
1
4
-4
-5
-3
3
5
5
2
-1
3
3
-2
7
2
4
1
3
week 10
9
• One sample t confidence interval for the improvement
T-Test of the Mean
Test of mu = 0.000 vs mu &gt; 0.000
Variable
N
Mean
StDev
SE Mean
improvemt 20
1.450
3.203
0.716
T
2.02
P
0.029
• MINITAB commands for the paired t-test
Stat &gt; Basic Statistics &gt; Paired t
Paired T-Test and Confidence Interval
Paired T for Posttest – Pretest
N
Mean
StDev
SE Mean
Posttest
20
28.75
4.74
1.06
Pretest
20
27.30
5.04
1.13
Difference
20
1.450
3.203
0.716
95% CI for mean difference: (-0.049, 2.949)
T-Test of mean difference=0 (vs &gt; 0):
T-Value = 2.02 P-Value = 0.029
week 10
10
6
Frequency
5
4
3
2
1
0
-4
-2
0
2
4
6
8
improvement
Character Stem-and-Leaf Display
Stem-and-leaf of improvement
Leaf Unit = 1.0
2
-0 54
4
-0 32
6
-0 11
8
0 11
(7)
0 2223333
5
0 4455
1
0 7
week 10
N
= 20
11
Test for a Single Variance
• Suppose X1, …, Xn is a random sample from a N(μ, σ2) distribution.
• We are interested in testing H 0 :  2   02 versus a one sided or a
two sided alternative…
• Then…
week 10
12
Test on Pairs of Variances
• Suppose X 1 , ..., X n are iid N  x ,  x2  independent of Y1 , ..., Yn 2 that
are iid N  y , y2  .
1
• We are interested in testing H 0 :  x2   y2 versus a one sided or a two
sided alternative…
• Then…
week 10
13
Example
week 10
14
```