Hypotesis Statistik
Hypotesis Statistik
Economics
Chapter 6
Inferences Based on a Single Sample:
Tests of Hypothesis
Learning Objectives
Statistical
Methods
Descriptive Inferential
Statistics Statistics
Hypothesis
Estimation
Testing
Hypothesis Testing
Concepts
Hypothesis Testing
I believe the
population mean Reject
age is 50 Reject
hypothesis!
hypothesis!
Population (hypothesis). Not
Notclose.
close.
Random
sample
Mean
X = 20
What’s a Hypothesis?
• Parameter is
population mean,
proportion, variance
• Must be stated
before analysis
1. What is tested
2. Has serious outcome if incorrect decision made
3. Always has equality sign: , , or
4. Designated H0 (pronounced H-oh)
5. Specified as H0: some numeric value
• Specified with = sign even if or
• Example, H0: 3
Alternative Hypothesis
20 = 50 Sample Means
H0
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 (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–
Nonrejection
Region
Ho Sample Statistic
Critical Value
Value
Observed sample statistic
Rejection Region
(One-Tail Test)
Sampling Distribution Level of Confidence
Rejection
Region
1–
Nonrejection
Region
Ho Sample Statistic
Critical Value
Value
Observed sample statistic
Rejection Regions
(Two-Tailed Test)
Sampling Distribution Level of Confidence
Rejection Rejection
Region Region
1–
1/2 1/2
Nonrejection
Region
Ho Sample Statistic
Critical Value Critical
Value Value
Observed sample statistic
Rejection Regions
(Two-Tailed Test)
Sampling Distribution Level of Confidence
Rejection Rejection
Region Region
1–
1/2 1/2
Nonrejection
Region
Ho Sample Statistic
Critical Value Critical
Value Value
Observed sample statistic
Rejection Regions
(Two-Tailed Test)
Sampling Distribution Level of Confidence
Rejection Rejection
Region Region
1–
1/2 1/2
Nonrejection
Region
Ho Sample Statistic
Critical Value Critical
Value Value
Observed sample statistic
Decision Making Risks
Errors in
Making Decision
1. Type I Error
• Reject true null hypothesis
• Has serious consequences
• Probability of Type I Error is (alpha)
— Called level of significance
2. Type II Error
• Do not reject false null hypothesis
• Probability of Type II Error is (beta)
Decision Results
H0: Innocent
Jury Trial H0 Test
Actual Situation Actual Situation
Verdict Innocent Guilty Decision H0 True H0
False
Type II
Innocent Correct Error Accept 1– Error
H0
()
Reject Type I Power
Guilty Error Correct
H0 Error () (1 – )
& Have an
Inverse Relationship
You can’t reduce both
errors simultaneously!
Factors Affecting
1. True value of population parameter
• Increases when difference with hypothesized
parameter decreases
2. Significance level,
• Increases when decreases
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
• Choose
• Compute test statistic
• Choose n
• Make statistical decision
• Choose test
• Express decision
One Population Tests
One
Population
One
Population
Reject H 0 Reject H
0 Z
Two-Tailed Z Test
Finding Critical Z
What is Z given = .05? Standardized Normal
Probability Table (Portion)
.500
- .025 =1 Z .05 .06 .07
.475 1.6 .4505 .4515 .4525
= .025
1.7 .4599 .4608 .4616
-1.96 0 1.96 Z 1.8 .4678 .4686 .4693
• Critical Value(s):
Decision:
Reject H 0 Reject H 0 Do not reject at = .05
.025 .025 Conclusion:
No evidence average
-1.96 0 1.96 Z is not 368
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 Test Statistic:
• Ha: 70 X 69.7 70
Z .51
• =.05 3.5
• n = 36 n 36
• Critical Value(s):
Decision:
Reject H 0 Reject H 0 Do not reject at = .05
.025 .025 Conclusion:
No evidence average
-1.96 0 1.96 Z 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
X x X
Z
x
n
One-Tailed Z Test
for Mean Hypotheses
H0:=0 Ha: < 0 H0:=0 Ha: > 0
Reject H 0 Reject H0
0 Z 0 Z
Must be significantly Small values satisfy H0 .
below Don’t reject!
One-Tailed Z Test
Finding Critical Z
What Is Z given = .025? Standardized Normal
Probability Table (Portion)
.500
- .025 =1 Z .05 .06 .07
.475 1.6 .4505 .4515 .4525
= .025
1.7 .4599 .4608 .4616
0 1.96 Z 1.8 .4678 .4686 .4693
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 .5000
- .4332
.0668
.4332
-1.50 0 1.50 Z
From Z table: Z value of sample
lookup 1.50 statistic (observed)
Two-Tailed Z Test
p-Value Solution
p-value is P(Z -1.50 or Z 1.50) = .1336
-1.50 0 1.50 Z
From Z table: Z value of sample
lookup 1.50 statistic
Two-Tailed Z Test
p-Value Solution
(p-Value = .1336) ( = .05).
Do not reject H0.
1/2 p-Value = .0668 1/2 p-Value = .0668
Reject H0 Reject H0
1/2 = .025 1/2 = .025
-1.50 0 1.50 Z
Test statistic is in ‘Do not reject’ region
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 p-
Value.
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 p-Value
alternative .5000
hypothesis - .4332
to find .4332 .0668
direction
0 1.50 Z
From Z table:
Z value of sample
lookup 1.50 statistic
One-Tailed Z Test
p-Value Solution
p-Value is P(Z 1.50) = .0668
p-Value
Use
.0668 .5000
alternative
hypothesis - .4332
to find .4332 .0668
direction
0 1.50 Z
From Z table:
Z value of sample
lookup 1.50 statistic
One-Tailed Z Test
p-Value Solution
(p-Value = .0668) ( = .05).
Do not reject H0.
p-Value = .0668
Reject H0
= .05
0 1.50 Z
Test statistic is in ‘Do not reject’ region
p-Value
Thinking Challenge
You’re an analyst for Ford. You
want to find out if the average
miles per gallon of Escorts is at
least 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 < ( = .01). Reject H0.
p-Value
Use .5000
alternative
.004 - .4960
hypothesis .0040
to find .4960
direction
-2.65 0 Z
Z value of sample From Z table:
statistic lookup 2.65
Two-Tailed t Test
of Mean ( Unknown)
One Population Tests
One
Population
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 Test Statistic:
• Ha: 368 X 372.5 368
t 2.25
• = .05 S 12
• df = 36 - 1 = 35 n 36
• Critical Value(s):
Decision:
Reject H0 Reject H0 Reject at = .05
.025 .025
Conclusion:
There is evidence population
-2.030 0 2.030 t 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 Test Statistic:
• Ha: 3.25 X 3.238 3.25
t .82
• .01 S .117
• df 64 - 1 = 63 n 64
• Critical Value(s):
Decision:
Reject H 0 Reject H0 Do not reject at = .01
.005 .005 Conclusion:
There is no evidence
-2.656 0 2.656 t 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 ampere-
hours? 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 Test Statistic:
• Ha: < 140 X 138.47 140
t 2.57
• = .05 S 2.66
• n 20
df = 20 - 1 = 19
• Critical Value(s):
Decision:
Reject H0 Reject at = .05
.05 Conclusion:
There is evidence population
-1.729 0 t 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 Test Statistic:
• Ha: > 5 X 6.4 5
t 1.31
• = .05 S 3.373
• df = 10 - 1 = 9 n 10
• Critical Value(s):
Decision:
Reject H0 Do not reject at = .05
.05
Conclusion:
There is no evidence
0 1.833 t average is more than 5
Z Test of Proportion
Data Types
Data
Quantitative Qualitative
Discrete Continuous
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
Sampling Distribution
Normal Distribution
^
P(P )
npˆ 3 npˆ 1 pˆ .3
– Excludes 0 or n .2
.1
^
2. Mean .0 P
.0 .2 .4 .6 .8 1.0
P̂ p
3. Standard Error
p0 (1 p0 )
pˆ where p0 = Population Proportion
n
Standardizing Sampling
Distribution of Proportion
^ ^
p p ^ p p0
Z
p^ p0(1 p0)
Sampling n Standardized Normal
Distribution Distribution
^P z= 1
P^ ^
P Z= 0 Z
One Population Tests
One
Population
2. Designated 1 -
3. Used in determining test adequacy
4. Affected by
• True value of population parameter
• Significance level
• Standard deviation & sample size n
Finding Power
Step 1
Reject H0
Hypothesis:
15
n
Do Not Draw
H0: 0 368 25 Reject H0
Ha: 0 < 368 = .05
0 = 368 X
Finding Power
Steps 2 & 3
Reject H0
Hypothesis:
15
n
Do Not Draw
H0: 0 368 25 Reject H0
Ha: 0 < 368 = .05
0 = 368 X
‘True’ Situation:
a = 360 (Ha)
Draw
1-
Specify
a = 360 X
Finding Power
Step 4
Reject H0
Hypothesis:
15
n
Do Not Draw
H0: 0 368 25 Reject H0
Ha: 0 < 368 = .05
0 = 368 X
15
‘True’ Situation:
a = 360 (Ha)
X L 0 Z
n
368 1.64
25
Draw
363.065
1-
Specify
a = 360 363.065 X
Finding Power
Step 5
Reject H0
Hypothesis:
15
n
Do Not
H0: 0 368 Draw
25 Reject H0
Ha: 0 < 368 = .05
0 = 368 X
15
‘True’ Situation:
a = 360 (Ha)
X L 0 Z
n
368 1.64
25
Draw
= .154 363.065
1- =.846
Specify Z Table
a = 360 363.065 X
Power Curves
Power H0: 0 Power H0: 0
= 368 in
Example
Possible True Values for a
Chi-Square ( ) Test
2
of Variance
One Population Tests
One
Population
4. Test statistic
2 (n 1)S 2 Sample variance
2
0 Hypothesized pop. variance
Chi-Square (2) Distribution
0 1 2 3 2
Astronomical number
of 2 values
Finding Critical Value
Example
What is the critical 2 value given:
Ha: 2 > 0.7
Reject
n=3
=.05? = .05
df = n - 1 = 2
0 5.991 2
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 (2) Test
Solution
• H0: 2 = 15
Test Statistic:
• Ha: 2 15
(n 1)S 2 (25 1)17.7 2
• = .05 2
02 152
• df = 25 - 1 = 24
• = 33.42
Critical Value(s):
Decision:
/2 = .025 Do not reject at = .05
Conclusion:
There is no evidence
0 12.401 39.364 2 2 is not 15
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
Question 1.
• A company guarantees that its torch batter ies
will last an average of 9.75 hours. After
complains at the company takes a random
sample of battries from stock and tests their
lifetime with the following results :
9.0 9.2 9.5 10.1 9.8 9.3 9.7 9.6 10.0
Stating any assumption made, test the
guarantee at the 0.05 significant level.
• Seuah perusahaan olahraga mengembangkan
sejenis batang pancing sintetis yang dikatakan
mempunyai kekuatan dengan rata-rata tidak
kurang 8 kg. dan simpangan baku 0.5 kg.
Ujilah pernyataan tersebut bila suatu contoh
acak 40 batang pancing. Setelah diuji rata rata
7.8 kg. gunakan taraf nayata 0.05
Question -2
• It is claimed by telephone company that, on
any single day, of all public telephones, the
proportion out of order is under 6%. A random
sample of 300 telephones show that, on a
particular day, 25 were out of order. Does this
evidence show that the telephone company’s
claim is false with 0.01 level significant.