Download Slide 1

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

Degrees of freedom (statistics) wikipedia , lookup

History of statistics wikipedia , lookup

Taylor's law wikipedia , lookup

Bootstrapping (statistics) wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Misuse of statistics wikipedia , lookup

Student's t-test wikipedia , lookup

Transcript
Chapter 23
Inferences About Means
Copyright © 2009 Pearson Education, Inc.
Objectives:

The student will be able to:
 Perform a t-test for the population mean, to
include: writing appropriate hypotheses,
checking the necessary assumptions, drawing
an appropriate diagram, computing the Pvalue, making a decision, and interpreting the
results in the context of the problem.
 Compute and interpret in context a t-based
confidence interval for the population mean,
checking the necessary assumptions.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 3
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  y  
n
Copyright © 2009 Pearson Education, Inc.
Slide 1- 4
Getting Started (cont.)


All we need is a random sample of quantitative
data.
And the true population standard deviation, σ.
 Well, that’s a problem…
Copyright © 2009 Pearson Education, Inc.
Slide 1- 5
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( y)
We’ll do the best we can: estimate the population
parameter σ with the sample statistic s (the
standard deviation of the sample).
s
Our resulting standard error is SE  y  
n
Copyright © 2009 Pearson Education, Inc.
Slide 1- 6
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?
Copyright © 2009 Pearson Education, Inc.
Slide 1- 7
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 Student’s t.
The Student’s t-models form a whole family of related
distributions that depend on a parameter known as
degrees of freedom.
 We often denote degrees of freedom as df, and the
model as tdf.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 8
A Confidence Interval for Means?
A practical sampling distribution model for means
When the conditions are met, the standardized
sample mean
y 
t
SE  y 
follows a Student’s t-model with n – 1 degrees of
freedom.
s
We estimate the standard error with SE  y  
n
Copyright © 2009 Pearson Education, Inc.
Slide 1- 9
A Confidence Interval for Means? (cont.)


When Gosset corrected the model for the extra
uncertainty, the margin of error got bigger.
 Your confidence intervals will be just a bit
wider and your P-values just a bit larger than
they were with the Normal model.
By using the t-model, you’ve compensated for the
extra variability in precisely the right way.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 10
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

n 1
where the standard error of the mean is
y t
 SE  y 
s
SE  y  
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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 11
A Confidence Interval for Means? (cont.)


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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 12
A Confidence Interval for Means? (cont.)


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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 13
Assumptions and Conditions



Gosset found the t-model by simulation.
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-model.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 14
Assumptions and Conditions (cont.)

Independence Assumption:
 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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 15
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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 16
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 sample sizes larger than 40 or 50, the t
methods are safe to use unless the data are
extremely skewed.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 17
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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 18
Finding a confidence interval for the mean when sigma
is known

Stat -> Tests -> #7 Zinterval
 Use this ONLY when sigma is known and the population is
normal:
 A sample of 256 residents of a city indicated a monthly mean
electric bill of $90 with a standard deviation of $24. Construct a
95% confidence interval for the mean monthly electric bill of all
residents.
 Stat…Tests…#7 for Z Interval…enter
 For inpt: choose Stats and fill in the rest of the screen with the
inputted stats.
 You should find the interval is $87.06 - $92.94. We are 95%
confident that the mean electric monthly bill for residents is
between $87.06 and $92.94.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 19
Finding a Confidence Interval for the mean in
general (when sigma is unknown)







Stat -> Tests -> #8 Tinterval
Use this when the population (true) sigma is unknown. Relies on
sample mean and sample standard deviation
The survival times in weeks are given for 20 male rats which were exposed to
a high level of radiation.
152 152 115 109 137 88 94 77 160 165
20
128 123
136 101 62 152 83 69
125
Determine the 95% confidence interval on the mean survival time for rats.
First enter your data in L1 (if you have summary stats skip this)
Tinterval:

Inpt: Data

List: L1

