Name: AP Stats Chapter 23-25 Notes Chapter 23: Inference About

advertisement
Name: ________________________________
AP Stats Chapter 23-25 Notes
Chapter 23: Inference About Means
Getting Started
 Now that we know how to create confidence intervals and test hypotheses about
proportions, it’d be nice to be able to do the same for ______________.
 Just as we did before, we will base both our confidence interval and our hypothesis
test on the sampling distribution model.
 The ________________________________________ told us that the sampling
distribution model for means is Normal with mean μ and standard deviation
 All we need is a random sample of quantitative data.
 And the true population standard deviation, σ.
 Well, that’s a problem…
 Proportions have a link between the proportion value and the standard deviation of
the sample proportion.
 This is not the case with means—knowing the sample mean tells us nothing about
 We’ll do the best we can: estimate the population parameter σ with the sample
statistic s.
s
 Our resulting standard error is SE  y  
n
 We now have extra variation in our standard error from s, the sample standard
deviation.
 We need to allow for the extra variation so that it does not mess up the
margin of error and P-value, especially for a small sample.
 And, the _________________ of the sampling model changes—the model is no
longer Normal. So, what is the sampling model?
SD( y)
Gosset’s t
 William S. Gosset, an employee of the Guinness Brewery in Dublin, Ireland, worked
long and hard to find out what the sampling model was.
 The sampling model that Gosset found has been known as ___________________.
 The Student’s t-models form a whole family of related distributions that depend on
a parameter known as __________________________________.
 We often denote degrees of freedom as df, and the model as tdf.
A Confidence Interval for Means?
A practical sampling distribution model for means
y 
When the conditions are met, the standardized sample mean t 
SE  y 
follows a Student’s t-model with n – 1 degrees of freedom.
We estimate the standard error with SE  y  
1
s
n
 When Gosset corrected the model for the extra uncertainty, the margin of error
got _____________________.
 Your confidence intervals will be just a bit ______________ and your Pvalues just a bit _______________ than they were with the Normal model.
 By using the _________________, you’ve compensated for the extra variability in
precisely the right way.
 When the conditions are met, we are ready to find the confidence interval for the
________________________________ μ.
s
 The confidence interval is y  tn1  SE  y 
SE  y  
where the standard error of the mean is
n
*
 The critical value n1 depends on the particular ______________________, C,
that you specify and on the number of ________________________________,
n – 1, which we get from the sample size.
 Student’s t-models are __________________, _____________________, and
_________________________, just like the Normal.
 But t-models with only a few degrees of freedom have much _______________
tails than the Normal. (That’s what makes the margin of error bigger.)
t
 As the degrees of freedom increase, the t-models look more and more like the
_________________________.
 In fact, the t-model with infinite degrees of freedom is exactly Normal.
Assumptions and Conditions
 Gosset found the t-model by _________________________.
 Years later, when Sir Ronald A. Fisher showed mathematically that Gosset was
right, he needed to make some assumptions to make the proof work.
 We will use these assumptions when working with Student’s t.
 Independence Assumption:
 _____________________________________. The data values should be
independent.
 _____________________________________: The data arise from a
random sample or suitably randomized experiment. Randomly sampled data
(particularly from an SRS) are ideal.
2
 __________________________: When a sample is drawn without
replacement, the sample should be no more than 10% of the population.
 Normal Population Assumption:
 We can never be certain that the data are from a population that follows a
Normal model, but we can check the
 ______________________________: The data come from a distribution
that is unimodal and symmetric.
 Check this condition by making a histogram or Normal probability
plot.
 ______________________________:
 The ___________________ the sample size (n < 15 or so), the more
closely the data should follow a Normal model.
 For ___________________ sample sizes (n between 15 and 40 or
so), the t works well as long as the data are unimodal and reasonably
symmetric.
 For ____________________ sample sizes, the t methods are safe
to use unless the data are extremely skewed.
Finding t-Values By Hand
 The Student’s t-model is different for each
value of degrees of freedom.
 Because of this, Statistics books usually have
one table of t-model critical values for selected
confidence levels.
 Alternatively, we could use technology to
find t critical values for any number of degrees
of freedom and any confidence level you need.
 What technology could we use?
 The Appendix of ActivStats on the CD
 Any graphing calculator or statistics program
Just Checking
 Every 10 years, the United States takes a census. The census tries to count every
