Chap 6: Inferences Based on a Single Sample: Tests of
Download
Report
Transcript Chap 6: Inferences Based on a Single Sample: Tests of
Statistics for Business and
Economics
Chapter 6
Inferences Based on a Single Sample: Tests of
Hypothesis
Learning Objectives
1. Distinguish Types of Hypotheses
2. Describe Hypothesis Testing Process
3. Explain p-Value Concept
4. Solve Hypothesis Testing Problems Based on a
Single Sample
5. Explain Power of a Test
Statistical Methods
Statistical
Methods
Descriptive
Statistics
Inferential
Statistics
Estimation
Hypothesis
Testing
Nonstatistical Hypothesis Testing
A criminal trial is an example of hypothesis testing
without the statistics.
In a trial a jury must decide between two hypotheses.
The null hypothesis is
H0: The defendant is innocent
The alternative hypothesis or research hypothesis is
H1: The defendant is guilty
The jury does not know which hypothesis is true. They
must make a decision on the basis of evidence presented.
Nonstatistical Hypothesis Testing
In the language of statistics convicting the defendant is
called
rejecting the null hypothesis in favor of the
alternative hypothesis.
That is, the jury is saying that there is enough evidence
to conclude that the defendant is guilty (i.e., there is
enough evidence to support the alternative hypothesis).
Nonstatistical Hypothesis Testing
If the jury acquits it is stating that
there is not enough evidence to support the
alternative hypothesis.
Notice that the jury is not saying that the defendant is
innocent, only that there is not enough evidence to
support the alternative hypothesis. That is why we never
say that we accept the null hypothesis.
Nonstatistical Hypothesis Testing
There are two possible errors.
A Type I error occurs when we reject a true null
hypothesis. That is, a Type I error occurs when the jury
convicts an innocent person.
A Type II error occurs when we don’t reject a false null
hypothesis. That occurs when a guilty defendant is
acquitted.
Nonstatistical Hypothesis Testing
The probability of a Type I error is denoted as α (Greek
letter alpha). The probability of a type II error is β
(Greek letter beta).
The two probabilities are inversely related. Decreasing
one increases the other.
Nonstatistical Hypothesis Testing
5. Two possible errors can be made.
Type I error: Reject a true null hypothesis
Type II error: Do not reject a false null
hypothesis.
P(Type I error) = α
P(Type II error) = β
Decision Results
H0: Innocent
Jury Trial
Actual Situation
Verdict
Innocent
Guilty
Innocent
Guilty
H0 Test
Actual Situation
Decision
Correct
Error
Accept
H0
Error
Correct
Reject
H0
H0 True
H0
False
1–a
Type II
Error
(b)
Type I Power
Error (a) (1 – b)
a & b Have an Inverse Relationship
You can’t reduce both
errors simultaneously!
b
a
Nonstatistical Hypothesis Testing
In our judicial system Type I errors are regarded as
more serious. We try to avoid convicting innocent
people. We are more willing to acquit guilty people.
We arrange to make α small by requiring the
prosecution to prove its case and instructing the jury to
find the defendant guilty only if there is “evidence
beyond a reasonable doubt.”
Nonstatistical Hypothesis Testing
The critical concepts are theses:
1. There are two hypotheses, the null and the alternative
hypotheses.
2. The procedure begins with the assumption that the
null hypothesis is true.
3. The goal is to determine whether there is enough
evidence to infer that the alternative hypothesis is
true.
4. There are two possible decisions:
Conclude that there is enough evidence to support the
alternative hypothesis.
Conclude that there is not enough evidence to support the
alternative hypothesis.
Concepts of Hypothesis Testing (1)
There are two hypotheses. One is called the null
hypothesis and the other the alternative or research
hypothesis. The usual notation is:
pronounced
H “nought”
H0: — the ‘null’ hypothesis
H1: — the ‘alternative’ or ‘research’ hypothesis
The null hypothesis (H0) will always state that the
parameter equals the value specified in the alternative
hypothesis (H1)
Concepts of Hypothesis Testing
Consider the following example. Suppose our
operations manager wants to know whether the mean is
different from 350 units. We can rephrase this request
into a test of the hypothesis:
H0:µ = 350
Thus, our research hypothesis becomes:
This is what we are interested in
H1:µ ≠ 350
determining…
Concepts of Hypothesis Testing (2)
The testing procedure begins with the assumption that
the null hypothesis is true.
Thus, until we have further statistical evidence, we will
assume:
H0:
= 350 (assumed to be TRUE)
Concepts of Hypothesis Testing (3)
The goal of the process is to determine whether there is
enough evidence to infer that the alternative hypothesis
is true.
That is, is there sufficient statistical information to
determine if this statement is true?
This is what we are interested in
determining…
H1:µ ≠ 350
Concepts of Hypothesis Testing (4)
There are two possible decisions that can be made:
Conclude that there is enough evidence to support the
alternative hypothesis
(also stated as: rejecting the null hypothesis in favor of
the alternative)
Conclude that there is not enough evidence to support
the alternative hypothesis
(also stated as: not rejecting the null hypothesis in favor
of the alternative)
NOTE: we do not say that we accept the null
hypothesis…
Concepts of Hypothesis Testing
Once the null and alternative hypotheses are stated, the
next step is to randomly sample the population and
calculate a test statistic (in this example, the sample mean).
If the test statistic’s value is inconsistent with the null
hypothesis we reject the null hypothesis and infer that
the alternative hypothesis is true.
Hypothesis Testing Concepts
Hypothesis Testing
Population
I believe the
population mean
age is 50
(hypothesis).
Random
sample
Mean
X = 20
Reject
hypothesis!
Not close.
What’s a Hypothesis?
A belief about a population
parameter
I believe the mean GPA of
this class is 3.5!
• Parameter is
population mean,
proportion, variance
• Must be stated
before analysis
© 1984-1994 T/Maker Co.
Null Hypothesis
1.
2.
3.
4.
5.
What is tested
Has serious outcome if incorrect decision made
Always has equality sign: , , or
Designated H0 (pronounced H-oh)
Specified as H0: some numeric value
•
•
Specified with = sign even if or
Example, H0: 3
Alternative Hypothesis
1. Opposite of null hypothesis
2. Always has inequality sign: ,, or
3. Designated Ha
4. Specified Ha: ,, or some value
•
Example, Ha: < 3
Identifying Hypotheses Steps
Example problem: Test that the population mean is not
3
Steps:
•
•
State the question statistically ( 3)
State the opposite statistically ( = 3)
—
•
Select the alternative hypothesis ( 3)
—
•
Must be mutually exclusive & exhaustive
Has the , <, or > sign
State the null hypothesis ( = 3)
What Are the Hypotheses?
Is the population average amount of TV viewing 12
hours?
• State the question statistically: = 12
• State the opposite statistically: 12
• Select the alternative hypothesis: Ha: 12
• State the null hypothesis: H0: = 12
What Are the Hypotheses?
Is the population average amount of TV viewing
different from 12 hours?
• State the question statistically: 12
• State the opposite statistically: = 12
• Select the alternative hypothesis: Ha: 12
• State the null hypothesis: H0: = 12
What Are the Hypotheses?
Is the average cost per hat less than or equal to $20?
• State the question statistically: 20
• State the opposite statistically: 20
• Select the alternative hypothesis: Ha: 20
• State the null hypothesis: H0: 20
What Are the Hypotheses?
Is the average amount spent in the bookstore greater
than $25?
• State the question statistically: 25
• State the opposite statistically: 25
• Select the alternative hypothesis: Ha: 25
• State the null hypothesis: H0: 25
Basic Idea
Sampling Distribution
It is unlikely
that we would
get a sample
mean of this
value ...
... therefore, we
reject the
hypothesis that
= 50.
... if in fact this were
the population mean
20
= 50
H0
Sample Means
Level of Significance
1. Probability
2. Defines unlikely values of sample statistic if null
hypothesis is true
•
Called rejection region of sampling
distribution
3. Designated a(alpha)
•
Typical values are .01, .05, .10
4. Selected by researcher at start
Rejection Region (One-Tail Test)
Sampling Distribution
Level of Confidence
Rejection
Region
1–a
a
Nonrejection
Region
Critical
Value
Ho
Value
Sample Statistic
Observed sample statistic
Rejection Region (One-Tail Test)
Sampling Distribution
Level of Confidence
Rejection
Region
a
1–a
Nonrejection
Region
Ho
Value
Critical
Value
Observed sample statistic
Sample Statistic
Rejection Regions (Two-Tailed Test)
Sampling Distribution
Level of Confidence
Rejection
Region
Rejection
Region
1–a
1/2 a
1/2 a
Nonrejection
Region
Critical
Value
Ho
Value
Sample Statistic
Critical
Value
Observed sample statistic
Rejection Regions (Two-Tailed Test)
Sampling Distribution
Level of Confidence
Rejection
Region
1/2 a
Rejection
Region
1–a
1/2 a
Nonrejection
Region
Ho
Value
Critical
Critical
Value
Value
Observed sample statistic
Sample Statistic
Rejection Regions (Two-Tailed Test)
Sampling Distribution
Level of Confidence
Rejection
Region
1/2 a
Rejection
Region
1–a
1/2 a
Nonrejection
Region
Ho
Value
Critical
Value
Observed sample statistic
Critical
Value
Sample Statistic
Decision Making Risks
Decision Results
H0: Innocent
Jury Trial
Actual Situation
Verdict
Innocent
Guilty
Innocent
Guilty
H0 Test
Actual Situation
Decision
Correct
Error
Accept
H0
Error
Correct
Reject
H0
H0 True
H0
False
1–a
Type II
Error
(b)
Type I Power
Error (a) (1 – b)
Errors in Making Decision
1. Type I Error
•
•
•
Reject true null hypothesis
Has serious consequences
Probability of Type I Error is a(alpha)
— Called level of significance
2. Type II Error
•
•
Do not reject false null hypothesis
Probability of Type II Error is b(beta)
Factors Affecting b
1. True value of population parameter
•
Increases when difference with hypothesized
parameter decreases
2. Significance level, a
•
Increases when adecreases
3. Population standard deviation,
•
Increases when increases
4. Sample size, n
•
Increases when n decreases
Hypothesis Testing Steps
H0 Testing Steps
•
State H0
•
Set up critical values
•
State Ha
•
Collect data
•
Choose a
•
Compute test statistic
•
Choose n
•
Make statistical decision
•
Choose test
•
Express decision
One Population Tests
One
Population
Mean
Proportion
Variance
Z Test
t Test
Z Test
c2 Test
(1 & 2
tail)
(1 & 2
tail)
(1 & 2
tail)
(1 & 2
tail)
Two-Tailed Z Test of Mean
( Known)
One Population Tests
One
Population
Mean
Proportion
Variance
Z Test
t Test
Z Test
c2 Test
(1 & 2
tail)
(1 & 2
tail)
(1 & 2
tail)
(1 & 2
tail)
Two-Tailed Z Test for Mean ( Known)
1. Assumptions
•
•
Population is normally distributed
If not normal, can be approximated by
normal distribution (n 30)
2. Alternative hypothesis has sign
3. Z-Test Statistic
Z
X x
x
X
n
Two-Tailed Z Test for Mean Hypotheses
H0:= 0 Ha: ≠ 0
Reject H 0
Reject H
a/2
a/2
0
Z
Two-Tailed Z Test Finding Critical Z
What is Z given a = .05?
.500
- .025
.475
=1
a /2 = .025
Standardized Normal
Probability Table (Portion)
Z
.05
.06
.07
1.6 .4505 .4515 .4525
1.7 .4599 .4608 .4616
1.8 .4678 .4686 .4693
-1.96 0 1.96 Z
1.9 .4744 .4750 .4756
Two-Tailed Z Test Example
Does an average box of cereal
contain 368 grams of cereal?
A random sample of 25 boxes
showed x = 372.5. The
company has specified to
be 25 grams. Test at the .05
level of significance.
368 gm.
Two-Tailed Z Test Solution
•
•
•
•
•
H0: = 368
Ha: 368
a .05
n 25
Critical Value(s):
Reject H 0
Reject H 0
.025
.025
-1.96 0 1.96 Z
Test Statistic:
Decision:
Conclusion:
Two-Tailed Z Test Solution
Test Statistic:
X 372.5 368
Z
1.50
15
n
25
Decision:
Do not reject at a = .05
Conclusion:
No evidence average
is not 368
Example 11.2
In recent years, a number of companies have been formed
that offer competition to AT&T in long-distance calls.
All advertise that their rates are lower than AT&T's, and as
a result their bills will be lower.
AT&T has responded by arguing that for the average
consumer there will be no difference in billing.
Suppose that a statistics practitioner working for AT&T
determines that the mean and standard deviation of
monthly long-distance bills for all its residential customers
are $17.09 and $3.87, respectively.
Example 11.2
He then takes a random sample of 100 customers and
recalculates their last month's bill using the rates quoted
by a leading competitor.
Assuming that the standard deviation of this population
is the same as for AT&T, can we conclude at the 5%
significance level that there is a difference between
AT&T's bills and those of the leading competitor?
IDENTIFY
Example 11.2
The parameter to be tested is the mean of the population
of AT&T’s customers’ bills based on competitor’s rates.
What we want to determine whether this mean differs
from $17.09. Thus, the alternative hypothesis is
H1: µ ≠ 17.09
The null hypothesis automatically follows.
H0: µ = 17.09
IDENTIFY
Example 11.2
The rejection region is set up so we can reject the null
hypothesis when the test statistic is large or when it is
small.
stat is “small”
stat is “large”
That is, we set up a two-tail rejection region. The total
area in the rejection region must sum to , so we
divide this probability by 2.
IDENTIFY
Example 11.2
At a 5% significance level (i.e. α = .05), we have
α/2 = .025. Thus, z.025 = 1.96 and our rejection region is:
z < –1.96
-z.025
-or-
0
z > 1.96
+z.025
z
Two-Tailed Z Test Thinking Challenge
You’re a Q/C inspector. You want to
find out if a new machine is making
electrical cords to customer specification:
average breaking strength of 70 lb. with
= 3.5 lb. You take a sample of 36
cords & compute a sample mean of 69.7
lb. At the .05 level of significance, is
there evidence that the machine is not
meeting the average breaking strength?
Two-Tailed Z Test Solution*
•
•
•
•
•
H0: = 70
Ha: 70
a =.05
n = 36
Critical Value(s):
Reject H 0
Reject H 0
.025
.025
-1.96 0 1.96 Z
Test Statistic:
Decision:
Conclusion:
Two-Tailed Z Test Solution*
Test Statistic:
X 69.7 70
Z
.51
3.5
n
36
Decision:
Do not reject at a = .05
Conclusion:
No evidence average
is not 70
One-Tailed Z Test of Mean
( Known)
One-Tailed Z Test for Mean ( Known)
1. Assumptions
•
•
Population is normally distributed
If not normal, can be approximated by
normal distribution (n 30)
2. Alternative hypothesis has < or > sign
3. Z-test Statistic
Z
X x
x
X
n
One-Tailed Z Test for Mean Hypotheses
H0:= 0 Ha: < 0
H0:= 0 Ha: > 0
Reject H 0
Reject H0
a
a
0
Must be significantly
below
Z
0
Z
Small values satisfy H0 .
Don’t reject!
One-Tailed Z Test Finding Critical Z
What Is Z given a = .025?
.500
- .025
.475
=1
a = .025
Standardized Normal
Probability Table (Portion)
Z
.05
.06
.07
1.6 .4505 .4515 .4525
1.7 .4599 .4608 .4616
1.8 .4678 .4686 .4693
0 1.96 Z
1.9 .4744 .4750 .4756
Example 11.1
The manager of a department store is thinking about
establishing a new billing system for the store's credit
customers.
She determines that the new system will be costeffective only if the mean monthly account is more than
$170. A random sample of 400 monthly accounts is
drawn, for which the sample mean is $178.
The manager knows that the accounts are approximately
normally distributed with a standard deviation of $65.
Can the manager conclude from this that the new
system will be cost-effective?
Example 11.1
IDENTIFY
The system will be cost effective if the mean account
balance for all customers is greater than $170.
We express this belief as our research hypothesis, that is:
H1: µ > 170 (this is what we want to determine)
Thus, our null hypothesis becomes:
H0: µ = 170 (this specifies a single value for the
parameter of interest)
Example 11.1
IDENTIFY
What we want to show:
H0: µ = 170 (we’ll assume this is true)
H1: µ > 170
We know:
n = 400,
= 178, and
σ = 65
What to do next?!
COMPUTE
Example 11.1 Rejection region
It seems reasonable to reject the null hypothesis in favor
of the alternative if the value of the sample mean is
large relative to 170, that is if
>
.
α = P(Type I error)
= P( reject H0 given that H0 is true)
α = P(
>
)
COMPUTE
Example 11.1
All that’s left to do is calculate
and compare it to 170.
we can calculate this based on any level of
significance ( ) we want…
COMPUTE
Example 11.1
At a 5% significance level (i.e.
=0.05), we get
Solving we compute
= 175.34
Since our sample mean (178) is greater than the critical
value we calculated (175.34), we reject the null
hypothesis in favor of H1, i.e. that: µ > 170 and that it is
cost effective to install the new billing system
One-Tailed Z Test Example
Does an average box of cereal
contain more than 368 grams
of cereal? A random sample of
25 boxes showed x = 372.5.
The company has specified to
be 15 grams. Test at the .05
level of significance.
368 gm.
One-Tailed Z Test Solution
•
•
•
•
•
H0: = 368
Ha: > 368
a = .05
n = 25
Critical Value(s):
Test Statistic:
Decision:
Reject
.05
0 1.645 Z
Conclusion:
One-Tailed Z Test Solution
Test Statistic:
Z
X
372.5 368
1.50
15
n
25
Decision:
Do not reject at a = .05
Conclusion:
No evidence average is
more than 368
One-Tailed Z Test Thinking Challenge
You’re an analyst for Ford. You
want to find out if the average miles
per gallon of Escorts is less than 32
mpg. Similar models have a
standard deviation of 3.8 mpg. You
take a sample of 60 Escorts &
compute a sample mean of 30.7
mpg. At the .01 level of
significance, is there evidence that
the miles per gallon is less than 32?
One-Tailed Z Test Solution*
•
•
•
•
•
H0: = 32
Ha: < 32
a = .01
n = 60
Critical Value(s):
Test Statistic:
Decision:
Reject
.01
-2.33 0
Conclusion:
Z
One-Tailed Z Test Solution*
Test Statistic:
X 30.7 32
Z
2.65
3.8
n
60
Decision:
Reject at a = .01
Conclusion:
There is evidence average
is less than 32
Observed Significance Levels:
p-Values
p-Value
1. Probability of obtaining a test statistic more
extreme (or than actual sample value, given H0
is true
2. Called observed level of significance
•
Smallest value of a for which H0 can be rejected
3. Used to make rejection decision
•
•
If p-value a, do not reject H0
If p-value < a, reject H0
Two-Tailed Z Test p-Value Example
Does an average box of cereal
contain 368 grams of cereal? A
random sample of 25 boxes
showed x = 372.5. The
company has specified to be
15 grams. Find the p-Value.
368 gm.
Two-Tailed Z Test p-Value Solution
X 372.5 368
Z
1.50
15
n
25
0
1.50
Z
Z value of sample
statistic (observed)
Two-Tailed Z Test p-Value Solution
p-value is P(Z -1.50 or Z 1.50)
1/2 p-Value
1/2 p-Value
.4332
-1.50
0
From Z table:
lookup 1.50
1.50
.5000
- .4332
.0668
Z
Z value of sample
statistic (observed)
Two-Tailed Z Test p-Value Solution
p-value is P(Z -1.50 or Z 1.50) = .1336
1/2 p-Value
.0668
-1.50
1/2 p-Value
.0668
0
1.50
From Z table:
lookup 1.50
.5000
- .4332
.0668
Z
Z value of sample
statistic
Two-Tailed Z Test p-Value Solution
(p-Value = .1336) (a = .05).
Do not reject H0.
1/2 p-Value = .0668
1/2 p-Value = .0668
Reject H0
Reject H0
1/2 a = .025
1/2 a = .025
-1.50
0
1.50
Test statistic is in ‘Do not reject’ region
Z
One-Tailed Z Test p-Value Example
Does an average box of cereal
contain more than 368 grams
of cereal? A random sample
of 25 boxes showed x = 372.5.
The company has specified
to be 25 grams. Find the pValue.
368 gm.
One-Tailed Z Test p-Value Solution
X 372.5 368
Z
1.50
15
n
25
0
1.50
Z
Z value of sample
statistic
One-Tailed Z Test p-Value Solution
p-Value is P(Z 1.50)
Use
alternative
hypothesis
to find
direction
p-Value
.4332
0
From Z table:
lookup 1.50
1.50
.5000
- .4332
.0668
Z
Z value of sample
statistic
One-Tailed Z Test p-Value Solution
p-Value is P(Z 1.50) = .0668
p-Value
.0668
Use
alternative
hypothesis
to find
direction
.4332
0
From Z table:
lookup 1.50
1.50
.5000
- .4332
.0668
Z
Z value of sample
statistic
One-Tailed Z Test p-Value Solution
(p-Value = .0668) (a = .05).
Do not reject H0.
p-Value = .0668
Reject H0
a = .05
0
1.50
Test statistic is in ‘Do not reject’ region
Z
p-Value Thinking Challenge
You’re an analyst for Ford. You
want to find out if the average
miles per gallon of Escorts is less
than 32 mpg. Similar models
have a standard deviation of 3.8
mpg. You take a sample of 60
Escorts & compute a sample mean
of 30.7 mpg. What is the value of
the observed level of significance
(p-Value)?
p-Value Solution*
p-Value is P(Z -2.65) = .004.
p-Value < (a = .01). Reject H0.
Use
alternative
hypothesis
to find
direction
p-Value
.004
.5000
- .4960
.0040
.4960
-2.65
Z value of sample
statistic
0
Z
From Z table:
lookup 2.65
Two-Tailed t Test
of Mean ( Unknown)
One Population Tests
One
Population
Mean
Proportion
Variance
Z Test
t Test
Z Test
c2 Test
(1 & 2
tail)
(1 & 2
tail)
(1 & 2
tail)
(1 & 2
tail)
t Test for Mean ( Unknown)
1. Assumptions
• Population is normally distributed
• If not normal, only slightly skewed & large sample (n
30) taken
2. Parametric test procedure
3. t test statistic
X
t
S
n
Two-Tailed t Test Finding Critical t Values
Given: n = 3; a = .10
df = n - 1 = 2
a /2 = .05
a /2 = .05
Critical Values of t Table
(Portion)
v
t .10
t .05
t .025
1 3.078 6.314 12.706
2 1.886 2.920 4.303
-2.920 0 2.920 t
3 1.638 2.353 3.182
Two-Tailed t Test Example
Does an average box of
cereal contain 368 grams of
cereal? A random sample
of 36 boxes had a mean of
372.5 and a standard
deviation of 12 grams. Test
at the .05 level of
significance.
368 gm.
Two-Tailed t Test Solution
•
•
•
•
•
H0: = 368
Ha: 368
a = .05
df = 36 - 1 = 35
Critical Value(s):
Reject H0
Reject H0
.025
.025
-2.030
0 2.030
t
Test Statistic:
Decision:
Conclusion:
Two-Tailed t Test Solution
Test Statistic:
X 372.5 368
t
2.25
S
12
n
36
Decision:
Reject at a = .05
Conclusion:
There is evidence population
average is not 368
Two-Tailed t Test Thinking Challenge
You work for the FTC. A
manufacturer of detergent claims
that the mean weight of detergent
is 3.25 lb. You take a random
sample of 64 containers. You
calculate the sample average to
be 3.238 lb. with a standard
deviation of .117 lb. At the .01
level of significance, is the
manufacturer correct?
3.25 lb.
Two-Tailed t Test Solution*
•
•
•
•
•
H0: = 3.25
Ha: 3.25
a .01
df 64 - 1 = 63
Critical Value(s):
Reject H 0
Reject H0
.005
.005
-2.656
0 2.656
t
Test Statistic:
Decision:
Conclusion:
Two-Tailed t Test Solution*
Test Statistic:
X 3.238 3.25
t
.82
S
.117
n
64
Decision:
Do not reject at a = .01
Conclusion:
There is no evidence
average is not 3.25
One-Tailed t Test
of Mean ( Unknown)
One-Tailed t Test Example
Is the average capacity of
batteries at least 140 amperehours? A random sample of 20
batteries had a mean of 138.47
and a standard deviation of 2.66.
Assume a normal distribution.
Test at the .05 level of
significance.
One-Tailed t Test Solution
•
•
•
•
•
H0: = 140
Ha: < 140
a = .05
df = 20 - 1 = 19
Critical Value(s):
Test Statistic:
Decision:
Reject H0
Conclusion:
.05
-1.729
0
t
One-Tailed t Test Solution
Test Statistic:
X 138.47 140
t
2.57
S
2.66
n
20
Decision:
Reject at a = .05
Conclusion:
There is evidence population
average is less than 140
One-Tailed t Test Thinking Challenge
You’re a marketing analyst for
Wal-Mart. Wal-Mart had teddy
bears on sale last week. The
weekly sales ($ 00) of bears sold
in 10 stores was:
8 11 0 4 7 8 10 5 8 3
At the .05 level of significance, is
there evidence that the average
bear sales per store is more than
5 ($ 00)?
One-Tailed t Test Solution*
•
•
•
•
•
H0: = 5
Ha: > 5
a = .05
df = 10 - 1 = 9
Critical Value(s):
Test Statistic:
Decision:
Reject H0
.05
0 1.833
Conclusion:
t
One-Tailed t Test Solution*
Test Statistic:
X 6.4 5
t
1.31
S
3.373
n
10
Decision:
Do not reject at a = .05
Conclusion:
There is no evidence
average is more than 5
Summary of One- and Two-Tail Tests…
One-Tail Test
(left tail)
Two-Tail Test
One-Tail Test
(right tail)
Z Test of Proportion
Data Types
Data
Quantitative
Discrete
Continuous
Qualitative
Qualitative Data
1. Qualitative random variables yield responses that
classify
•
e.g., Gender (male, female)
2. Measurement reflects number in category
3. Nominal or ordinal scale
4. Examples
•
•
Do you own savings bonds?
Do you live on-campus or off-campus?
Proportions
1. Involve qualitative variables
2. Fraction or percentage of population in a
category
3. If two qualitative outcomes, binomial
distribution
•
Possess or don’t possess characteristic
^
4. Sample Proportion (p)
x number of successes
pˆ
n
sample size
Sampling Distribution of Proportion
1. Approximated by
Normal Distribution
npˆ 3 npˆ 1 pˆ
–
Excludes 0 or n
2. Mean
Pˆ p
Sampling Distribution
^
P(P )
.3
.2
.1
.0
^
P
.0
.2
.4
.6
.8
1.0
3. Standard Error
p0 (1 p0 )
pˆ
where p0 = Population Proportion
n
Standardizing Sampling Distribution of
Proportion
Z
p^ p^
p^
p^ p0
p0 (1 p0)
n
Sampling
Distribution
P^
Standardized Normal
Distribution
z = 1
P^
^
P
Z= 0
Z
One Population Tests
One
Population
Mean
Proportion
Variance
Z Test
t Test
Z Test
c 2 Test
(1 & 2
tail)
(1 & 2
tail)
(1 & 2
tail)
(1 & 2
tail)
One-Sample Z Test for Proportion
1. Assumptions
• Random sample selected from a binomial population
• Normal approximation can be used if
npˆ 0 15 and nqˆ0 15
2.
Z-test statistic for proportion
pˆ p0
Hypothesized population
Z
proportion
p0 q0
n
One-Proportion Z Test Example
The present packaging system
produces 10% defective
cereal boxes. Using a new
system, a random sample of
200 boxes had 11 defects.
Does the new system produce
fewer defects? Test at the .05
level of significance.
One-Proportion Z Test Solution
•
•
•
•
•
H0: p = .10
Ha: p < .10
a = .05
n = 200
Critical Value(s):
Test Statistic:
Decision:
Reject H0
.05
-1.645 0
Conclusion:
Z
One-Proportion Z Test Solution
Test Statistic:
11
.10
pˆ p0 200
Z
2.12
p0 q0
.10 .90
200
n
Decision:
Reject at a = .05
Conclusion:
There is evidence new
system < 10% defective
One-Proportion Z Test Thinking Challenge
You’re an accounting manager.
A year-end audit showed 4% of
transactions had errors. You
implement new procedures. A
random sample of 500
transactions had 25 errors. Has
the proportion of incorrect
transactions changed at the .05
level of significance?
One-Proportion Z Test Solution*
•
•
•
•
•
H0: p = .04
Ha: p .04
a = .05
n = 500
Critical Value(s):
Reject H 0
Reject H 0
.025
.025
-1.96 0 1.96 Z
Test Statistic:
Decision:
Conclusion:
One-Proportion Z Test Solution*
Test Statistic:
25
.04
pˆ p0 500
Z
1.14
p0 q0
.04 .96
500
n
Decision:
Do not reject at a = .05
Conclusion:
There is evidence
proportion is not 4%
Calculating Type II Error
Probabilities
Power of Test
1. Probability of rejecting false H0
• Correct decision
2. Designated 1 - b
3. Used in determining test adequacy
4. Affected by
•
•
•
True value of population parameter
Significance level a
Standard deviation & sample size n
Finding Power Step 1
Hypothesis:
H0: 0 368
Ha: 0 < 368
n
15
25
Reject H0
a = .05
Do Not
Draw
Reject H0
0 = 368
X
Finding Power Steps 2 & 3
Hypothesis:
H0: 0 368
Ha: 0 < 368
n
Reject H0
Do Not
Draw
Reject H0
15
25
a = .05
0 = 368
‘True’
Situation:
a = 360 (Ha)
Specify
Draw
1-b
a = 360
b
X
X
Finding Power Step 4
Hypothesis:
H0: 0 368
Ha: 0 < 368
n
Reject H0
Do Not
Draw
Reject H0
15
25
a = .05
0 = 368
‘True’
Situation:
a = 360 (Ha)
Specify
X
15
368 1.64
n
25
363.065
X L 0 Z
Draw
1-b
a = 360
363.065
X
Finding Power Step 5
n
Hypothesis:
H0: 0 368
Ha: 0 < 368
Reject H0
Do Not
Draw
Reject H0
15
25
a = .05
0 = 368
‘True’
Situation:
a = 360 (Ha)
Draw
Specify
Z Table
X
15
368 1.64
n
25
363.065
X L 0 Z
b = .154
1-b =.846
a = 360
363.065
X
Effects on β of Changing α
Decreasing the significance level α, increases the value of β
and vice versa.
Consider this diagram again. Shifting the critical value line
to the right (to decrease α) will mean a larger area under the
lower curve for β… (and vice versa)
Probability of a Type II Error
It is important that that we understand the relationship
between Type I and Type II errors; that is, how the
probability of a Type II error is calculated and its
interpretation.
Recall Example 11.1…
H0: µ = 170
H1: µ > 170
At a significance level of 5% we rejected H0 in favor of
H1 since our sample mean (178) was greater than the
critical value of
(175.34).
Probability of a Type II Error β
A Type II error occurs when a false null hypothesis is not
rejected.
In example 11.1, this means that if is less than 175.34
(our critical value) we will not reject our null hypothesis,
which means that we will not install the new billing
system.
Thus, we can see that:
β = P(
< 175.34 given that the null hypothesis is false)
Example 11.1 (revisited)
β = P(
< 175.34 given that the null hypothesis is false)
The condition only tells us that the mean ≠ 170. We need to
compute β for some new value of µ. For example, suppose
that if the mean account balance is $180 the new billing
system will be so profitable that we would hate to lose the
opportunity to install it.
β = P(
< 175.34, given that µ = 180), thus…
Example 11.1 (revisited)
Our original hypothesis…
our new assumpation…
Effects on β of Changing α
Decreasing the significance level α, increases the value of β
and vice versa. Change α to .01 in Example 11.1.
Stage 1: Rejection region
z za z.01 2.33
x
x 170
z
2.33
/ n 65 / 400
x 177.57
Effects on β of Changing α
Stage 2 : Probability of a Type II error
b P( x 177.57 | 180)
x 177.57 180
P
65 / 400
/ n
Pz .75
.2266
Effects on β of Changing α
Decreasing the significance level α, increases the value of β
and vice versa.
Consider this diagram again. Shifting the critical value line
to the right (to decrease α) will mean a larger area under
the lower curve for β… (and vice versa)
Judging the Test
A statistical test of hypothesis is effectively defined by the
significance level (α) and the sample size (n), both of
which are selected by the statistics practitioner.
Therefore, if the probability of a Type II error (β) is
judged to be too large, we can reduce it by
Increasing α,
and/or
increasing the sample size, n.
Judging the Test
For example, suppose we increased n from a sample size
of 400 account balances to 1,000 in Example 11.1.
Stage 1: Rejection region
z za z.05 1.645
x
x 170
z
1.645
/ n 65 / 1,000
x 173.38
Judging the Test
Stage 2: Probability of a Type II error
b P( x 173.38 | 180)
x 173.38 180
P
/
n
65
/
1
,
000
Pz 3.22
0 (approximately)
Judging the Test
A statistical test of hypothesis is effectively defined by the
significance level (α) and the sample size (n), both of which
are selected by the statistics practitioner.
Therefore, if the probability of a Type II error (β) is judged to
be too large, we can reduce it by
Increasing α,
and/or
increasing the sample size, n.
Judging the Test
For example, suppose we increased n from a sample
size of 400 account balances to 1,000 in Example
11.1.
Stage 1: Rejection region
z za z.05 1.645
x
x 170
z
1.645
/ n 65 / 1,000
x 173.38
Judging the Test
Stage 2: Probability of a Type II error
b P( x 173.38 | 180)
x
173.38 180
P
/
n
65
/
1
,
000
Pz 3.22
0 (approximat
ely)
By increasing the sample size we reduce the
probability of a Type II error:
Compare β at n=400 and n=1,000…
n=400
n=1,000
175.35
173.38
Power Curves
Power
H0: 0
Power H0: 0
Possible True Values for a
Power
Possible True Values for a
H0: =0
Possible True Values for a
= 368 in
Example
Chi-Square (c2) Test
of Variance
One Population Tests
One
Population
Mean
Proportion
Variance
Z Test
t Test
Z Test
c2 Test
(1 & 2
tail)
(1 & 2
tail)
(1 & 2
tail)
(1 & 2
tail)
Chi-Square (c2) Test
for Variance
1. Tests one population variance or standard deviation
2. Assumes population is approximately normally
distributed
3. Null hypothesis is H0: 2 = 02
4. Test statistic
c
2
(n 1) S
2
0
2
Sample variance
Hypothesized pop. variance
Chi-Square (c2) Distribution
Population
Select simple random
sample, size n.
Compute s 2
Sampling Distributions
for Different Sample
Sizes
Compute c2 = (n-1)s 2 /2
0
Astronomical number
of c2 values
1
2
3 c2
Finding Critical Value Example
What is the critical c2 value given:
Ha: 2 > 0.7
Reject
n=3
a =.05?
a = .05
df = n - 1 = 2
c2 Table
(Portion)
0
DF .995
1
...
2 0.010
5.991
c2
Upper Tail Area
…
.95
…
… 0.004
…
… 0.103
…
.05
3.841
5.991
Finding Critical Value Example
What is the critical c2 value given:
Ha: 2 < 0.7
n=3
What do you do
a =.05?
if the rejection
region is on the
left?
Finding Critical Value Example
What is the critical c2 value given:
Ha: 2 < 0.7
Upper Tail Area
Reject H0
for Lower Critical
n=3
Value = 1-.05 = .95
a
=
.05
a =.05?
df = n - 1 = 2
c2 Table
(Portion)
0 .103
DF .995
1
...
2 0.010
c2
Upper Tail Area
…
.95
…
… 0.004
…
… 0.103
…
.05
3.841
5.991
Chi-Square (c2) Test Example
Is the variation in boxes of
cereal, measured by the
variance, equal to 15 grams?
A random sample of 25
boxes had a standard
deviation of 17.7 grams.
Test at the .05 level of
significance.
Chi-Square (c2) Test Solution
•
•
•
•
•
H0: 2 = 15
Ha: 2 15
a = .05
df = 25 - 1 = 24
Critical Value(s):
Test Statistic:
Decision:
a /2 = .025
Conclusion:
0 12.401
39.364
c2
Chi-Square (c2) Test Solution
Test Statistic:
c
2
(n 1) S
2
0
2
(25 1) 17.7
2
15
= 33.42
Decision:
Do not reject at a = .05
Conclusion:
There is no evidence
2 is not 15
2
Conclusion
1. Distinguished Types of Hypotheses
2. Described Hypothesis Testing Process
3. Explained p-Value Concept
4. Solved Hypothesis Testing Problems Based on a
Single Sample
5. Explained Power of a Test