Lecture 25 - people.stat.sfu.ca

Download Report

Transcript Lecture 25 - people.stat.sfu.ca

Statistics 270– Lecture 25
Cautions about Z-Tests
•
•
•
•
Data must be a random sample
Outliers can distort results
Shape of the population distribution matters (large and small
samples?)
For significance tests, there is a difference between practical and
statistical significance
Types of Errors in a Significance Test
•
Suppose that the null hypothesis is true, we could collect a sample
that suggests that we reject H0
•
Suppose that H0 is not true, we could fail to reject the null
hypothesis
Inference About the Population Mean
•
To make inference about the population mean, m, we have used the
z-test
•
Key feature: s is known
•
Most often, s is unknown!
•
•
s must be estimated from the data
Use
to estimate s
Inference About the Population Mean
•
To make probability statements about the the sample mean, we
have used the Z-statistic when s is known
•
When s is unknown, we use the one-sample t-statistic with (n-1)
degrees of freedom
Inference About the Population Mean
•
Standard error:
•
Degrees of freedom:
One Sample t-Test for a Population Mean
•
•
•
Data: random sample x1, x2, …, xn
Mean, m, is unknown
Standard deviation is unknown
•
For testing the hypothesis H0: m=m0
•
Test Statistic:
•
t
x  m0
s/ n
Degrees of freedom: t has a t-distribution with n-1 degrees of
freedom
One Sample t-Test for a Population Mean
•
Computing p-value depends on the alternate hypothesis:
Alternate hypothesis
H1: m  m 0
H1: m  m 0
H1: m  m 0
•
P-Value
P (T  t )
P (T  t )
2 P(T  t )
P-values are exact if the population distribution is normal and
approximately correct for large samples in other cases
One Sample t-Test for a Population Mean
Rule of Thumb
•
For n<15, use t-test if data appear approximately normal
•
For n 15, can use t-test when no outliers
•
For large n (say n 40), can safely use t-test
•
Note: always require random sample!
Example
•
Composition of earth’s atmosphere has changed over time
•
Gas bubbles in ancient amber are examined to study the nature of
the atmosphere long ago
•
Measurements on specimens of amber from the Cretaceous period
(75-95 million years ago) give the following percentages of
nitrogen
63.4
65.0
64.4
63.3
54.8
64.5
60.8
49.1
51.0
Example
•
Assume the data are a random sample from the Cretaceous period
•
To see if there is a difference with today’s 78.1% nitrogen, conduct
a hypothesis test using these data
Column 1
70
65
60
55
50
45
Example
•
Hypotheses:
•
Test Statistic
•
P-value
•
Conclusion