Null hypothesis

Download Report

Transcript Null hypothesis

Hypothesis Tests with
Proportions
Chapter 10
Write down the first number
that you think of for the
following . . .
Pick a two-digit number
between 10 and 50, where
both digits are ODD
and the digits do
not repeat.
• What possible values fit this
description?
• Record your answer on the dotplot on
the board.
• What do you notice about this
distribution?
• Did you expect this to happen?
• What proportion of the time would I
expect to get the value 37 if the values
were equally likely to occur?
A hypothesis
test will help me
• Is the difference in these proportions
decide!
significant?
How do I know if this p-hat is
significantly different from the 1/8
that I expect to happen?
What are hypothesis tests?
Calculations that tell us if the sample
These calculations
(called
the
Is
it
one
of
the
statistics (p-hat) occurs by random
test statistic)
willproportions
tell us how
sample
chance or not OR . . . if it is statistically
many standard
deviations
a
that
are
likely
to
significant
sample proportion
is from the
occur?
IsStatistically
it . . . population
significant
means that it
proportion!
Is it one that
–isaNOT
random
occurrence
to natural
a random
chancedue
occurrence!
isn’t likely to
variation?
occur?
– an occurrence due to some other
reason?
How does
murder trial tests
work? Nature
of ahypothesis
• First begin by supposing the
“effect”
NOTthat
present
First - is
assume
the
innocent
• Next,person
see ifisdata
provides
Then – must
have sufficient
evidence
against
the
evidence to prove guilty
supposition
Hmmmmm …
Example:
murder
Hypothesis tests
use
the same process!
trial
Notice the steps are the
Steps:
same as a confidence
interval except we add
1) Assumptionshypothesis statements –
which you will learn today
2) Hypothesis statements &
define parameters
3) Calculations
4) Conclusion, in context
Assumptions for z-test:
•
•
YEA –
These
the same
Have an SRS
of are
context
assumptions as confidence
Distribution is intervals!!
(approximately)
normal because both np > 10 and
n(1-p) > 10
• Population is at least 10n
Check assumptions for the
•Given SRS of homes
following:
•Distribution is approximately normal
Example
A countywide
water conservation
because1:np=150
& n(1-p)=350
(both are
campaign
in a particular
greater was
thanconducted
10)
county.
month
later,5000
a random
•ThereAare
at least
homessample
in the of
500
homes was selected and water usage was
county.
recorded for each home. The county
supervisors wanted to know whether their
data supported the claim that fewer than
30% of the households in the county
reduced water consumption after the
conservation campaign.
How to write hypothesis
statements
• Null hypothesis – is the statement
(claim) being tested; this is a statement
of “no effect” or “no difference”
H0:
• Alternative hypothesis – is the
statement that we suspect is true
Ha:
How to write hypotheses:
Null hypothesis
H0: parameter = hypothesized value
Alternative hypothesis
Ha: parameter > hypothesized value
Ha: parameter < hypothesized value
Ha: parameter = hypothesized value
Example 2: (Back to the opening
activity) Is the proportion of
students who answered 37 higher
than the expected proportion of
1/8?
H0: p = 1/8
Ha: p > 1/8
Where p is the true
proportion of people who
answered “37”
Example 3: A new flu vaccine
claims to prevent a certain type
of flu in 70% of the people who
are vaccinated. Is this claim too
high?
H0: p = .7
Ha: p < .7
Where p is the true
proportion of vaccinated
people who do not get the flu
Example 4: Many older homes have electrical
systems that use fuses rather than circuit
breakers. A manufacturer of 40-A fuses
wants to make sure that the mean amperage at
which its fuses burn out is in fact 40. If the
mean amperage is lower than 40, customers
will complain because the fuses require
replacement too often. If the amperage is
higher than 40, the manufacturer might be
liable for damage to an electrical system due
to fuse malfunction. State the hypotheses :
H0: m = 40
Ha: m = 40
Where m is the true
mean amperage of
the fuses
Facts to remember about hypotheses:
• Hypotheses ALWAYS refer to
populations (use parameters – never
statistics)
• The alternative hypothesis should be
what you are trying to prove!
• ALWAYS define your parameter in
context!
Activity: For each pair of hypotheses,
indicate which are not legitimate &
Must
use parameter
Must be(population)
NOT equal! x
explain
why
is a statistics (sample)
a) H0 : m  15; Ha : m  15
 is the population