resident. There are two forms, known as the “short form,” answered by most
people, and the “long form,” slogged through by about one in six or seven households
chosen at random. According to the Census Bureau, “…each estimate based on the
long form responses has an associated confidence interval.”
3
1.
Why does the Census Bureau need a confidence interval for long-form information
but not for the questions that appear on the long and short forms?
2.
Why must the Census Bureau base these confidence intervals on t-models?
The Census Bureau goes on to say, “These confidence intervals are wider…for geographic
areas with smaller populations and for characteristics that occur less frequently in the
area being examined (such as the proportion of people in poverty in a middle-income
neighborhood).”
3. Why is this so? For example, why should a confidence interval for the mean amount
families spend monthly on housing be wider for a sparsely populated area of farms in the
Midwest than for a densely populated area of an urban center? How does this formula
show this will happen?
To deal with this problem, the Census Bureau reports long-form data only for “…geographic
areas from which about two hundred or more long forms were completed- which are large
enough to produce good, quality estimates. If smaller weighting areas had been used, the
confidence intervals around the estimates would have been significantly wider, rendering
many estimates less useful…”
4. Suppose the Census Bureau decided to report on areas from which only 50 long forms
were completed. What effect would that have on a 95% confidence interval for, say, the
mean cost of housing? Specifically, which values used in the formula for the margin of
error would change? Which would change a lot and which would change only slightly?
5. Approximately how much wider would that confidence interval based on 50 forms be the
one based on 200 forms?
More Cautions About Interpreting Confidence Intervals
 Remember that ________________________ of your confidence interval is key.
 What NOT to say:
 “90% of all the vehicles on Triphammer Road drive at a speed between 29.5
and 32.5 mph.”
 “We are 90% confident that a randomly selected vehicle will have a speed
between 29.5 and 32.5 mph.”
4

“The mean speed of the vehicles is 31.0 mph 90% of the time.”

“90% of all samples will have mean speeds between 29.5 and 32.5 mph.”
 DO SAY:
 “90% of intervals that could be found in this way would cover the true
value.”
 Or make it more personal and say, “I am 90% confident that the true mean
is between 29.5 and 32.5 mph.”
Make a Picture, Make a Picture, Make a Picture
 __________________________________ tell us far more about our data set
than a list of the data ever could.
 The only reasonable way to check the Nearly Normal Condition is with
___________________ of the data.
 Make a histogram of the data and verify that its distribution is unimodal and
symmetric with no outliers.
 You may also want to make a Normal probability plot to see that it’s
reasonably straight.
A Test for the Mean
_____________________________________________
 The conditions for the one-sample t-test for the mean are the same as for the onesample t-interval.
y  0
 We test the hypothesis H0:  = 0 using the statistic tn 1 
SE  y 
 The standard error of the sample mean is SE  y  
s
n
 When the conditions are met and the null hypothesis is __________, this statistic
follows a Student’s t model with n – 1 df. We use that model to obtain a P-value.
Significance and Importance
 Remember that “______________________________” does not mean
“_______________________________” or “_______________________.”
 Because of this, it’s always a good idea when we test a hypothesis to check
the confidence interval and think about likely values for the mean.
5
Just Checking
In discussing estimates based on the long-form samples, the Census Bureau notes, “The
disadvantage…is that…estimates of characteristics that are also reported on the short
form will not match the [long-form estimates]”
The short-form estimates are values from a complete census, so they are “true” valuessomething we don’t usually have when we do inference.
6. Suppose we use long-form data to make 95% confidence intervals for the mean age of
residents for each of 100 of the Census-defined areas. How many of these 100 intervals
should we expect will fail to include the true mean age (as determined from the complete
short-form Census data)?
7. Based only on the long-form sample, we might test the null hypothesis about the mean
household income of a region. Would the power of the test increase or decrease if we used
an area with more long forms?
Intervals and Tests
 ___________________________ and _____________________________ are
built from the same calculations.
 In fact, they are complementary ways of looking at the same question.
 The confidence interval contains all the null hypothesis values we can’t
reject with these data.
 More precisely, a level C confidence interval contains _____ of the plausible null
hypothesis values that would _____ be rejected by a two-sided hypothesis text at
alpha level 1 – C.
 So a 95% confidence interval matches a ________ level two-sided test for
these data.
 Confidence intervals are naturally __________________, so they match exactly
