chapter 11 & 12 - Bibb County Schools

Download Report

Transcript chapter 11 & 12 - Bibb County Schools

Section 13.1
COMPARING TWO MEANS
What’s the difference between
what we did “yesterday” and
what we are doing today????

In the previous chapter we were
performing inference on a single
population. Now we are comparing
two populations or two treatments.
This is a much more common objective
in the practice of statistics.
Pulse Rate Experiment







Choose a card
Record the letter from the card on a piece of
paper
Calculate your pulse rate (beats per min.)
Record your pulse rate on the same piece of
paper
Teacher will calculate average rates for the two
groups
DID YOU KNOW?
The letter on the card influences your pulse
rate!
Pulse Rate Experiment Continued
Don’t believe it? Look at the differences
and you can see that the two groups are
different.
 Am I right? How can we tell?

Assumptions for Inference when
Comparing Two Means
1.
2.
3.
The data comes from TWO SRSs from TWO distinct
populations.
Observations from both populations have a normal
distribution with unknown means (1 & 2) and
unknown standard deviations (σ1 & σ2 ). While this
is ideal, in practice, it is enough that the distributions
have similar shapes and that there are no outliers.
The samples should be independent of one another.
When sampling without replacement, we also want
each population to be at least 10 times as big as its
respective sample.

z
Two-Sample z Statistic
vs.
Two-Sample t Statistic
x1  x2  ( 1  2 )

2
1
n1

t


2
2
n2
x1  x2  ( 1  2 )
2
1
NOTE : SEx1  x2
2
2
s
s

n1 n2

x1  x2
2
1
2
2
s
s

n1 n2
s12 s22


n1 n2
Two-Sample t Procedures
The two-sample t statistic DOES NOT, in
general, have a t distribution.
 These procedures always err on the safe side,
reporting HIGHER P-values and LOWER
confidence than may actually be true. The gap
between what is reported and the truth is quite
small unless the samples sizes are both small
and unequal.

ROBUSTNESS
Recall, one-sample t procedures were robust
against the Normality assumption provided
there were no outliers or extreme skewness
 The two-sample t procedures are more robust
than the one-sample t methods, particularly
when the distributions are not symmetric.
 This is particularly true when the samples are
the same size and the two population
distributions have similar shape. (even for
samples as small as 5)
 Therefore . . .

This is when we use the
two-sample t procedures





Remember, it is best for samples sizes to be equal so
ALWAYS choose equal samples sizes if you can.
It’s more important for the data to be
SRSs from the populations than the populations have
normal distributions
If n1 + n2 < 15, the data must be normal to use tprocedures
If n1 + n2 ≥ 15, the t-procedures can be used except
if there are outliers or strong skewness
If n1 + n2 ≥40, t-procedures can be used even in the
presence of strong skewness (outliers still bad)
t Statistic





2
1
2
2
s
s

n1 n2
The statistic does not have a normal distribution
IT ALSO DOES NOT HAVE A t-DISTRIBUTION
Degrees of freedom: TWO METHODS


x1  x2    1  2 

t
smaller of n1-1 and n2-1 (this gives more conservative results)
complex formula (which yields very accurate approximations)
Recall, when subtracting two random variables, the
variances still add
t statistic says how far x1  x2 is from its mean 1  2 in
standard deviation units
Degrees of Freedom
There are two methods, both of which are conservative
enough that the true P-value or fixed significance level
will always be equal to or less than the value
calculated from t(k)
 More Conservative Method


df=the smaller of n1-1 and n2-1
Less Conservative Method (using technology)

This formula is what is used by technology such as your
calculator to obtain a more accurate, but still conservative
2
result
2
2
 s1 s2 
  
n1 n2 

df 
2
2
2
2
1  s1 
1  s2 
  
 
n1  1  n1  n2  1  n2 
Confidence Intervals
 x1  x2  ± t*


2
1
2
2
s s