Freq: 1

C-level .95

Result:94.57 weeks to 130.23 weeks.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 20









23. Suppose the elapsed time of airline itineraries between Washington,
D.C. and Boston is normally distributed with an unknown population
mean and an unknown population standard deviation. Further suppose
that a sample of size 25 (therefore, n=25 and degrees of freedom=24)
was taken and the following statistics were gotten from the sample:
sample mean (ybar) =135 and sample standard deviation (s) = 40.
Construct confidence intervals around the sample mean corresponding
to the following confidence levels (express the lower and upper bounds
of the intervals as INTEGERS):
Stat -> Tests -> Tinterval (here we’ll input stats instead of raw data)
Inpt: Stats: x(bar): 135, Sx: 40, n:25, C-level: try .80, .90, .95, .98, & .99
a. 80% (124, 146)
b. 90% (121, 149)
c. 95% (118, 152)
d. 98% (115, 155)
e. 99% (113, 157)
Hint: Your intervals should get wider and wider and should all be
centered around 135.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 21
A Test for the Mean
One-sample t-test for the mean


The assumptions and 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
y  0
tn 1 
SE  y 

The standard error of the sample mean is
s
SE  y  
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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 22
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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 23
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.
What technology could we use?
 The Appendix of ActivStats on the CD
 Any graphing calculator or statistics program
Copyright © 2009 Pearson Education, Inc.
Slide 1- 24
One sample T-test for the mean - TI-83+










Judy is a ad designer who designs the newspaper ads for the Giant grocery store.
Electronic counters at the entrance total the number of people entering the store.
Before Judy was hired, the mean number of people entering every day was 3018.
Since she has started working at the Giant the management thinks that this average
has increased. A random sample of 42 business days gave an average of 3333 people
entering the store daily with a standard deviation of 287. Does this indicate that the
average number of people entering the store every day has increased? Use an alpha
of 0.01.
Stat…. Tests…T-Test
Inpt: choose data or stats according to what is available (usually you use stats)
μ0 : stands for the hypothecated mean which is in your hypothesis In this case we are
testing against the previous 3018.
X bar is the sample mean of 3333
Sx is the standard deviation of 287
n: the number in your sample 42 days
μ : choose the notation used in the alternative hypothesis In this case we are looking
for an increase so choose >
Calculate
We get a p value of .000000006 which is very, very slight. Therefore, we reject the null
hypothesis and conclude that the average number of people entering the store has
certainly increased.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 25






24. Suppose the elapsed time of airline itineraries between Washington, D.C.
and Boston is normally distributed with an unknown population mean and
unknown population standard deviation. Suppose we randomly sample 25
itineraries and the sample average is calculated to be 135 minutes and the
sample standard deviation is calculated to be 40. Further suppose that we
want to test the hypothesis that the true population mean (μ) equals 150
minutes. Conduct 2-sided hypothesis tests with the following alpha levels:
a. 0.20
b. 0.10
c. 0.05
d. 0.02
e. 0.01
H0: µ=150
HA: µ≠150
Test statistic (t) = -1.875
P-value = 0.0730
Conclusions:

a. 0.20
Reject

b. 0.10
Reject

c. 0.05
Don’t Reject

d. 0.02
Don’t Reject

e. 0.01
Don’t Reject
Copyright © 2009 Pearson Education, Inc.
Slide 1- 26
Significance and Importance

Remember that “statistically significant” does not
mean “actually important” or “meaningful.”
 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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 27
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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 28
Intervals and Tests (cont.)


More precisely, a level C confidence interval contains all
of the possible 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 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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 29

25. Hoping to lure more shoppers downtown, a city builds
a new public parking garage. The city plans to pay for the
structure through parking fees. During a two month period
(44 week days) daily fees collected averaged $126 with a
standard deviation of $15. If a consultant claimed that the
average daily income would be $130, should we reject her
claim using alpha=0.10 (perform a 2-sided test)?