b) H0 : x  123; Ha : x  123
proportion!
Must use same
.1 a
1 ;asHHa 0:!  –Not
: isa.statistic
H0 number
c) P-hat
parameter!
d) H0 : p  .4; Ha : p  .6
e) H0 : pˆ  .1 ; Ha : pˆ  .1
Level of Significance
Activity
P-value -
The statistic is our p-hat!
• Assuming H0 is true, the
probability that the statistic
would have a value as extreme
or more than what is actually
observed
Notice that this is a
Why not
find
the probability
Remember
that
in
continuous
conditional probability
that the
equals
distributions,
wep-hat
cannot
find a
value?
probabilitiescertain
of a single
value!
P-values We can use normalcdf to
• Assuming H0 find
is true,
the probability
this probability.
that the statistic would have a value
as extreme or more than what is
actually observed
In other words . . . What is
the probability of getting
values more (or less) than
our p-hat?
pˆ
pˆ
Level of significance • Is the amount of evidence
necessary before we begin to doubt
that the null hypothesis is true
• Is the probability that we will
reject the null hypothesis, assuming
that it is true
• Denoted by a
– Can be any value
– Usual values: 0.1, 0.05, 0.01
– Most common is 0.05
Statistically significant –
• Our statistic (p-hat) is statistically
Remember that the verdict is never
significant
if
the
p-value
is
as
small
or
“innocent” – so we can never decide
smaller than
the
significance (a).
that
thelevel
null of
is true!
Our “guilty” verdict.
Our “not guilty” verdict.
Decisions:
• If p-value < a, “reject” the null hypothesis
at the a level.
• If p-value > a, “fail to reject” the null
hypothesis at the a level.
Facts about p-values:
• ALWAYS make the decision about
the null hypothesis!
• Large p-values show support for the
null hypothesis, but never that it is
true!
• Small p-values show support that the
null is not true.
• Double the p-value for two-tail (≠)
tests
• Never accept the null hypothesis!
Never “accept” the null hypothesis!
Never “accept” the null
hypothesis!
Never “accept” the
null hypothesis!
Calculating p-values
• For z-test statistic (z) –
– Use normalcdf(lb,ub) to find the
probability of the test statistic
or more extreme
We
will
seewehow
Since
areto
incompute
the
– Remember
the
standard normal
this value
tomorrow.
standard
normal
curve, weof z’s where
curve
is comprised
do
m =not
0 need
and sm, =s 1here.
Draw & shade a curve &
calculate the p-value:
1) right-tail test
z
2) two-tail test
z = 1.6
Normalcdf(1.6,∞)
Double the p-value since
thisP-value
is a two-tailed
= .0548test!
z = -2.4
Normalcdf(-∞,-2.4) × 2
z
P-value = .0164
At an a level of .05, would you
reject or fail to reject H0 for
the given p-values?
a) .03
b) .15
c) .45
d) .023
Reject
Fail to reject
Fail to reject
Reject
Writing Conclusions:
1) A statement of the decision being
made (reject or fail to reject H0) &
why (linkage)
AND
2) A statement of the results in
context. (state in terms of Ha)
“Since the p-value < (>) a,
I reject (fail to reject)
the H0. There is (is not)
sufficient evidence to
suggest that Ha.”
Be sure to write Ha in
context (words)!
Example 3 revisited: A new flu vaccine
claims
H0: p = to
.7 prevent a certain type of flu
: p < .7
inHa70%
ofnormalcdf(-10^99,-1.38)
the people who are
P-value
=
=.0838
Where p is the
proportion
of
vaccinated.
In true
a test,
vaccinated
vaccinated
people
flu
people
were
exposed
to the
the
flu. HThe
Since
the
p-value
> who
a, I get
fail
to
reject
0.
test
for the
resultstoissuggest
z=Therestatistic
is not sufficient
evidence
1.38.
Is proportion
this claimoftoo
high? Write
that the
vaccinated
peoplethe
who
hypotheses,
the 70%.
p-value &
do not get the calculate
flu is less than
write the appropriate
conclusion for a = 0.05.
Formula for hypothesis test:
statistic - parameter
Test statistic 
SD of parameter
z
pˆˆ  p
p 1  p 
n
Let’s put all the steps together!
Example 2 revisited: Is the proportion
of people who think of the value 37
significantly higher than what we
expect? Use a = 0.05.
What confidence level would be
equivalent to this right-tailed test
with a = 0.05?
Calculate this confidence interval.
How do the results from the
confidence interval compare to the
results of the hypothesis test?
Example 5: A company is willing to renew its
advertising contract with a local radio
station only if the station can prove that
more than 20% of the residents of the city
have heard the ad and recognize the
company’s product. The radio station
conducts a random sample of 400 people
and finds that 90 have heard the ad and
recognize the product. Is this
sufficient evidence for the
company to renew its contract?
Assumptions:
•Have an SRS of people
•np = 400(.2) = 80 & n(1-p) = 400(.8) = 320 - Since both are
greater than 10, this distribution is approximately normal.
•Population of people is at least 4000.
Use the parameter in the null
hypothesis
to check
assumptions!
H0: p = .2
where p is the true
proportion
of people
who
Ha: p > .2
heard the ad
.225 .2
z
 1.25 p  value  .1056 a  .05
.2(.8)
Use the parameter in the null
hypothesis to calculate standard
400
deviation!
Since the p-value > a, I fail to reject the null hypothesis. There
is not sufficient evidence to suggest that the true proportion of
people who heard the ad is greater than .2. The company will not
renew their advertising contract with the radio station.
Calculate the appropriate confidence interval for the
above problem.
p  hat  z
*
( phat )(1  phat )
.225*.775
 .225  1.96
n
n
= .225 + .041 = (.184, .266)
How do the results from the confidence interval
compare to the results of the hypothesis test?
The confidence interval contains the parameter of
.2 thus providing no evidence that more than 20%
had heard the ad.