Download PowerPoint - Penn State Department of Statistics

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

Regression toward the mean wikipedia , lookup

Confidence interval wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Transcript
STATISTICS 200
Lecture #23
Tuesday, November 8, 2016
Textbook: 13.1 through 13.4
Objectives:
• Formulate null and alternative hypotheses involving
population means
• Calculate T-statistics (for means) instead of Z-statistics (for
proportions); determine correct degrees of freedom.
• Determine correct test procedure from context of problem.
• Identify potential errors that can occur in hypothesis testing;
distinguish between type I and type II errors.
Statistical Hypotheses
Null Hypothesis, H0:
• Nothing happening
• No change /
difference
Alternative Hypothesis, Ha:
• Something is happening
• There is a change /
difference
Five steps for a statistical hypothesis test
1. Formulate null and alternative
hypotheses.
2. (Verify necessary data conditions and)
summarize data into a test statistic.
3. Find a p-value.
4. Make a decision.
5. Report the conclusion in context.
H0 and Ha
Z = ___ or T= ___
p = ____
Reject H0 or
fail to reject H0
We conclude
that…
General test statistic formula:
An example from Lecture 18: A test for one proportion
A sample of 300 drivers from the 16–24 age
group found 105 who say that they have
driven while drowsy in the last year. Have
more than 30% of this age group driven
while drowsy in the past year?
Check: Both n*p-hat and n*(1–p-hat) are 10.
An example from Lecture 18: A test for
one proportion
H0: p = 0.30
Under H0 assumption
Test statistic:
Ha: p > 0.30
An example from Lecture 18: A test for
one proportion
With a p-value smaller than 0.05, we
reject the null hypothesis.
P-value =
P(Z>1.89) =
0.0294
This means we have statistically
significant evidence that more than 30%
of this age group has driven while drowsy
in the past year.
Today: We consider T statistics (for means)
instead of Z statistics (for proportions)
The formula is still:
Check: n>30
or normal
sample
In the case of one mean, we have:
Today: We consider T statistics (for means)
instead of Z statistics (for proportions)
The formula is still:
Check: n>30
or normal
sample
In the case of the mean of paired differences, we have:
Today: We consider T statistics (for means)
instead of Z statistics (for proportions)
The formula is still:
Check: n>30
or normal
sample fpr
In the case of difference of two means, we have: each sample
Motivating example: is my spin class
hurting my hearing?
Loud music and spin classes go
hand-in-hand, but is the music loud
enough to permanently damage
hearing?
The threshold for hearing loss is
accepted to be 85 db.
Research Question: Does the
average music volume at a spin
class exceed 85 db?
Measured variable: the noise level (in decibels) of
music played during exercise classes at a local gym
Do the data suggest that the population mean
noise level is greater than 85 decibels?
Sample from Survey:
n = 20 classes
mean = 89.8 decibels
s = 7.64 decibels
Can we use the one-sample t procedure?
State the hypotheses:
H0: µ = 85
Ha: µ > 85
Yes – data looks
normalish
Calculate and interpret the t test statistic
H0: μ = 85 decibels
Ha: μ > 85 decibels
Sample from Survey:
n = 20 classes; mean = 89.8 decibels; st dev = 7.64 decibels
d.f. = n – 1 = 19
Interpret t statistic: Our sample mean of 89.8 is
2.81 standard deviations above he population mean of 85,
assuming the null is true.
Find the p-value in Minitab
Select: t table and df = 19
Graph -> Probability
Distribution Plots
select
Find the p-value in Minitab (continued)
H0: μ = 85 decibels
Ha: μ > 85 decibels
T = 2.81
creates p-value
picture found on
next slide
p-value picture - one-sided test
H0: μ = 85 decibels
Ha: μ > 85 decibels
df = 19
Interpretation: The likelihood of getting a tlarge as 2.81, assuming the
statistic at least as _____
null hypothesis is true, equals 0.006.
What can go wrong: Two types of errors
This comes from Section 12.1.
Consider a medical test for a disease in which the
hypotheses are
H0: You do not have the disease.
Ha: You do have the disease.
If you decide to reject H0 but you turn out to be
incorrect, this is a false positive.
If you decide not to reject H0 but you turn out to be
incorrect, this is a false negative.
What can go wrong: Two types of errors
This comes from Section 12.1.
Consider a medical test for a disease in which the
hypotheses are
H0: You do not have the disease.
Ha: You do have the disease.
A false positive is called a type I error.
A false negative is called a type II error.
What can go wrong: Two types of errors
This comes from Section 12.1.
Generally speaking:
• A type I error occurs when you erroneously reject H0.
• A type II error occurs when you erroneously fail to reject H0.
The power of a test is the probability, given a
particular alternative is true, of rejecting H0.
The level of significance is the p-value cutoff for
rejecting H0. (Often it’s 0.05.) If H0 is true, the level of
significance is the probability of a type I error.
Decision and conclusion: Clicker Question
H0: μ = 85
Ha: μ > 85
p-value = 0.006
A. Can reject H0 in favor of Ha. Can claim μ >
85. Type 2 error is now possible.
B. Can reject H0 in favor of Ha. Can claim μ >
85. Type 1 error is now possible.
C. Can’t reject H0 in favor of Ha. Cannot claim
μ > 85. Type 2 is error is now possible.
D. Can’t reject H0 in favor of Ha. Cannot claim
μ > 85. Type 1 error is now possible.
Response
Variable
Hypothesis
Tests: One
Sample
Categorical
Quantitative
one-proportion Z
one-sample t
Chapter
12
13
P-value
Z table
T table with df =
(n – 1) because σ
is unknown
Population
Parameter
Sample
Estimate
Inferential
Procedure
Test statistic
Which procedure should we use?
What kind of
data do we
have?
Categorical
(binomial)
Pop.
proportion:
p
What kind of
research question
do we have?
Show
Quantitative something
specific
Pop.
mean:
µ
Hypothesis
Test
Estimate a
population
parameter
Confidence
interval
Example:
Researchers at Penn State are interested in
estimating the percentage of underage students who
drink alcohol at least once a month. They should…
A.
B.
C.
D.
Construct a confidence interval for a population proportion
Perform a hypothesis test for a population proportion
Construct a confidence interval for a population mean
Perform a hypothesis test for a population mean
What is the average number of texts that a
STAT 200 student receives on a weekday?
To answer this question we should…
A.
B.
C.
D.
Construct a confidence interval for a population proportion
Perform a hypothesis test for a population proportion
Construct a confidence interval for a population mean
Perform a hypothesis test for a population mean
Do more than 30% of Penn State students
binge drink at least once a month on
average? To answer this question we
should…
A.
B.
C.
D.
Construct a confidence interval for a population proportion
Perform a hypothesis test for a population proportion
Construct a confidence interval for a population mean
Perform a hypothesis test for a population mean
If you understand today’s lecture…
13.1, 13.3, 13.17, 13.19, 13.23, 13.25, 13.63,
13.67, 13.99
Objectives:
• Formulate null and alternative hypotheses involving
population means
• Calculate T-statistics (for means) instead of Z-statistics (for
proportions); determine correct degrees of freedom.
• Determine correct test procedure from context of problem.
• Identify potential errors that can occur in hypothesis testing;
distinguish between type I and type II errors.