with two-sided hypothesis tests.
 When the hypothesis is ____________________, the corresponding alpha
level is (1 – C)/2.
Sample Size
 To find the sample size needed for a particular confidence level with a particular
s
margin of error (ME), solve this equation for n: ME  tn1
n
 The problem with using the equation above is that we don’t know most of the values.
We can overcome this:
 We can use s from a small pilot study.
 We can use z* in place of the necessary t value.
6
 Sample size calculations are never exact.
 The margin of error you find _______________ collecting the data won’t
match exactly the one you used to find n.
 The sample size formula depends on quantities you won’t have until you collect the
data, but using it is an important first step.
 Before you collect data, it’s always a good idea to know whether the sample size is
_____________________________ to give you a good chance of being able to
tell you what you want to know.

Degrees of Freedom
( y   )2
 If only we knew the true population mean, µ,
s
.
n
we would find the sample standard deviation as
 But, we use ______ instead of µ, though, and that causes a problem.
 When we use ___________________ instead of __________________ to
calculate s, our standard deviation estimate would be too small.
 The amazing mathematical fact is that we can compensate for the smaller sum
exactly by dividing by n – 1 which we call the degrees of freedom.
What Can Go Wrong?
 Don’t confuse _____________________ and ____________________.
Ways to Not Be Normal:
 Beware of __________________________.
 The Nearly Normal Condition clearly fails if a histogram of the data has two
or more modes.
 Beware of ___________________________.
 If the data are very skewed, try re-expressing the variable.
 Set ____________________ aside—but remember to report on these outliers
individually.
…And of Course:
 Watch out for __________—we can never overcome the problems of a biased
sample.
 Make sure data are _________________________.
 Check for random sampling and the 10% Condition.
 Make sure that data are from an appropriately ____________________ sample.
…And of Course, again:
 ____________________ your confidence interval correctly.
 Many statements that sound tempting are, in fact, misinterpretations of a
confidence interval for a mean.
 A confidence interval is about the mean of the population, not about the
means of samples, individuals in samples, or individuals in the population.
7
Chapter 24: Comparing Means
Plot the Data
 The natural display for comparing two groups is
boxplots of the data for the two groups,
placed side-by-side. For example:
Comparing Two Means
 Once we have examined the side-by-side boxplots, we can turn to the
______________________________________.
 Comparing two means is not very different from
__________________________.
 This time the parameter of interest is the difference between the two means, 1 –
2.
 Remember that, for independent random quantities, variances ___________.
 So, the standard deviation of the difference between two sample means is
 12  22
SD  y1  y2  

n1 n2
 We still don’t know the true _______________________ of the two groups, so
we need to estimate and use the standard error
s12 s22
SE  y1  y2  
n1

n2
 Because we are working with means and estimating the standard error of their
difference using the data, we shouldn’t be surprised that the sampling model is a
Student’s t.
 The confidence interval we build is called a
_________________________________ (for the difference in means).
 The corresponding hypothesis test is called a
_______________________________.
Sampling Distribution for the Difference Between Two Means
 When the conditions are met, the standardized sample difference between the
means of two independent groups
 y1  y2   1  2 
t
SE  y1  y2 
can be modeled by a Student’s t-model with a number of degrees of freedom found with a
special formula.
s12 s22
SE
y

y


 1 2
 We estimate the standard error with
n1
n2
Assumptions and Conditions
 ___________________________________ (Each condition needs to be checked
for both groups.):
8
 _______________________________: Were the data collected with
suitable randomization (representative random samples or a randomized
experiment)?
 _______________________________: We don’t usually check this
condition for differences of means. We will check it for means only if we
have a very small population or an extremely large sample.
 _____________________________________:
 __________________________________ This must be checked for
both groups. A violation by either one violates the condition.
 _____________________________________: The two groups we are
comparing must be independent of each other. (See Chapter 25 if the groups are
not independent of one another…)
Two-Sample t-Interval
When the conditions are met, we are ready to find the confidence interval for the
difference between means of two independent groups, 1 – 2.

The confidence interval is  y1  y2  tdf  SE  y1  y2 
s2 s2
SE  y1  y2   1  2
where the standard error of the difference of the means is
n1 n2
The critical value t*df depends on the particular __________________________,
C, that you specify and on the number of ____________________________, which we
get from the sample sizes and a special formula.
Degrees of Freedom
 The special formula for the degrees of freedom
