Sie sind auf Seite 1von 47

Chapter 10

One Sample:
Tests of Hypothesis

Week 4-1
Introduction

Hypothesis Testing Definition:


 Hypothesis testing is a procedure to test the
statement regarding a characteristics of one or
more populations based on sample evidence
and probability.

 In the hypothesis testing, we normally have


interested to test 2 types of parameters, which
are population mean and proportion.

Week 4-2
Step 1: State the null and alternative
hypothesis

Null hypothesis (Ho) is a statement to


claim (assumption) about a unknown
population parameter.

 States the assumption (numerical) to be tested

Week 4-3
Step 1 (Continue)

Alternative hypothesis (H1 )is the statement that we


are trying to find evidence to support it and it is the
opposite of the null hypothesis.

For example: The average number of TV sets in Malaysia


homes is not equal to 3 ( H1: μ ≠ 3 )

Week 4-4
Week 4-5
Step 2: State the significance level

What is the significance level?


 It is the probability of rejecting Ho given that Ho is
true at desire level, which is set by researcher.

 Normally, significance level set by researcher is at


1%, 5% and 10% level.

Significance Level =  =Type 1 error

Week 4-6
Step 2 (Continue)

There are two types errors in making decisions


 Type I Error
 Reject a true null hypothesis, Ho
 Considered a serious type of error

The probability of Type I Error is 


 Called level of significance of the test
 Set by researcher in advance
 This error is always made by researcher in hypothesis
testing. Week 4-7
Step 2 (continue)

 Type II Error
 Fail to reject a false null hypothesis, Ho
 This error is not exist in hypothesis testing.
The probability of Type II Error is β

Week 4-8
Step 2 (Continue)

Possible Hypothesis Test Outcomes

Actual Situation
Decision H0 True H0 False
Do Not
No error Type II Error
Key: Reject
(1 -  ) (β)
Outcome H0
(Probability) Reject Type I Error No Error
H0 ( ) (1-β)

Week 4-9
Step 3
 State the decision rule for hypothesis testing

Definition of decision rule:

Decision rule is the statement regarding


the condition that allow us to reject the
statement in the null hypothesis

Decision rule is the process to


determine the critical region or rejection
region, which is the all values such that
null hypothesis is rejected.
Week 4-10
Step 3 (Continue)

State the decision rule in the diagram form

/2 1– /2

Week 4-11
Step 3 (Continue)
Level of significance =  Represents
Critical Value
H0: μ = 3 / /
2 2 Rejection
H1: μ ≠ 3 Two-tail test 0 Region is
shaded
H0: μ ≤ 3 
H1: μ > 3 Upper-tail test 0
*Different level of
H0: μ ≥ 3 significance
 will have different
decision rule (the
H1: μ < 3 rejection region).
Lower-tail test 0
Week 4-12
Step 4: Find the critical value
H 0: μ = 3
Two-Tailed Test H1 : μ ≠ 3

/2 /2
 There are two
cutoff values 3 X
(critical values),
Reject H0 Do not reject H0 Reject H0
defining the Z
-Z 0 +Z
regions of
rejection
Lower critical Upper critical
value value
Week 4-13
Step 4 (Continue)
H 0: μ = 3
Left-Tailed Test H1 : μ < 3


 There are one
cutoff value 3 X
(critical value),
Reject H0 Do not reject H0
defining the Z
-Z 0
regions of
rejection
Lower critical
value
Week 4-14
Step 4 (Continue)
H 0: μ = 3
Right-Tailed Test H1 : μ > 3


 There are one
cutoff value 3 X
(critical value),
Do not reject H0 Reject H0
defining the Z
0 +Z
regions of
rejection
Upper critical
value
Week 4-15
Step 5
Compute test statistic value of hypothesis testing

 Step 5 is the process to convert the statistic value


to become Z or t value.

 The computation of the test statistic value is


depended on the assumption of the test.

Week 4-16
Step 5 (Continue)
Hypothesis Tests for the Population Mean
Hypothesis
Tests for 

 Known Unknown
and sample and sample
size is large size is small
( n  30) (n < 30)

Week 4-17
Step 5 (Continue)
 Convert sample statistic ( X ) to a Z test statistic
Hypothesis
Tests for 

σ Known σ Unknown

The test statistic is:


X μ Z test of hypothesis for the
Z 
σ population mean (σ known)
n
Week 4-18
Step 5 (Continue)
 Convert sample statistic ( X ) to a t test statistic
Hypothesis
Tests for 

σ Known σ Unknown

The test statistic is:


t-test of hypothesis for the
population mean X μ
(σ Unknown) t n-1 
S
n
Week 4-19
Step 5 (Continue)

