Professional Documents
Culture Documents
L04-Pengujian Hipotesis - r1
L04-Pengujian Hipotesis - r1
L04-Pengujian Hipotesis - r1
MAGISTER AKUNTANSI
FAKULTAS EKONOMI DAN BISNIS
UNIVERSITAS INDONESIA
1
Outline of Presentation Material
1. Basic Idea of hypothesis Testing
2. Hypothesis Testing for Population Mean
• Two-Tailed Z Test of Mean ( Known)
• One-Tailed Z Test of Mean ( Known)
• Two-Tailed t Test of Mean ( Unknown)
3. Hypothesis Testing for Population Proportion
4. Hypothesis Testing for Two Population Means and Proportion
5. Decision Making Risks
2
Hypothesis Testing
I believe the
population mean age
is 50 (hypothesis). Reject
hypothesis! Not
Population close.
Random
sample
Mean
X = 20
3
Stating a Hypothesis?
4
Basic Idea
Sampling Distribution for sample mean
It is unlikely that
we would get a ... therefore, we reject
sample mean of
this value ... the hypothesis that m
= 50.
m = 50 Sample Means
20 H0
5
Hypothesis Testing
6
Test Statistic versus Critical Value
Example: z, t, F, 2
CRITICAL VALUE. The dividing point between the region where the null
hypothesis is rejected and the region where it is not rejected.
Level of Significance
1. Probability type
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
8
Rejection Region (One-Tail Test)
Rejection
Region
1–
Nonrejection
Region
Ho Sample Statistic
Critical Value
Value
Observed sample statistic
9
Rejection Region (One-Tail Test)
Rejection
Region
1–
Nonrejection
Region
Ho Sample Statistic
Critical Value
Value
Observed sample statistic
10
Rejection Regions (Two-Tailed Test)
Rejection Rejection
Region Region
1–
1/2 1/2
Nonrejection
Region
Ho Sample Statistic
Critical Value Critical
Value Value
Observed sample statistic
11
Rejection Regions
(Two-Tailed Test)
Rejection Rejection
Region Region
1–
1/2 1/2
Nonrejection
Region
Ho Sample Statistic
Critical Value Critical
Value Value
Observed sample statistic
12
Rejection Regions
(Two-Tailed Test)
Rejection Rejection
Region Region
1–
1/2 1/2
Nonrejection
Region
Ho Sample Statistic
Critical Value Critical
Value Value
Observed sample statistic
13
Two-tail Test in Normal Standard Distribution (Z)
One-tail Test in Normal Standard Distribution (Z)
One-Tailed Z Test Finding Critical Z
.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
16
Hypothesis Setups for Testing a Mean (m)
17
Two-Tailed Z Test
of Mean ( Known)
18
Two -Tailed Z Test for Mean ( Known)
1. Assumptions
• Population is normally distributed
• If not normal, can be approximated by
normal distribution since n 30.
2. Alternative hypothesis has sign
3. Z-test Statistic
X mx X m
Z
x
n
19
Two-Tailed Z Test Example
level of significance.
20
Two-Tailed Z Test Solution
22
One-Tailed Z Test for Mean ( Known)
1. Assumptions
• Population is normally distributed
• If not normal, can be approximated by
normal distribution, since n 30
2. Alternative hypothesis has < or > sign
3. Z-test Statistic
X mx X m
Z
x
n
23
One-Tailed Z Test for Mean Hypotesis
Reject H 0 Reject H 0
0 Z 0 Z
Must be significantly below Small values satisfy H0 .
m Don’t reject!
24
One-Tailed Z Test Example
A random sample of 25
boxes showed x = 372.5.
The company has specified
to be 15 grams. Test at 368 gm.
the .05 level of significance.
25
One-Tailed Z Test Solution
27
One-Tailed Z Test Thinking Challenge
28
One-Tailed Z Test Solution*
30
Observed Significance
Levels: p-Values
31
p-Value
32
Two-Tailed Z Test p-Value Example
p-Value.
33
Two-Tailed Z Test p-Value Solution
0 1.50 Z
Z value of sample statistic
(observed)
34
Two-Tailed Z Test p-Value Solution
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 statistic
lookup 1.50 (observed)
35
Two-Tailed Z Test p-Value Solution
-1.50 0 1.50 Z
From Z table: Z value of sample statistic
lookup 1.50
36
Two-Tailed Z Test p-Value Solution
Reject H0 Reject H0
1/2 = .025 1/2 = .025
-1.50 0 1.50 Z
Test statistic is in ‘Do not reject’ region
37
One-Tailed Z Test p-Value Example
38
One-Tailed Z Test p-Value Solution
Ho:m = 368
X m 372.5 368
Ha:m > 368 Z 1.50
15
n 25
0 1.50 Z
Z value of sample statistic
39
One-Tailed Z Test p-Value Solution
Use alternative
p-Value
hypothesis to .5000
find direction - .4332
.0668
.4332
0 1.50 Z
From Z table:
lookup 1.50
Z value of sample statistic
40
One-Tailed Z Test p-Value Solution
p-Value
Use alternative
hypothesis to .0668 .5000
find direction - .4332
.0668
.4332
0 1.50 Z
From Z table:
lookup 1.50
Z value of sample statistic
41
One-Tailed Z Test p-Value Solution
Reject H0
= .05
0 1.50 Z
Test statistic is in ‘Do not reject’ region
42
p-Value: Thinking Challenge
43
p-Value: Solution*
Ho:m >= 368
p-Value is P(Z -2.65) = .004. Ha:m < 368
p-Value < ( = .01). Reject H0.
p-Value
Use alternative .5000
hypothesis to .004 - .4960
.0040
find direction
.4960
-2.65 0 Z
Z value of sample From Z table:
statistic lookup 2.65
44
Two-Tailed t Test
of Mean ( Unknown)
45
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 m
t
S
n
46
Two-Tailed t Test, Finding Critical t
Values
df = n - 1 = 2
v t.10 t.05 t.025
/2 =
.05 1 3.078 6.314 12.706
/2 = .05
2 1.886 2.920 4.303
-2.920 0 2.920 t
3 1.638 2.353 3.182
47
Two-Tailed t Test, Example
48
Two-Tailed t Test, Solution
50
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.
51
Two-Tailed t Test
Solution*
H0: m = 3.25 Test Statistic:
Ha: m 3.25 X m 3.238 3.25
t .82
.01 S .117
df 64 - 1 = 63 n 64
Critical Value(s):
Decision:
Reject H0 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
52
Use the Mean Comparison t-test
Calculator made by Stata v.15
53
Hypothesis Testing For
Proportion
54
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?
55
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
56
Sampling Distribution of Proportion
1. Approximated by
Sampling Distribution
Normal Distribution
np 3 np1 p
P(p )
.3
.2
.1
2. Mean .0 p
mp .0 .2 .4 .6 .8 1.0
3. Standard Error
(1 )
p where = Population Proportion
n
57
Standardizing Sampling Distribution of
Proportion
p^ m p^ p^ p0
Z
p^ p0 (1 p0)
Sampling n Standardized Normal
Distribution Distribution
P^ z = 1
m P^ ^
P m Z= 0 Z
58
One-Sample Z Test for Proportion
1. Assumptions
• Random sample selected from a binomial
population
• Normal approximation can be used if
np 15 and n(1-p) 15
59
Hypothesis Setups for Testing a Proportion ()
60
One-Proportion Z Test Example
61
One-Proportion Z Test Solution
63
One-Proportion Z Test Thinking Challenge
64
One-Proportion Z Test Solution*
66
TWO-SAMPLES MEAN TEST
Comparing Two Population Means
No assumptions about the shape of the populations are required.
The samples are from independent populations.
The formula for computing the value of z is:
X1 X 2 X1 X 2
z z
12 22 s12 s22
n1 n2 n1 n2
Comparing Two Population Means - Example
The U-Scan facility was recently installed at the Byrne Road Food-Town
location. The store manager would like to know if the mean checkout
time using the standard checkout method is longer than using the U-
Scan. She gathered the following sample information. The time is
measured from when the customer enters the line until their bags are in
the cart. Hence the time includes both waiting in line and checking out.
EXAMPLE 1 continued
Step 1: State the null and alternate hypotheses.
(keyword: “longer than”)
H0: µS ≤ µU
H1: µS > µU
Reject H0 if Z > Z
Z > 2.33
EXAMPLE 1 continued
Step 5: Compute the value of z and make a decision
Xs Xu
z
s2 u2
ns nu The computed value of 3.13 is larger than the
5.5 5.3 critical value of 2.33.
0.40 2 0.30 2 Our decision is to reject the null hypothesis.
The difference of .20 minutes between the
50 100 mean checkout time using the standard
0.2 method is too large to have occurred by
3.13 chance.
0.064
We conclude the U-Scan method is faster.
Use the Mean-Comparison z-test
Calculator made by Stata v.15
73
Two-Sample Tests of Hypothesis: Dependent Samples
Dependent samples are samples that are paired or related
in some fashion.
For example:
If you wished to buy a car you would look at the same
car at two (or more) different dealerships and
compare the prices.
If you wished to measure the effectiveness of a new
diet you would weigh the dieters at the start and at
the finish of the program.
Hypothesis Testing Involving Paired Observations
Use the following test when the samples are
dependent:
d
t
sd / n
Where
d is the mean of the differences
sd is the standard deviation of the differences
n is the number of pairs (differences)
Hypothesis Testing Involving Paired Observations - Example
H0: md = 0
H1: md ≠ 0
Reject H0 if
t > t/2, n-1 or t < - t/2,n-1
t > t.025,9 or t < - t.025, 9
t > 2.262 or t < -2.262
Hypothesis Testing Involving Paired Observations
- Example
Step 5: Compute the value of t and make a decision
81
2 SAMPLES PROPORTION
TEST
Two Sample Tests of Proportions
We investigate whether two samples came from
populations with an equal proportion of successes.
The computed value of -2.21 is in the area of rejection. Therefore, the null hypothesis is rejected at
the .05 significance level.
To put it another way, we reject the null hypothesis that the proportion of young women who would
purchase Heavenly is equal to the proportion of older women who would purchase Heavenly.
Use the Proportion test
Calculator made by Stata v.15
89
Decision Making Risks
90
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)
91
Decisions and Consequences in
Hypothesis Testing
True Situation
Researcher Decision Ho is True Ho is False
Accept Ho Right decision with Wrong decision
Probability (Type II Error)
(1-) with probability
Reject Ho Wrong Decision Right decision
(Type I Error) Power of Test
with probability with Probability
(1-)
92
& Have an Inverse Relationship
93
The end …….
Thank You
94
Searching Stata Syntax Location
95