Download 7.1 Comparing Two Population Means: Independent Sampling

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
University of California, Davis
Department of Statistics
Summer Session II
Statistics 13
September 4, 2012
Date of latest update: August 29
Lecture 7: Comparing Population Means
7.1 Comparing Two Population Means: Independent Sampling
Properties of the Sampling Distribution of (x̄1 − x̄2 )
1. The mean of the sampling distribution of (x̄1 − x̄2 ) is (µ1 − µ2 ).
2. If the two samples are independent, the standard deviation of the sampling distribution is
s
σ2 σ2
σ(x1 −x2 ) = ( 1 + 2 )
n1 n2
where σ12 and σ22 are the variances of the two populations being sampled and n1
and n2 are the respectively sample sizes. We also refer to σ(x1 −x2 ) as the standard
error of the statistic (x̄1 − x̄2 ).
3. By the central limit theorem, the sampling distribution of (x̄1 − x̄2 ) is approximately
normal for large samples.
7.1.1 Large Sample Confidence Interval for (µ1 − µ2 )
s
σ12 σ22
+
n1 n2
s
s21
s2
+ 2
n1 n2
(x̄1 − x̄2 ) ± zα/2 σ(x̄1 −x̄2 ) = (x̄1 − x̄2 ) ± zα/2
≈ (x̄1 − x̄2 ) ± zα/2
Large-Sample Test of Hypothesis for (µ1 − µ2 )
One-Tailed Test
Two-Tailed Test
H0 : (µ1 − µ2 ) = D0
H0 : (µ1 − µ2 ) = D0
Ha : (µ1 − µ2 ) < D0
Ha : (µ1 − µ2 ) =
6 D0
[or Ha : (µ1 − µ2 ) > D0 ]
where D0 = Hypothesized difference between the means (this difference is often hypothesized to be equal to 0)
1
Test statistic: z =
(x̄1 −x̄2 )−D0
σ(x̄1 −x̄2 )
where σ(x̄1 −x̄2 ) =
Rejection region: z < −zα
or z > zα when Ha : (µ1 − µ2 ) > D0
q
σ12
n1
+
σ22
n2
≈
q
s21
n1
+
s22
n2
Rejection region: |z| > zα/2
Conditions Required for Valid Large-Sample Inferences about (µ1 − µ2 )
1. The two samples are randomly selected in an independent manner from the two
target populations.
2. The sample sizes, n1 and n2 , are both large (i.e., n1 ≥ 30 and n2 ≥ 30). (By the
central limit theorem, this condition guarantees that the sampling distribution of
(x̄1 − x̄2 ) will be approximately normal, regardless of the shapes of the underlying
probability distributions of the populations. Also, σ12 and σ22 will provide good
approximations to σ12 and σ22 when both samples are large.)
7.1.2 Small-Sample Confidence Interval for (µ1 − µ2 ): Independent Samples
s 1
1
(x̄1 − x̄2 ) ± tα/2 s2p
+
n1 n2
(n −1)s2 +(n −1)s2
2
1
2
where s2p = 1 (n1 +n
2 −2)
and tα/2 is based on (n1 + n2 − 2) degrees of freedom.
Small-Sample Test of Hypothesis for (µ1 − µ2 ): Independent Samples
One-Tailed Test
H0 : (µ1 − µ2 ) = D0
Ha : (µ1 − µ2 ) < D0
[or Ha : (µ1 − µ2 ) > D0 ]
Two-Tailed Test
H0 : (µ1 − µ2 ) = D0
Ha : (µ1 − µ2 ) 6= D0
Test statistic:
t=
(x̄ −x̄ )−D0
r 1 2
s2p n1 + n1
1
Rejection region: t < −tα
or t > tα when Ha : (µ1 − µ2 ) > D0
2
Rejection region: |t| > tα/2
where tα and tα/2 are based on (n1 + n2 − 2) degrees of freedom.
Conditions Required for Valid Small-Sample Inferences about (µ1 − µ2 )
1. The two samples are randomly selected in an independent manner from the two
target populations.
2. Both sampled populations have distributions that are approximately normal.
3. The population variances are equal (i.e., σ12 = σ22 ).
2
7.1.3 Approximate Small-Sample Procedures when σ12 6= σ22
Equal Sample Sizes (n1 = n2 = n)
p
2
2
Confidence interval:
(x̄1 − x̄2 ) ± tα/2
p (s1 + s2 )/n
Test statistic for H0 : (µ1 − µ2 ) = 0 : t = (x̄1 − x̄2 )/ (s21 + s22 )/n
where t is based on v = n1 + n2 − 2 = 2(n − 1) degrees of freedom.
Unequal Sample Sizes (n1 6= n2 )
Confidence interval:
Test statistic for H0 : (µ1 − µ2 ) = 0 :
p
2
2
(x̄1 − x̄2 ) ± tα/2
p (s1 /n1 ) + (s2 /n2 )
t = (x̄1 − x̄2 )/ (s21 /n1 ) + (s22 /n2 )
where t is based on degrees of freedom equal to
v=
(s21 /n1 + s22 /n2 )2
(s21 /n1 )2
n1 −1
+
(s22 /n2 )2
n2 −1
Note: The value of v will generally not be an integer. Round v down to the nearest
integer to use the t-table.
7.2 Comparing Two Population Means: Paired Difference Experiments
Paired Difference Confidence Interval for µd = µ1 − µ2
Large Sample
Small Sample
sd
σd
x̄d ± zα/2 √ ≈ x̄d ± zα/2 √
nd
nd
sd
x̄d ± tα/2 √
nd
where tα/2 is based on (nd − 1) degrees of freedom.
3
Paired Difference Test of Hypothesis for µd = µ1 − µ2
One-Tailed Test Two-Tailed Test
H0 : µd = D0
H0 : µd = D0
Ha : µd < D0
Ha : µd 6= D0
[or Ha : µd > D0 ]
Large Sample
Test statistic: z =
x̄d −D0
√
σd / nd
≈
x̄d −D0
√
sd / n d
Rejection region: z < −zα
or z > zα when Ha : µd > D0
Small Sample
Test statistic: t =
Rejection region: |z| > zα/2
x̄d −D0
√
sd / nd
Rejection region: t < −tα
or t > tα when Ha : µd > D0
Rejection region: |t| > tα/2
where tα and tα/2 are based on (nd − 1) degrees of freedom
Conditions Required for Valid Large-Sample Inferences about µd
1. A random sample of differences is selected from the target population of differences.
2. The sample size nd is large (i.e., nd ≥ 30). (By the central limit theorem, this
condition guarantees that the test statistic will be approximately normal, regardless
of the shape of the underlying probability distribution of the population.)
Conditions Required for Valid Small-Sample Inferences about µd
1. A random sample of differences is selected from the target population of differences.
2. The population of differences has a distribution that is approximately normal.
4
7.3 Determining the Sample Size
Determination of Sample Size for Comparing Two Means
Independent Random Samples
To estimate (µ1 − µ2 ) to within a given sampling error SE and with confidence level
(1 − α), use the following formula to solve for equal sample sizes that will achieve the
desired reliability:
(zα/2 )2 (σ12 + σ22 )
n1 = n2 =
(SE)2
You will need to substitute estimates for the values of σ12 and σ22 before solving for the
sample size. These estimates might be sample variances s21 and s22 from prior sampling
(e.g., a pilot study), or from an educated (and conservatively large) guess based on the
range – that is, s ≈ R/4.
Paired Difference Experiment
To estimate µd to within a given sampling error SE and with confidence level (1 − α), use
the following formula to solve for nd that will achieve the desired reliability:
(zα/2 )2 σd2
nd =
(SE)2
You will need to substitute an estimate of σd2 before solving for the sample size. This
estimate might be the sample variance s2d from prior sampling (e.g., a pilot study), or
from an educated (and conservatively large) guess based on the range – that is, sd ≈ R/4.
5
Related documents