Hypothesis Tests for Population Proportion


 The sampling Hypothesis
distribution of Ps is Tests for p
approximately
normal, so the test
statistic is a Z value: np  5 np < 5
and or
ps  p n(1-p)  5
Z n(1-p) < 5
p (1  p )
Not discussed
n in this chapter

Week 4-20
Step 5 (Continue)

 Sample proportion in the success category is denoted


by ps

 X number of successes in sample


ps  
n sample size

 When both np and n(1-p) are at least 5, ps can be


approximated by a normal distribution with mean
and standard deviation p(1  p)
 μ p σ ps 
ps n
Week 4-21
Step 6
 Decision making is the process to make
decision either to reject or do not reject Ho
after making comparison between test
statistic values and critical value.

Reject Ho Do not reject


Ho

Week 4-22
Step 7: Making Conclusion
We have enough/sufficient evidence
to conclude that (the statement in H1)
at significance level (1% or 5% or 10%??).

OR

We have no enough/ insufficient evidence


to conclude that (the statement in H1)
at significance level (1% or 5% or 10%??).

Week 4-23
Review: 7 Steps in Hypothesis
Testing
 Step 1: State the null and alternative hypothesis
 Step 2: State the significance level.
 Step 3: State the statement of decision rule to determine
the rejection region(s).
 Step 4: Find the critical value of the test from the
statistical table.
 Step 5: Determine the appropriate statistical technique
and the test statistic to use.
 Step 6: Make the comparison between test statistics value
and critical value to make statistical decision.
 Step 7: Making conclusion.

Week 4-24
1 Scenario…
st

σ is known…

WEEK2-25
Week 4-25
Hypothesis Testing Example
Test the claim that the true mean no. of TV
sets in Malaysia homes is equal to 3 and σ =
0.8. A random sample of 100 homes is
selected with the mean no. of TV sets equal
to 2.84
 Step 1: State the appropriate null and alternative
hypotheses
 H0: μ = 3 H1: μ ≠ 3 (This is a two tailed test)

 Step 2: Specify the desired level of significance


 Suppose that  = 0.05 is chosen for this test
Week 4-26
Hypothesis Testing Example
(continued)
 Step 3: Decision rules
 Reject H0 if test statistic value is less than lower bound
critical value or more than upper bound critical value.
Otherwise, do not reject H0.

 Step 4: Find the critical values


 For  = 0.05 the critical Z values are ±1.96

 Step 5: Compute the test statistic


X μ 2.84  3  .16
Z     2.0
σ 0.8 .08
n 100

Week 4-27
Hypothesis Testing Example
(continued)
 Step 6: Decision making
 Since Z = -2.0 < -1.96, we reject the null hypothesis.

 = 0.05/2  = 0.05/2

Reject H0 Do not reject H0 Reject H0

-Z= -1.96 0 +Z= +1.96

Here, Z = -2.0 < -1.96, so the test


statistic is in the rejection region

Week 4-28
Hypothesis Testing Example
(continued)
 Step 7: Conclusion
 There is sufficient evidence that the mean number of
TVs in Malaysia homes is not equal to 3.

Week 4-29
Additional Step…

i. P-Value Approach to Testing …

WEEK2-30
Week 4-30
Additional Step: P-Value Approach

P-Value definition: is the probability of rejecting Ho given


that Ho is true after hypothesis
testing is implemented.

is the actual probability for type I error has been


made by researcher after the conclusion is drawn.

If p-value <  , reject H0

If p-value   , do not reject H0

Week 4-31
Continued Example…
 Step 1: State the appropriate null and alternative
hypotheses
 H0: μ = 3 H1: μ ≠ 3 (This is a two tailed test)

 Step 2: Specify the desired level of significance


 Suppose that  = 0.05 is chosen for this test

 Step 3: Decision Rules


 Reject H0 if P-value < α (0.05). Otherwise, do not reject
H0.

Week 4-32
Continued Example…
 Step 5: Compute the test statistic
X  μ 2.84  3  .16
Z     2.0
σ 0.8 .08
n 100
 Step 5: Find the p-value by Z-score
 From the z-table, p-value = 0.02275 when z-value = -2.0
 P-value = 0.02275 X 2 = 0.0455 (2-tails test)

 Step 6: Decision Making


 Since p-value = 0.0455 < α (0.05), reject H0.

 Step 7: Conclusion
 There is sufficient evidence that the mean number of TVs in Malaysia
homes is not equal to 3.
Week 4-33
2nd Scenario…

