Hypothesis Testing Ztest
Hypothesis Testing Ztest
Hypothesis Testing Ztest
Testing
Introduction to
Hypothesis Testing
Hypothesis Tests
A hypothesis test is a process that uses sample
statistics to test a claim about the value of a
population
parameter.
If a manufacturer
of rechargeable batteries
claims that the batteries they produce are good
for an average of at least 1,000 charges, a
sample would be taken to test this claim.
A verbal statement, or claim, about a population
parameter is called a statistical hypothesis.
To test the average of 1000 hours, a pair of
hypotheses are stated one that represents the
claim and the other, its complement. When one
of these hypotheses is false, the other must be
true.
Stating a Hypothesis
H subzero or H naught
A null hypothesis H0 is a statistical hypothesis that
contains a statement of equality such as , =, or .
H sub-a
A alternative hypothesis Ha is the complement of the
null hypothesis. It is a statement that must be true if
H0 is false and contains a statement of inequality such
as >, , or <.
To write the null and alternative hypotheses, translate
the claim made about the population parameter from
a verbal statement to a mathematical statement.
4
Stating a Hypothesis
Example:
Write the claim as a mathematical sentence. State
the null and alternative hypotheses and identify which
represents the claim.
A manufacturer claims that its rechargeable
batteries have an average life of at least 1,000
charges.
1000
H0: 1000 (Claim)
Ha: < 1000
Complement of
the null
hypothesis
Condition of
equality
Stating a Hypothesis
Example:
Write the claim as a mathematical sentence. State
the null and alternative hypotheses and identify which
represents the claim.
Statesville college claims that 94% of their
graduates find employment within six months of
graduation.
p = 0.94
H0: p = 0.94 (Claim)
Ha: p 0.94
Complement of
the null
hypothesis
Condition of
equality
Types of Errors
No matter which hypothesis represents the claim,
always begin the hypothesis test assuming that
the null hypothesis is true.
At the end of the test, one of two decisions will be
made:
1. reject the null hypothesis, or
2. fail to reject the null hypothesis.
A type I error occurs if the null hypothesis is
rejected when it is true.
A type II error occurs if the null hypothesis is not
rejected when it is false.
7
Types of Errors
Actual Truth of H0
Decision
H0 is true
H0 is false
Type II Error
Correct
Decision
Types of Errors
Example:
Statesville college claims that 94% of their graduates
find employment within six months of graduation.
What will a type I or type II error be?
H0: p = 0.94 (Claim)
Ha: p 0.94
A type I error is rejecting the null when it is true.
The population proportion is actually 0.94, but is
rejected. (We believe it is not 0.94.)
A type II error is failing to reject the null when it is
false.
The population proportion is not 0.94, but is not
rejected. (We believe it is 0.94.)
9
Level of Significance
In a hypothesis test, the level of significance is
your maximum allowable probability of making a type
I error. It is denoted by , the lowercase Greek letter
alpha.
Hypothesis tests
are based on .
The probability of making a type II error is denoted by
, the
Bylowercase
setting the
Greek
level letter
of significance
beta.
at a small
value, you are saying that you want the
probability of rejecting a true null hypothesis to
be small.
Commonly
used levels of significance:
Statistical Tests
After stating the null and alternative hypotheses and
specifying the level of significance, a random sample
is taken from the population and sample statistics are
calculated.
The statistic that is compared with the parameter
in the null hypothesis is called the test statistic.
Population
parameter
Test
statistic
Standardized test
statistic
p
2
z (n 30)
t (n < 30)
z
X2
s2
11
P-values
If the null hypothesis is true, a P-value (or
probability value) of a hypothesis test is the
probability of obtaining a sample statistic with a value
as extreme or more extreme than the one determined
from the sample data.
The P-value of a hypothesis test depends on the nature
of the test.
There are three types of hypothesis tests a left-,
right-, or two-tailed test. The type of test depends on
the region of the sampling distribution that favors a
rejection of H0. This region is indicated by the
alternative hypothesis.
12
Left-tailed Test
1. If the alternative hypothesis contains the less-than
inequality symbol (<), the hypothesis test is a lefttailed test.
H0 : = k
Ha: < k
P is the area
to the left of
the test
statistic.
-3
-2
-1
Test
statistic
13
Right-tailed Test
2. If the alternative hypothesis contains the greaterthan symbol (>), the hypothesis test is a righttailed test.
H0 : = k
Ha: > k
P is the area
to the right of
the test
statistic.
-3
-2
-1
Test
statistic
14
Two-tailed Test
3. If the alternative hypothesis
contains the not1
2
equal-to symbol (), the hypothesis test is a twotailed test. In a two-tailed test, each tail has an
area of P.
H0 : = k
Ha: k
P is twice the
area to the
right of the
positive test
statistic.
P is twice the
area to the left
of the negative
test statistic.
-3
-2
-1
Test
statistic
Test
statistic
15
Making a Decision
Decision Rule Based on P-value
To use a P-value to make a conclusion in a hypothesis
test, compare the P-value with .
1. If P , then reject H0.
2. If P > , then fail to reject H0.
Claim
Decision
Claim is H0
Claim is Ha
Reject H0
Do not reject H0
Interpreting a Decision
Example:
You perform a hypothesis test for the following claim.
How should you interpret your decision if you reject H0?
If you fail to reject H0?
H0: (Claim) A cigarette manufacturer claims that
less than one-eighth of the US adult population
smokes cigarettes.
If H0 is rejected, you should conclude there is sufficient
evidence to indicate that the manufacturers claim is false.
If you fail to reject H0, you should conclude there is not
sufficient evidence to indicate that the manufacturers claim
is false.
18
H0: ?
Ha: ?
=?
Determine the standardized
sampling distribution and
draw its graph.
3. Calculate the test statistic
and its standardized value.
Add it to your sketch. Then
determine the P-value.
This sampling
distribution is based on
the assumption that H0
is true.
z
Test statistic
Continued.
19
No
Yes
Reject H0.
One-Sample
Hypothesis Testing
for the Mean
(n30)
22
Example:
The test statistic for a right-tailed test is z = 1.56. Find the Pvalue.
P-value = 0.0594
0
1.56
25
x
The test statistic is the sample mean
standardized test statistic is z.
x
z
n
and the
standard error x
n
In Symbols
x
2. Specify the level of
z
significance. Determine the
n
standardized test statistic.
Identify .
Use Table
Continued.
27
x
1002 1000
n
14 100
1.43
Continued.
29
z 1.43
1.43
31
Reject Ho.
z < z0
Reject Ho.
z0
Left-Tailed Test
Reject Ho.
z < z0
z0
z > z0
Right-Tailed Test
Reject Ho.
z0
z0
z > z0
Two-Tailed Test
33
In Words
In Symbols
1. State the claim mathematically
and verbally. Identify the null
and alternative hypotheses.
Identify .
Use Table
Continued.
34
In Words
In Symbols
3. Find the standardized test
statistic.
4. Make a decision to reject or fail
to reject the null hypothesis.
5. Interpret the decision in the
context of the original claim.
or if n 30
n
use s.
If z is in the
rejection region,
reject H0.
Otherwise, fail to
reject H0.
35
0.025
0
z0 = 1.96
Continued.
36
n 0.5 58
3.05.
z0 = 1.96
z0 = 1.96