n1 n2
t* is the upper (1-C)/2 critical value for the t(k)
distribution with k being the smaller of n1-1 and
n2-1 (unless using technology)
Recall, this will yield a conservative interval
The Steps for a
TWO-SAMPLE t-TEST
State the hypothesis and name test
1.
Ho:  1 = 
2
(You may see this as  1-  2 = 0)
Ha:  1 ‹, ›, or ≠ 
(You may see this as  1-  2 ‹, ›, or ≠ 0)
State and verify your assumptions
Calculate the P value and other important values
2.
3.
-
Done in calculator or…
Book:
-
4.
2
Using Table C, look in the df (k) column and then look
across the line to find the range of probabilities the t
statistic falls in
State Conclusions (Both statistically and contextually)
- The smaller the p-value, the greater the evidence is to
reject Ho
When should we use the
Pooled Two-Sample t Procedures?
NEVER!
Always
choose NO when asked.
Pooling can only be justified when the two populations
have the same variance.
 The advantage of pooling is that it has exactly the t
distribution with n1 + n2 – 2 degrees of freedom if the
two variances really are equal. They usually aren’t.

Example: Effects of light on plant growth
In an experiment to study the effect of the spectrum of the
ambient light on the growth of plants, researchers assigned
tobacco seedlines at random to two groups of eight plants
each. The plants were grown in a greenhouse under
identical conditions except for lighting. The experimental
group was grown under blue light, the control group under
natural light. Here is the data on stem growth (in mm).
Control Group
4.3 4.2 3.9 4.1 4.1 4.2 3.8 4.1
(Natural Light)
Experimental
3.1 2.9 3.2 3.2 2.7 2.9 3.0 3.1
(Blue Light)
Construct and interpret a 90% confidence interval
for the difference in mean plant growth.
Step 1—Parameters

This is a two-sample situation. Call plants
grown under natural light Population 1 and
plants grown under blue light Population 2.
Then the corresponding parameters are 1=
mean stem growth of tobacco plants under
natural light and 2 = mean stem growth of
tobacco plants under blue light. We want to
estimate the amount by which blue light
reduces stem growth during this period, 1-2
Step 2—Conditions




We will construct a two-sample t interval for the difference
in means if the conditions are satisfied.
SRS—The data were produced in a randomized
comparative experiment, so we should be able to attribute
any significant difference in means to the difference in
treatments. We do not know if these seedlings are
representative of the population of all seedlings of this
type of plant, which may limit our ability to generalize.
Normality—We also need to know that the two population
distributions are approximately Normal. Boxplots and
Normal probability plots of the sample data give us no
reason to doubt the validity of this condition.
Independence—The random assignment helps ensure that
we have two independent samples of growth
measurements.
Step 3—Calculations (more conservative)
Population
1
2
Sample
Size
8
8
Sample
Mean
4.0875
3.0125
Sample
Variance
0.0270
0.0298
There are 7 degrees of freedom, because n1-1 and
n2-1 are 7. The 90% confidence interval with df=7
uses t* = 1.895. The resulting confidence interval
for the difference 1 - 2 between the population
means is
s12 s22
0.0270 0.0298
( x1  x2 )  t *
  (4.09  3.01)  1.895

n1 n2
8
8
 1.08  0.16  (0.92,1.24)
Step 3—Calculations (less conservative)
Population
1
2
Sample
Size
8
8
Sample
Mean
4.0875
3.0125
Sample
Variance
0.0270
0.0298
There are 13.9646 degrees of freedom based on the
complex formula used by the calculator. The 90%
confidence interval with df=13.9646 uses t* =
1.7616. The resulting confidence interval for the
difference 1 - 2 between the population means is
s12 s22
0.0270 0.0298
( x1  x2 )  t *
  (4.09  3.01)  1.7616

n1 n2
8
8
 (0.92658,1.2234) from calculator
Step 4—Interpretation
We are 90% confident that the reduction
in average stem growth due to the blue
light is between 0.92 and 1.24 millimeters.
 We have this confidence because if we
were to repeat this process over and over
again, 90% of all created intervals would
capture the true difference in growth.

A two-sample t Test
on the same example information

Parameters: Ho: 1 = 2


Null hyp. is that tobacco plants will not grow any differently
under blue light versus natural light.
Alt. hyp. is that the light will impact growth.
P-value=.000000004
 df = 13.9646

Ha: 1 ≠ 2
t
x1  x2
2
1
2
2
 12.7595
s
s

n1 n2
We can confidently reject Ho due to the extremely low
P-value (if truly no difference, nearly no chance of
seeing difference of 1.08)
 Tobacco plants appear to have a distinctly different
growth rate in blue light versus natural light.