σ is Unknown…
n is large…
WEEK2-34
Week 4-34
Hypothesis Testing Example
A phone industry manager thinks that customer monthly
cell phone bill have increased, and now average over
RM52 per month. The company wishes to test this claim
by using a random sample of 64 customer monthly bill
with mean equal to 53.1 and standard deviation of 10.

Form hypothesis test:


H0: μ ≤ 52 the average is not over RM52 per month
H1: μ > 52 the average is greater than RM52 per month
(i.e., sufficient evidence exists to support the
manager’s claim)

Week 4-35
Example: Find Rejection Region
(continued)
 Suppose that  = 0.10 is chosen for this test

Find the rejection region: Reject H0

=0.10

Do not reject H0 Reject H0


0 1.28

Reject H0 if Z test > 1.28. Otherwise, do


not reject H0.
Week 4-36
Example: Test Statistic
(continued)

Obtain sample and compute the test statistic


 Then the test statistic is:

Xμ 53.1  52
Z   0.88
s 10
n 64

Week 4-37
Example: Decision
(continued)
Reach a decision and interpret the result:
Reject H0

= 0.10

Do not reject H0 Reject H0


0
1.28
Z = 0.88

Do not reject H0 since Z = 0.88 ≤ 1.28. There is


not sufficient evidence that the mean bill is over
RM52
Week 4-38
P -Value Solution
(continued)
Calculate the p-value and compare to 
(assuming that μ = 52.0)
p-value = 0.1894

Reject H0
P(X  53.1)
= 0.10
 53.1  52.0 
 P Z  
0  10/ 64 
Do not reject H0
1.28
Reject H0
 P(Z  0.88)  1  0.8106
Z = 0.88  0.1894

Do not reject H0 since p-value = 0.1894 >  = 0.10


Week 4-39
3rd Scenario…

σ is Unknown…
n is small…
WEEK2-40
Week 4-40
Hypothesis Testing Example

The average cost of a hotel


room in New York is said
to be $168 per night. A
random sample of 25
hotels resulted in
X = $172.50 and
S = $15.40. Test at the
 = 0.05 level.
(Assume the population distribution is normal)

Week 4-41
Hypothesis Testing Example
H0: μ = 168
H1: μ ≠ 168 /2=0.025 /2=0.025

  = 0.05
 n = 25 Reject H0 Do not reject H0 Reject H0
-t n-1,α/2 0
t n-1,α/2
 Critical Value: t24 = ±2.0639
-2.0639 2.0639
1.46
  is unknown, so X μ 172.50  168
use a t statistic t n 1    1.46
S 15.40
n 25
 Reject H0 if t-test is less than
lower bound critical value or
more than upper bound Do not reject H0. There is not sufficient evidence
critical value. Otherwise, do that true mean cost is different than $168
not reject H0.
Week 4-42
Solution: P-value and Confidence Intervals

 P-value = 0.0721 x 2 = 0.14


 For X = 172.5, S = 15.40 and n = 25, the 95%
confidence interval is:
__
s
 X  Z
2 n
15.4
 172.5  (2.0639)
25

166.14 ≤ μ ≤ 178.86

 Since this interval contains the Hypothesized mean (168), we do


not reject the null hypothesis at  = 0.05 Week 4-43
Last Scenario…

Population Proportion…

WEEK2-44
Week 4-44
Example: Z Test for Proportion

A marketing company
claims that it receives 8%
responses from its
mailing. To test this
claim, a random sample of
500 were surveyed with
Check:
25 responses. Test at the
 = 0.05 significance n p = (500)(0.08) = 40
level. n(1-p) = (500)(0.92) = 460

Week 4-45
Z Test for Proportion: Solution
Test Statistic:
H0: p = 0.08
ps  p 0.05  0.08
H1: p ≠ 0.08 Z   2.47
p(1  p) 0.08(1  0.08)
α = 0.05
n 500
n = 500, ps = 0.05
Critical Values: ± 1.96 Decision:
Reject Reject Reject H0 at  = 0.05
Conclusion:
0.025 0.025
There is sufficient
-1.96 0 1.96 z evidence to reject the
-2.47 company’s claim of 8%
response rate.
Week 4-46
P-Value Solution
(continued)
Calculate the p-value and compare to 
(For a two sided test the p-value is always two sided)

Do not reject H0
Reject H0 Reject H0 p-value = 0.0136:
/2 = 0.025 /2 =0.025
P(Z  2.47)  P(Z  2.47)
0.0068 0.0068
 2(.0068)  0.0136
-1.96 0 1.96

Z = -2.47 Z = 2.47

Reject H0 since p-value = 0.0136 <  = 0.05

Week 4-47

Das könnte Ihnen auch gefallen