for our t critical value is a bear:
df 
 s12 s22 
  
 n1 n2 
2
2
1  s12 
1  s22 
  
 
n1  1  n1  n2  1  n2 
2
 Because of this, we will let technology calculate degrees of freedom for us!
Just Checking
Carpal tunnel syndrome (CTS) causes pain and tingling in the hand, sometimes bad enough
to keep sufferers awake at night and restrict their daily activities. Researchers studied
the effectiveness of two alternative surgical treatments for CTS. Patients were randomly
assigned to have endoscopic or open-incision surgery. Four weeks later the endoscopic
surgery patients demonstrated a mean pinch strength of 9.1 kg compared to 7.6 for openincision patients.
1. Why is the randomization of the patients into the two treatments important?
2. A 95% confidence interval for the difference in mean strength is about (0.04 kg,
2.96 kg). Explain what this interval means.
9
3. Why might we want to examine such a confidence interval in deciding between
those two surgical procedures?
4. Why might you want to see the data before trusting the confidence interval?
Testing the Difference Between Two Means
 The hypothesis test we use is the __________________________________.
 The conditions for the two-sample t-test for the difference between the means of
two independent groups are ________________ as for the two-sample t-interval.
A Test for the Difference Between Two Means
 We test the hypothesis H0:1 – 2 = 0, where the hypothesized difference, 0, is
almost always 0, using the statistic
 y1  y2    0
t
 The standard error is
SE  y1  y2  
2
1
SE  y1  y2 
2
2
s
s

n1 n2
 When the conditions are met and the null hypothesis is true, this statistic can be
closely modeled by a Student’s t-model with a number of degrees of freedom given
by a special formula. We use that model to obtain a P-value.
 Recall the experiment comparing patients 4 weeks after surgery for carpal tunnel
syndrome. The patients who had endoscopic surgery demonstrated a mean pitch
strength of 9.1 kg compared to 7.6 kg for the open-incision patients.
5. What hypothesis would you test?
6. The P-value is less than 0.05. State a brief conclusion.
7. The study reports work on 36 “hands,” but there were only 26 patients. In fact, 7 of
the endoscopic surgery patients had both hands operated on, as did 3 of the open-inclusion
group. Does this alter your thinking about any of the assumptions? Explain.
Back Into the Pool
 Remember that when we know a proportion, we know its
__________________________.
 Thus, when testing the null hypothesis that two proportions were equal, we
could assume their _____________________ were equal as well.
 This led us to pool our data for the hypothesis test.
 For means, there is also a pooled t-test.
10
 Like the two-proportions z-test, this test assumes that the variances in the
two groups are _________________.
 But, be careful, there is ________________ between a mean and its
standard deviation…
 If we are willing to assume that the variances of two means are equal, we can pool
the data from two groups to estimate the common variance and make the degrees
of freedom formula much simpler.
 We are still estimating the pooled standard deviation from the data, so we use
Student’s t-model, and the test is called a ____________________________
_____________________________________________.
*The Pooled t-Test
 If we assume that the variances are equal, we can estimate the common variance
from the numbers we already have: 2
n1  1s12  n2  1s22
s pooled 
n1  1 n2  1
1
1

 Substituting into our standard error formula, we get: SE pooled  y1  y2   s pooled
n1 n2
 Our degrees of freedom are now df = n1 + n2 – 2.
*The Pooled t-Test and Confidence Interval for Means
 The conditions for the pooled t-test and corresponding confidence interval are the
same as for our earlier two-sample t procedures, with the additional assumption
that the variances of the two groups are the same.
 For the hypothesis test, our test statistic is
 y1  y2    0
t
SE pooled  y1  y2 
which has df = n1 + n2 – 2.
 Our confidence interval is  y1  y2  tdf  SE pooled  y1  y2 
Is the Pool All Wet?
 So, when should you use pooled-t methods rather than two-sample t methods?
___________________________
 Because the advantages of pooling are small, and you are allowed to pool only rarely
(when the equal variance assumption is met), don’t.
 ____________________________________________
Why Not Test the Assumption That the Variances Are Equal?
 There is a hypothesis test that would do this.
 But, it is very sensitive to failures of the assumptions and works poorly for small
sample sizes—just the situation in which we might care about a difference in the
methods.
11
 So, the test does not work when we would need it to.
