Download - Means Independent Samples: Comparing Means
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Independent Samples:Comparing Means
Lecture 38Section 11.4
Robb T. Koether
Hampden-Sydney College
Fri, Nov 7, 2008
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Outline
1 Homework Review
2 The Sampling Distribution of x1 − x2
3 An Example Using z
4 When σ1 and σ2 are Unknown
5 An Example Using t
6 Hypothesis Testing for µ1 − µ2 on the TI-83
7 Assignment
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Homework Review
Exercise 11.6, page 677.
For each of the following research questions, brieflydescribe how you might design a study to address thequestion (discuss whether paired or independent sampleswould be obtained):(a) Do sophomore students seek the advice of an academic
advisor more often than freshmen students?(b) Will taking a one-hour Kaplan SAT prep course improve
test scores on average by 30 points?(c) For twins, is the first born taller on average as compared
to the second born when they reach the adult age of 18?
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Homework Review
Solution(a) It would be easier to do this with independent samples.
You would gather a sample of freshmen and a sample ofsophomores.You would find the proportion of students in each samplewho sought the advice of an academic advisor.Compare the difference of the sample proportions to 0.
This cannot be done easily with paired data.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Homework Review
Solution(b) This, too, would be easier to do this with independent
samples although it would be better to use paired data.You would gather a sample of students who had takenthe Kaplan SAT prep course and a sample of studentswho had not.You would find the average score on the SAT test foreach sample.Then compare the difference of the sample means to 30.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Homework Review
Solution(b) To do it using paired data
You would have to gather one sample of students andgive them the SAT test.Then run them through the Kaplan SAT prep course andthen give them the SAT test again.For each student, compute the difference between histwo scores.Then compare the average of the differences to 0.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Homework Review
Solution(c) This study would naturally be done using paired
samples.Gather a sample of 18-year-old twins (both twins in eachcase).For each pair, measure the heights of both twins.Find the difference for each pair.Compare the average of the differences to 0.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
The Distribution of x1 − x2
Now let’s consider two populations.Population 1 has mean µ1 and standard deviation σ1.Population 2 has mean µ2 and standard deviation σ2.We wish to compare µ1 and µ2.We do so by taking samples and comparing samplemeans x1 and x2.This means that we need to know the distribution ofx1 − x2?
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
The Distribution of x1 − x2
For large sample sizes, we know that
x1 is N(µ1,
σ1√n1
)and
x2 is N(µ2,
σ2√n2
)Therefore, x1 − x2 has mean and standard deviation
µx1−x2 = µ1 − µ2,
σx1−x2 =
√σ2
1n1
+σ2
2n2. . .
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
The Distribution of x1 − x2
. . . And
x1 − x1 is N
µ1 − µ2,
√σ2
1n1
+σ2
2n2
.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
The Distribution of x1 − x2
Therefore,
z =(x1 − x1)− (µ1 − µ2)√
σ21
n1+ σ2
2n2
.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
The Distribution of x1 − x2
Use z ifσ1 and σ2 are known and the populations are normal.The populations are not normal, but the sample sizesare large (whether or not σ1 and σ2 are known).
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Example
Example (Testing hypotheses concerning µ1 − µ2)
A new drug is introduced. Is it better than the old drug?A group of 40 patients was given the new drug and agroup of 60 patients was given the old drug.Time until recovery (in days) was measured for eachpatient.
New Drug (# 1) Old Drug (# 2)n1 = 40 n2 = 60x1 = 5.4 x2 = 6.8s1 = 1.8 s2 = 1.3
Test the hypotheses at the 5% level of significance.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Example
Example (Testing hypotheses concerning µ1 − µ2)
(1) µ1 = average time to recovery for the new drug.µ2 = average time to recovery for the old drug.H0 : µ1 − µ2 = 0.H1 : µ1 − µ2 < 0.
(2) α = 0.05.(3) The test statistic:
z =(x1 − x2)− (µ1 − µ2)√
s21
n1+ s2
2n2
.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Example
Example (Testing hypotheses concerning µ1 − µ2)
(4) Compute z:
z =(5.4− 6.8)− 0√
1.82
40 + 1.32
60
=−1.4
0.3304= −4.237.
(5) p-value = normalcdf(-E99,-4.237) = 1.132× 10−5.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Example
Example (Testing hypotheses concerning µ1 − µ2)
(6) Reject H0.(7) The average time to recovery for the new drug is less
than it is for the old drug. That is, the new drug is moreeffective than the old drug.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
When σ1 and σ2 are Unknown
What if σ1 and σ2 are unknown?Then we substitute s1 and s2 as approximations forthem.Whenever we use s1 and s2 instead of σ and thepopulations are normal, then we will have to use the tdistribution instead of the standard normal distribution,unless the sample sizes are large.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
When σ1 and σ2 are Unknown
The formula for t that we end up with will be muchsimpler if we make one more assumption:
Assume that σ1 = σ2.To make this assumption, we need evidence.Sufficient evidence will be that s1 and s2 are pretty closeto each other.Let σ represent the common value of σ1 and σ2.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Estimating σ
Under this assumption, we can simplify the formula forσx1−x2 .
σx1−x2 =
√σ2
1n1
+σ2
2n2
=
√σ2
n1+σ2
n2
= σ
√1n1
+1n2
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Estimating σ
Individually, s1 and s2 estimate σ.However, we can get a better estimate for σ than eitherone of these if we “pool” s1 and s2 together.The pooled estimate for σ is
sp =
√(n1 − 1)s2
1 + (n2 − 1)s22
n1 + n2 − 2
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
x1 − x2 and the t Distribution
The number of degrees of freedom is
df = df1 + df2 = n1 + n2 − 2.
So the test statistic is
t =(x1 − x2)− (µ1 − µ2)
sp
√1n1
+ 1n2
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Example
Example (Testing µ1 = µ2 using t)
Suppose we test the new drug on only 8 patients andthe old drug on 16 patients.We record the number of days until recovery for eachindividual.The results are
New Drug (#1) Old Drug (#2)x1 = 5.3 x2 = 6.4s1 = 1.4 s2 = 2.0n1 = 8 n2 = 16
Test the hypothesis that the new drug is better, using a1% significance level.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Example
Example (Testing µ1 = µ2 using t)
(1) Let µ1 = average time to recovery for the new drug.Let µ2 = average time to recovery for the old drug.H0 : µ1 = µ2H1 : µ1 < µ2
(2) α = 0.01.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Example
Example (Testing µ1 = µ2 using t)
(3) The test statistic is
t =(x1 − x2)− (µ1 − µ2)
sp
√1n1
+ 1n2
with df = n1 + n2 − 2.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Example
Example (Testing µ1 = µ2 using t)
(4) Compute
sp =
√7s2
1 + 15s22
22= 1.831
andt =
(5.3− 6.4)− 0
1.831√
18 + 1
16
=−1.1
0.7928= −1.387.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Example
Example (Testing µ1 = µ2 using t)
(5) The number of degrees of freedom isdf = df1 + df2 = 22, so the p-value is
p-value = P(t22 < −1.387)= tcdf(-E99,-1.387,22)
= 0.0897.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Example
Example (Testing µ1 = µ2 using t)
(6) The p-value is much bigger than α, so we accept H0.(7) The new drug is no more effective than the old drug.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
The TI-83 - Means of Independent Samples
TI-83 Two-sample z or t testEnter the data from the first sample into L1.Enter the data from the second sample into L2.Press STAT > TESTS.Choose either 2-SampZTest or 2-SampTTest,depending on the circumstances.Choose Data or Stats.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
The TI-83 - Means of Independent Samples
TI-83 Two-sample z or t testProvide the information that is requested.2-SampTTest will ask whether to use a pooledestimate of σ. Answer yes.Select Calculate and press ENTER.
Note that you are not asked for the hypotheticaldifference between µ1 and µ2.The TI-83 assumes that the null hypothesis isH0 : µ1 = µ2.That is, the hypothetical difference is always 0.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
The TI-83 - Means of Independent Samples
TI-83 Two-sample z or t testThe display shows, among other things, the value of thetest statistic (z or t) and the p-value.It also shows, for the t test, the value of the pooledestimate sp.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
An Example
PracticeRework the previous example using the TI-83.
IndependentSamples:
ComparingMeans
Robb T.Koether
HomeworkReview
The SamplingDistribution ofx1 − x2
An ExampleUsing z
When σ1 andσ2 areUnknown
An ExampleUsing t
HypothesisTesting forµ1 − µ2 onthe TI-83
Assignment
Assignment
HomeworkRead Section 11.4, pages 695 - 712 (skip confidenceintervals for now).Let’s Do It! 11.6.Exercises 26(omit c), 27(omit d), 28, 29, 31, 32, page713.