chapter 23 notes
Download
Report
Transcript chapter 23 notes
AP Statistics
Chapter 23
Inference for
Means
Objectives:
•
•
•
•
The t-Distributions
Degrees of Freedom (df)
One-Sample t Confidence Interval for Means
One-Sample t Hypothesis Test for 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 means.
• Just as we did before, we will base both our confidence interval
and our hypothesis test on the sampling distribution model.
• The Central Limit Theorem told us that the sampling distribution
model for means is Normal with mean μ and standard deviation
SD x
n
Getting Started (cont.)
• All we need is a random sample of quantitative
data.
• And the true population standard deviation, σ.
– Well, that’s a problem…
Getting Started (cont.)
• 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
SD x
• We’ll do the best we can: estimate the population parameter σ
with the sample statistic s.
s
• Our resulting standard error is SE x
n
• In order to standardize ̅x, we subtract its mean and divide by its
standard deviation. Z has the normal distribution N(0,1).
Getting Started (cont.)
• 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 shape of the sampling model changes—the
model is no longer Normal. So, what is the sampling
model?
t - Distributions
• When we do not know σ, we substitute the
s
standard error n of x for its standard
deviation
. The resulting test statistic does
n
not have a normal distribution, but has a
t – distribution.
t - Distributions
• Unlike the standard normal distribution, there is
a different t – distribution for each sample size n.
• When We describe a t – distribution we must
identify its degrees of freedom (df).
• df = n-1
• We write the t – distribution with k degrees of
freedom as t(k) for short.
Properties of the
t – Distribution.
• The model of the t – distributions are similar in shape to the
standard normal curve. They are symmetric about zero, singlepeaked, and bell-shaped.
• The spread of the t – distributions is a bit greater than that of the
standard normal distribution.
– The t – distributions have more probability in the tails and less in the
center than does the standard normal.
– This is true because substituting the estimate s for the fixed parameter σ
introduces more variation into the statistic.
• As the degrees of freedom k increase, the t(k) model approaches
the Standard Norm. Dist. N(0,1) curve ever more closely.
– This happens because s estimates σ more accurately as the sample size
increases.
Properties of the
t – Distribution.
• Student’s t-models are unimodal, symmetric, and
bell shaped, just like the Normal.
• But t-models with only a few degrees of freedom
have much fatter tails than the Normal. (That’s
what makes the margin of error bigger.)
Properties of the
t – Distribution
• As the degrees of freedom increase, the t-models look more and
more like the Normal.
• In fact, the t-model with infinite degrees of freedom is exactly
Normal.
Properties of the
t – Distribution
Finding t-Values By Hand
• The Student’s t-model
is different for each
value of degrees of
freedom.df
• Because of this,
Statistics books usually
have one table of tmodel critical values for
selected confidence
levels.
Finding t-Values By Hand
(cont.)
• The critical value t – use Table T to find, enter
table with probability p or Confidence level C.
The table gives the t* with probability p lying to
its right and probability C lying between –t* and
t*.
Table T - t*
Finding t*
• Suppose you want to construct a 90% confidence
interval for the mean of a population based on an
SRS of size n=15. What critical value t* should
you use?
Solution
• In Table T, consult the
row corresponding to
df = 14. Move across
that row to the entry
that is directly above
90% (p of .05)CI on
the bottom of the chart.
The desired critical
value is t*=1.761.
Finding t-Values By
Hand (cont.)
• Alternatively, we could use technology to find t
critical values for any number of degrees of
freedom and any confidence level you need.
• The TI-84 calculator contains an inverse t
function that works much the same as invNorm
function. t* = invT (area to the left of t*, df).
A Confidence Interval for
Means? (cont.)
One-sample t-interval for the mean
• When the conditions are met, we are ready to find the confidence
interval for the population mean, μ.
• The confidence interval is
x tn1 SE x
s
where the standard error of the mean is SE x
n
• The critical value tn*1 depends on the particular confidence
level, C, that you specify and on the number of degrees of
freedom, n – 1, which we get from the sample size.
• Remember, the t-table uses the area to the left of the critical
value.
One sample t procedures are
exactly correct only when the
population is Normal.
• It must be reasonable to assume that the
population is approximately normal in order to
justify the use of t procedures. The t procedures
are strongly influenced by outliers. Always
check the data first! If there are outliers and the
sample size is small, the results will not be
reliable.
When to use t
procedures:
• If the sample size is less than 15, only use t
procedures if the data are close to normal.
• If the sample size is at least 15 but less than 40,
only use t procedures if the data is unimodal and
reasonably symmetric.
• If the sample size is at least 40, you may use t
procedures, even if the data is skewed.
Assumptions and Conditions
(cont.)
• Independence Assumption:
– The data values should be independent.
– Randomization Condition: The data arise from a random
sample or suitably randomized experiment. Randomly
sampled data (particularly from an SRS) are ideal.
– 10% Condition: When a sample is drawn without
replacement, the sample should be no more than 10% of the
population.
Assumptions and Conditions
(cont.)
• 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
– Nearly Normal Condition: The data come from a
distribution that is unimodal and symmetric.
• Check this condition by making a histogram or
Normal probability plot.
Assumptions and Conditions
(cont.)
– Nearly Normal Condition:
• The smaller the sample size (n < 15 or so), the
more closely the data should follow a Normal
model.
• For moderate sample sizes (n between 15 and 40
or so), the t works well as long as the data are
unimodal and reasonably symmetric.
• For larger sample sizes, the t methods are safe to
use unless the data are extremely skewed.
One Sample t Confidence
Interval for Means
• The confidence interval for the population
s
SE x
mean is: x tn 1 SE x
n
• The values come from the sample.
• The critical value t* depends on the particular
confidence level, C, that you specify and on the
number of degrees of freedom, n-1.
Example: t Confidence
Interval
• Some AP Statistics students are concerned about safety near an
elementary school. Though there is a 25 MPH SCHOOL ZONE
sign nearby, most drivers seem to go much faster than that, even
when the warning sign flashes. The students randomly selected 20
flashing zone times during the school year, noted the speeds of the
cars passing the school during the flashing zone times, and
recorded the averages. They found that the overall average speed
during the flashing school zone times for the 20 time periods was
24.6 mph with a standard deviation of 7.24 mph. Find a 90%
confidence interval for the average speed of all vehicles passing the
school during those hours. A histogram of their data is roughly
symmetric and unimodal, with no strong skewness or outliers.
Solution - PANIC
Parameter
μ: mean speed during the flashing school zone times
Assumptions
Randomization Condition – Yes (it is a random selection of days from
the year).
10% Condition (10n ≤ N) – Yes (it is reasonable to assume that at least
200 flashing zone times exist during
the school year since the sign flashes
both morning and afternoon).
Nearly Normal Condition – Yes (n = 20 sample size moderate, the
distribution shows roughly
symmetric and unimodal, no strong
skew or outliers).
Solution
Name
one sample t-interval
Interval
df = n-1 = 20-1 = 19 and the 90% t* = 1.729
90% CI: (21.8,27.4)
Conclusion in context
We are 90% confident that the true mean speed of cars passing the
school when the warning sign is flashing is between 21.8 and 27.4 mph.
Your Turn:
• A SRS of 75 male adults living in a particular
suburb was taken to study the amount of time
they spent per week doing rigorous exercises. It
indicated a mean of 73 minutes with a standard
deviation of 21 minutes. Find the 95%
confidence interval of the mean for all males in
the suburb.
Ti-83/84 Calculator
• One-sample t Confidence
Interval
– STAT/TESTS/TInterval
• Stats
– x : sample mean
–
–
–
–
Sx: sample standard deviation
n: sample size
C-Level: confidence level
Calculate:
• One-sample t Confidence
Interval
– STAT/TESTS/TInterval
• Data
–
–
–
–
List:
Freq:
C-Level:
Calculate
Example: Use TI-84
• Environmentalists, government officials, and vehicle manufacturers are all
interested in studying the auto exhaust emissions produced by motor vehicles.
The major pollutants in auto exhaust from gasoline engines are hydrocarbons,
monoxide, and nitrogen oxides (NOX). The table gives the NOX levels (in
grams per mile) for a random sample of light-duty engines of the same type.
1.28
1.17
1.16
1.08
0.60
1.32
1.24
0.71
0.49
1.38
1.20
0.78
0.95
2.20
1.78
1.83
1.26
1.73
1.31
1.80
1,15
0.97
1.12
0.72
1.31
1.45
1.22
1.32
1.47
1.44
0.51
1.49
1.33
0.86
0.57
1.79
2.27
1.87
2.94
1.16
1.45
1.51
1.47
1.06
2.01
1.39
• Construct a 95% confidence interval for the mean amount of NOX emitted by
light-duty engines of this type.
Solution
• Place the data in L1
• STAT/TESTS/TInterval
– Data
•
•
•
•
List: L1
Freq: 1
C-Level: .95
Calculate
• 95% Confidence Interval (1.185, 1.473)
• We are 95% confident that the true mean level of NOX emitted
by this type of light-duty engine is between 1.185 and 1.473
grams/mile.
More Cautions About Interpreting
Confidence Intervals
• Remember that interpretation of your confidence
interval is key.
• 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
• Pictures 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 graphs 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
One-sample t-test for the mean
• The conditions for the one-sample t-test for the mean are the
same as for the one-sample t-interval.
• We test the hypothesis H0: = 0 using the statistic
x 0
tn 1
SE x
• The standard error of the sample mean is SE x
s
n
• When the conditions are met and the null hypothesis is true, this
statistic follows a Student’s t model with n – 1 df. We use that
model to obtain a P-value.
Example: One-Sample t
Hypothesis Test for Mean
• A recent report on the evening news stated that teens watch an average of 13
hours of TV per week. A teacher at Central High School believes that the
students in her school actually watch more than 13 hours per week. She
randomly selects 25 students from the school and directs them to record their
TV hours for one week. The 25 students reported the following number of
hours:
5
5
6
18
23
13
0
18
20
5
23
11
0
25
22
13
24
6
14
20
23
20
11
22
11
• Is there enough evidence at the 5% significance level to support the teacher’s
claim?
Solution PHANTOMS
Parameter
μ: the mean number of hours of TV, teens watch per week
Hypothesis
H0: μ = 13
Ha: μ > 13
Assumptions
Randomization Condition – Yes (stated the students were randomly selected).
10% Condition – Yes (reasonable to think there are more than 250 students in
the school).
Nearly Normal Condition – Yes (n=30, 15<n<40, graph histogram and sketch,
shows no outliers or strong skewness).
Solution
Name
One sample t-test
Test Statistic
𝑥 = 14.32,
𝑠𝑥 = 7.96,
𝑥−𝜇
14.32 − 13
𝑡=
=
= .908
𝑠𝑥 𝑛
7.96 30
Obtain p-value
df = 29, p-value = P(t > .908) = .186
Make decision
p-value of .186 > .05, reject the null hypothesis.
State conclusion in context
The p-value of .186 is not significant at the 5% significance level ( .186 > .05).
Therefore, we fail to reject the null hypothesis. There is not enough evidence to
conclude that the true mean hours of TV viewing per week for students in this
school is greater than 13 hours.
Your Turn:
• The belief is that the mean number of hours per
week of part-time work of high school seniors in
a city is 10.6 hours. Data from a SRS of 50
seniors indicated that their mean number of
hours of part-time work was 12.5 with a standard
deviation of 1.3 hours. Test whether these data
cast doubt on the current belief (α=.05).
Intervals and Tests
• Confidence intervals and hypothesis tests 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.
Intervals and Tests
(cont.)
• More precisely, a level C confidence interval contains
all of the plausible null hypothesis values that would
not be rejected by a two-sided hypothesis test at alpha
level
1 – C.
– So a 95% confidence interval matches a 0.05 level twosided test for these data.
• Confidence intervals are naturally two-sided, so they
match exactly with two-sided hypothesis tests.
– When the hypothesis is one sided, the corresponding alpha
level is (1 – C)/2.
Sample Size
• To find the sample size needed for a particular
confidence level with a particular margin of error
(ME), solve this equation for n:
ME t
n 1
s
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.
Sample Size (cont.)
• Sample size calculations are never exact.
– The margin of error you find after 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 large enough to give you a
good chance of being able to tell you what you want to
know.