Is There Ever a Time When Assuming Equal Variances Makes Sense?
 _________. In a randomized comparative experiment, we start by assigning our
experimental units to treatments at random.
 Each treatment group therefore begins with the same
__________________________.
 In this case assuming the variances are equal is still an assumption, and there are
conditions that need to be checked, but at least it’s a
________________________.
What Can Go Wrong?
 Watch out for _________________________.
 The Independent Groups Assumption deserves special attention.
 If the samples are not independent, you can’t use two-sample methods.
 Look at the ____________________.
 Check for outliers and non-normal distributions by making and examining
boxplots.
Chapter 25: Paired Samples and Blocks
Paired Data
 Data are _________________ when the observations are collected in pairs or the
observations in one group are naturally related to observations in the other group.
 Paired data arise in a number of ways. Perhaps the most common is to
________________ subjects with themselves before and after a treatment.
 When pairs arise from an experiment, the pairing is a type of
__________________.
 When they arise from an observational study, it is a form of
__________________.
 If you know the data are paired, you can (and must!) take advantage of it.
 To decide if the data are _____________________, consider how they
were collected and what they mean (check the W’s).
 There is no ___________ to determine whether the data are paired.
 Once we know the data are paired, we can examine the ________________
differences.
 Because it is the _________________________ we care about, we treat
them as if they were the data and ignore the original two sets of data.
 Now that we have only one set of data to consider, we can return to the simple onesample t-test.
12
 Mechanically, a _______________________________ is just a one-sample ttest for the means of the pairwise differences.
 The sample size is the number of pairs.
Assumptions and Conditions
 Paired Data Assumption:
 ___________________________________: The data must be paired.
 _______________________________________:
 ___________________________________: The differences must be
independent of each other.
 ___________________________________: Randomness can arise in
many ways. What we want to know usually focuses our attention on where
the randomness should be.
 ___________________________________: When a sample is obviously
small, we may not explicitly check this condition.
 ________________________________________: We need to assume that the
population of differences follows a Normal model.
 ___________________________________: Check this with a histogram
or Normal probability plot of the differences.
The Paired t-Test
 When the conditions are met, we are ready to test whether the paired differences
_______________________________ from zero.
 We test the hypothesis H0: d = 0, where the d’s are the pairwise differences and
0 is almost always 0.
d  0
 We use the statistic tn 1 
where n is the number of pairs.

SE d 
sd
SE d 
n is the ordinary standard error for the mean applied to the
differences.
 When the conditions are met and the null hypothesis is true, this statistic follows a
Student’s t-model on n – 1 degrees of freedom, so we can use that model to obtain a
P-value.
Confidence Intervals for Matched Pairs
 When the conditions are met, we are ready to find the confidence interval for the
mean of the paired differences.

 The confidence interval is d  tn 1  SE d
sd
where the standard error of the mean difference is SE d 


n
The critical value t* depends on the particular confidence level, C, that you specify
and on the degrees of freedom, n – 1, which is based on the number of pairs, n.
13
Blocking
 Consider estimating the mean difference in age
between husbands and wives.
 The following display is worthless. It does no
good to compare all the wives as a group with all the
husbands—we care about the paired differences.
 In this case, we have paired data—
each husband is paired with his respective wife.
The display we are interested in is the
difference in ages:
 ______________________ removes the extra variation that we saw in the sideby-side boxplots and allows us to concentrate on the variation associated with the
difference in age for each pair.
 A paired design is an example of ________________________.
Just Checking
Think about each of the situations described below.
 Would you use a two-sample t or paired-t method (or neither)? Why?
 Would you perform a hypothesis test or find a confidence interval?
4. Forty-eight overweight subjects are randomly assigned to either aerobic or stretching
exercise programs. They are weighed at the beginning and at the end of the experiment to
see how much weight they lost.
a. We want to estimate the mean amount of weight lost by those doing aerobic
exercise.
b. We want to know which program is more effective at reducing weight.
5. Couples at a dance club were separated and each person is asked to rate the band. Do
men or women like this band more?
What Can Go Wrong?
 Don’t use a _____________________________ for paired data.
 Don’t use a _____________________________ when the samples aren’t paired.
 Don’t forget __________________—the outliers we care about now are in the
differences.
 Don’t look for the _________________________________ means of paired
groups with side-by-side boxplots.
14
15
Download