H0: µ=130
HA: µ≠130
Test statistic (t): -1.77
P-value: 0.08
Conclusion: Reject the null. It is likely that the
consultant’s claim is false.




Copyright © 2009 Pearson Education, Inc.
Slide 1- 30








26. In 1998, the Nabisco Company announced a “1000
Chips Challenge” claiming that every 18 ounce bag of
Chips Ahoy contained at least 1000 chocolate chips.
Below are the counts of chips in selected bags.
1219 1214 1087 1200 1419 1121 1325 1345
1244 1258 1356 1132 1191 1270 1295 1135
Perform a one-sided test (HA: µ>1000). What does this
evidence say about Nabisco’s claim (let alpha=0.05)?
H0: µ=1000
HA: µ>1000
Test statistic (t) = 10.1
P-Value = tiny #
Conclusion: We can reject the null hypothesis. It
appears that Nabisco’s claim is valid.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 31

27. When consumers apply for credit, their credit is rated
using FICO scores. A random sample of credit ratings is
obtained, and the FICO scores are summarized with
these statistics: n=18, ybar=660.3, s=95.9. Use an alpha
of 0.05 and do a 2-sided hypothesis test to test the claim
that the mean credit score (of the general population) is
equal to 700 (Triola 2008).

H0: µ=700
HA: µ≠700
Test statistic (t) = -1.76
P-Value = 0.097
Conclusion: We cannot reject the null hypothesis.
There is not enough statistical evidence to conclude
that the mean is different than 700.




Copyright © 2009 Pearson Education, Inc.
Slide 1- 32






28. Different cereals are randomly selected, and the sugar
content is obtained for each cereal, with the results given below
for Cheerios, Harmony, Smart Start, Cocoa Puffs, Lucky
Charms, Corn Flakes, Fruit Loops, Wheaties, Cap’n Crunch,
Frosted Flakes, Apple Jacks, Bran Flakes, Special K, Rice
Krispies, Corn Pops, and Trix. Use an alpha of 0.05 to test the
claim of a cereal lobbyist that the mean of all cereals is LESS
than 0.3 g (Triola 2008).
0.03 0.24 0.30 0.47 0.43 0.07 0.47 0.13
0.44 0.39 0.48 0.17 0.13 0.09 0.45 0.43
H0: µ=0.3
HA: µ<0.3
Test statistic (t): -0.12
P-value: 0.45
Conclusion: Fail to reject the null. The statistical analysis
does not back up the lobbyist’s claim.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 33
For Your Information
Copyright © 2009 Pearson Education, Inc.
Slide 1- 34
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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 35
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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 36
Degrees of Freedom

If only we knew the true population mean, µ, we would
find the sample standard deviation as
2
(
y


)

s



n
.
But, we use y instead of µ, though, and that causes a
problem.
2
2
When we use  y  y instead of  y   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.

Copyright © 2009 Pearson Education, Inc.



Slide 1- 37
What Can Go Wrong?
Don’t confuse proportions and means.
Ways to Not Be Normal:
 Beware multimodality.
 The Nearly Normal Condition clearly fails if a
histogram of the data has two or more modes.
 Beware skewed data.
 If the data are very skewed, try re-expressing
the variable.
 Set outliers aside—but remember to report on
these outliers individually.

Copyright © 2009 Pearson Education, Inc.
Slide 1- 38
What Can Go Wrong? (cont.)
…And of Course:
 Watch out for bias—we can never overcome the problems
of a biased sample.
 Make sure data are independent.
 Check for random sampling and the 10% Condition.
 Make sure that data are from an appropriately
randomized sample.
 Interpret 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.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 39
What have we learned?


Statistical inference for means relies on the same
concepts as for proportions—only the mechanics
and the model have changed.
The reasoning of inference, the need to verify
that the appropriate assumptions are met, and
the proper interpretation of confidence intervals
and P-values all remain the same regardless of
whether we are investigating means or
proportions.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 40