Docsity

Two-sample Tests: Comparing Means of Independent Samples, Study notes of Mathematical Statistics

Toggle sidebar
bg1
Stat 312: Lecture 14
Two-sample tests
Moo K. Chung
March 11, 2003
Concepts
1. Let X1,···, Xnand Y1,···, Ymbe two in-
dependent samples with mean µX,µYand
variance σ2
X,σ2
Yrespectively.
E(¯
X−¯
Y) = µX−µY.
Var(¯
X−¯
Y) = σ2
X/n +σ2
Y/m.
2. Let X1,···, Xnand Y1,···, Ymbe two inde-
pendent samples with Xi∼N(µX, σ2
X) and
Yj∼N(µY, σ2
Y). Then
Z=¯
X−¯
Y
qσ2
X/n +σ2
Y/m ∼N(0,1).
3. Assume nand mto be large. The test
statistic for testing
H0:µX=µYvs. H1:µX6=µY
Z=¯
X−¯
Y
qσ2
X/n +σ2
Y/m ∼N(0,1).
In-class problems
Example 1. A study was conducted to compare
the reaction times of men and women to a stim-
ulus. 12 men and 9 women were employed in
the experiment. Let Xibe the reaction time
of the i-th man and Yjbe the reaction time of
the j-th woman. There is a reason to believe
that Xi∼N(µX,0.18) and Yj∼N(µY,0.14).
We want to test if the population means are the
same. The following measurements were taken:
¯x= 3.6 seconds, ¯y= 3.8 seconds. Is there any
difference between the reaction times of men and
women?
> z=(3.6-3.8)/sqrt(0.18/12+0.14/9)
> z
[1] -1.144155
Example 2. A study was conducted to compare
the reaction times of men and women to a stim-
ulus. 50 men and 65 women were employed in
the experiment. Let Xibe the reaction time
of the i-th man and Yjbe the reaction time of
the j-th woman. The following measurements
were taken: ¯x= 3.6 seconds, ¯y= 3.8 seconds,
s2
X= 0.18, s2
Y= 0.14. Is there any difference
between the reaction times of men and women?
> z=(3.6-3.8)/sqrt(0.18/50+0.14/65)
> z
[1] -2.63664
> qnorm(0.025)
[1] -1.959964
What is the main reason you are getting the
different results in Example 1 and 2?
Self-study problems
Determine the P-value in Example 1 and 2.

Partial preview of the text

Download Two-sample Tests: Comparing Means of Independent Samples and more Study notes Mathematical Statistics in PDF only on Docsity!

Stat 312: Lecture 14

Two-sample tests

Moo K. Chung

[email protected]

March 11, 2003

Concepts

  1. Let X 1 , · · · , Xn and Y 1 , · · · , Ym be two in- dependent samples with mean μX , μY and variance σ X^2 , σ Y^2 respectively.

E( X¯ − Y¯ ) = μX − μY.

Var( X¯ − Y¯ ) = σ X^2 /n + σ Y^2 /m.

  1. Let X 1 , · · · , Xn and Y 1 , · · · , Ym be two inde- pendent samples with Xi ∼ N(μX , σ X^2 ) and Yj ∼ N(μY , σ^2 Y ). Then

Z =

X¯ − Y¯

√ σ^2 X /n + σ^2 Y /m

∼ N(0, 1).

  1. Assume n and m to be large. The test statistic for testing

H 0 : μX = μY vs. H 1 : μX 6 = μY

Z =

X¯ − Y¯

√ σ^2 X /n + σ^2 Y /m

∼ N(0, 1).

In-class problems

Example 1. A study was conducted to compare the reaction times of men and women to a stim- ulus. 12 men and 9 women were employed in the experiment. Let Xi be the reaction time of the i-th man and Yj be the reaction time of the j-th woman. There is a reason to believe that Xi ∼ N(μX , 0 .18) and Yj ∼ N(μY , 0 .14). We want to test if the population means are the

same. The following measurements were taken: x¯ = 3.6 seconds, ¯y = 3.8 seconds. Is there any difference between the reaction times of men and women?

z=(3.6-3.8)/sqrt(0.18/12+0.14/9) z [1] -1.

Example 2. A study was conducted to compare the reaction times of men and women to a stim- ulus. 50 men and 65 women were employed in the experiment. Let Xi be the reaction time of the i-th man and Yj be the reaction time of the j-th woman. The following measurements were taken: ¯x = 3.6 seconds, ¯y = 3.8 seconds, s^2 X = 0.18, s^2 Y = 0.14. Is there any difference between the reaction times of men and women?

z=(3.6-3.8)/sqrt(0.18/50+0.14/65) z [1] -2. qnorm(0.025) [1] -1.

What is the main reason you are getting the different results in Example 1 and 2?

Self-study problems

Determine the P -value in Example 1 and 2.