Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
75 views26 pages

Chapter 9 (Compatibility Mode)

This document provides an introduction to hypothesis testing. It discusses key concepts such as formulating the null and alternative hypotheses, specifying the level of significance, and identifying type I and type II errors. The document also explains how to use critical values to test hypotheses about population means and proportions, and outlines the process for calculating test statistics depending on whether the population standard deviation is known or unknown, and whether the sample size is large or small.

Uploaded by

Thomas Anderson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views26 pages

Chapter 9 (Compatibility Mode)

This document provides an introduction to hypothesis testing. It discusses key concepts such as formulating the null and alternative hypotheses, specifying the level of significance, and identifying type I and type II errors. The document also explains how to use critical values to test hypotheses about population means and proportions, and outlines the process for calculating test statistics depending on whether the population standard deviation is known or unknown, and whether the sample size is large or small.

Uploaded by

Thomas Anderson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

6/8/2020

CHAPTER 9

INTRODUCTION TO
HYPOTHESIS TESTING

POINTS TO HIGHLIGHT

 Formulate null and alternative hypotheses for


applications involving a single population mean or
proportion or variance
 Formulate a decision rule for testing a hypothesis
 Know how to use the test statistic, critical value,
and p-value approaches to test the null hypothesis
 Know what Type I and Type II errors are
 Compute the probability of a Type II error

1
6/8/2020

WHAT IS A HYPOTHESIS?

A hypothesis is a claim
(assumption) about a
population parameter:

 population mean
Example: The mean monthly cell phone bill of
this city is μ = $42

 population proportion
Example: The proportion of adults in this
city with cell phones is p = .68

THE NULL HYPOTHESIS, H0

 States the assumption (numerical) to be tested

Example: The average number of TV sets in U.S.


homes is at least three ( )
 Is always about a population parameter, not
about a sample statistic

2
6/8/2020

THE NULL HYPOTHESIS, H0

 Begin with the assumption that the null


hypothesis is true
 Always contains “=” sign
 May or may not be rejected

THE ALTERNATIVE HYPOTHESIS, H1

 Is the opposite of the null hypothesis


e.g.: The average number of TV sets in U.S. homes
is less than 3 ( H1: μ < 3 )
 Never contains the “=” , “≤” or “≥” sign
 May or may not be accepted
 Is generally the hypothesis that is believed (or
needs to be supported) by the researcher

3
6/8/2020

Hypothesis Testing Process

Claim: the
population
mean age is 50.
(Null Hypothesis:
Population
H0: μ = 50 )
Now select a
random sample
Is x = 20 likely if μ = 50?
If not likely, Suppose
the sample
REJECT mean age Sample
Null Hypothesis is 20: x = 20

REASON FOR REJECTING H0

Sampling Distribution of X

x
20 μ = 50
If H0 is true ... then we reject the
If it is unlikely that we
null hypothesis that
would get a sample
μ = 50.
mean of this value ... ... if in fact this were
the population mean…

4
6/8/2020

LEVEL OF SIGNIFICANCE

 Defines unlikely values of sample statistic if null


hypothesis is true
 Defines rejection region of the sampling distribution
 Is designated by α , (level of significance)
 Typical values are .01, .05, or .10
 Is selected by the researcher at the beginning
 Provides the critical value(s) of the test

LEVEL OF SIGNIFICANCE
AND THE REJECTION REGION
Level of significance =  Represents
critical value
H0 : μ = 3 
Rejection
H1 : μ < 3 0 region is
Lower tail test
shaded
H0 : μ = 3 
H1 : μ > 3 Upper tail test 0

H0 : μ = 3 α/2  
H1 : μ ≠ 3
Two tailed test 0

5
6/8/2020

ERRORS IN MAKING DECISIONS

 Type I Error
Reject a true null hypothesis
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

ERRORS IN MAKING DECISIONS

Type II Error
Fail to reject a false null hypothesis

The probability of Type II Error is β

6
6/8/2020

OUTCOMES AND PROBABILITIES

Possible Hypothesis Test Outcomes

State of Nature

Decision H0 True H0 False

Do Not
No error Type II Error
Reject (1 – α) (β)
Key:
Outcome H0
(Probability)
Reject Type I Error No Error
H0 (α) (1-β)

TYPE I & II ERROR RELATIONSHIP

 Type I and Type II errors can not happen at


the same time
 Type I error can only occur if H0 is true
 Type II error can only occur if H0 is false

If Type I error probability ( α ) , then


Type II error probability ( β )

7
6/8/2020

FACTORS AFFECTING TYPE II


ERROR

All else equal,


β when the difference between hypothesized parameter
and its true value

β when α
β when σ
β when n

CRITICAL VALUE
APPROACH TO TESTING

Convert sample statistic (e.g.: X ) to test statistic ( Z or


t statistic )

Determine the critical value(s) for a specified


level of significance α from a table or computer

If the test statistic falls in the rejection region, reject H0 ;


otherwise do not reject H0

8
6/8/2020

LOWER TAIL TESTS


H0: μ = 3

 The cutoff value, H1 : μ < 3

-zα or x1-α , is called


a critical value 

Reject H0 Do not reject H0


-zα 0
x1-α μ

UPPER TAIL TESTS

H0: μ = 3
 The cutoff value, H1 : μ > 3

zα or xα , is called
a critical value 

Do not reject H0 Reject H0


0 zα
μ xα

9
6/8/2020

TWO TAILED TESTS

H0: μ = 3
 There are two cutoff H1 : μ ≠ 3
values (critical values):
± zα/2
α/2 α/2
or H1 : μ 

x1-α/2
Lower
Reject H0 Do not reject H0 Reject H0
xα/2 -zα/2 0 zα/2
Upper x1-α/2 μ0 xα/2
Lower Upper

&

CRITICAL VALUE
APPROACH TO TESTING

Convert sample statistic ( X ) to a test statistic


( Z or t statistic )
Hypothesis
Tests for μ

σ Known σ Unknown

Large Small
Samples Samples

10
6/8/2020

CALCULATING THE TEST STATISTIC

Hypothesis
Tests for μ

σ Known σ Unknown

The test statistic is:


Large Small
Samples Samples

CALCULATING THE TEST STATISTIC

Hypothesis
Tests for μ

σ Known σ Unknown

The test statistic is:


But is sometimes
approximated Large Small
using a z: Samples Samples

11
6/8/2020

CALCULATING THE TEST STATISTIC

Hypothesis
Tests for μ

σ Known σ Unknown

The test statistic is:


Large Small
Samples Samples

(The population must be


approximately normal)

REVIEW: STEPS IN HYPOTHESIS


TESTING
1. Specify the population value of interest
2. Formulate the appropriate null and alternative
hypotheses
3. Specify the desired level of significance
4. Determine the rejection region
5. Obtain sample evidence and compute the test
statistic
6. Reach a decision and interpret the result

12
6/8/2020

HYPOTHESIS TESTING EXAMPLE

Test the claim that the true mean # of TV


sets in US homes is at least 3.
(Assume σ = 0.8)

1. Specify the population value of interest


 The mean number of TVs in US homes
2. Formulate the appropriate null and alternative
hypotheses
 H0: μ = 3 H1: μ < 3 (This is a lower tail test)
3. Specify the desired level of significance
 Suppose that α = .05 is chosen for this test

HYPOTHESIS TESTING EXAMPLE

4. Determine the rejection region

α = .05

Reject H0 Do not reject H0

-zα= -1.645 0

This is a one-tailed test with α = .05.


Since σ is known, the cutoff value is a z value:
Reject H0 if z < - zα = -1.645 ; otherwise do not reject H0

13
6/8/2020

HYPOTHESIS TESTING EXAMPLE

5. Obtain sample evidence and compute the test


statistic
Suppose a sample is taken with the following results:
n = 100, x = 2.84 (σ = 0.8 is assumed known)

Then the test statistic is:

HYPOTHESIS TESTING EXAMPLE

6. Reach a decision and interpret the result

α = .05

z
Reject H0 Do not reject H0
-1.645 0
-2.0
Since z = -2.0 < -1.645, we reject the null hypothesis that the mean
number of TVs in US homes is at least 3

14
6/8/2020

HYPOTHESIS TESTING EXAMPLE

An alternate way of constructing rejection region:


Now
expressed in
α = .05 x, not z
units
x
Reject H0 Do not reject H0
2.8684 3
2.84

Since x = 2.84 < 2.8684, we


reject the null hypothesis

P-VALUE APPROACH TO TESTING

Convert Sample Statistic (e.g. X) to Test Statistic ( Z or


t statistic )
Obtain the p-value from a table or computer
Compare the p-value with α
If p-value < α , reject H0
If p-value > α , do not reject H0

15
6/8/2020

P-VALUE APPROACH TO TESTING

p-value: Probability of obtaining a test statistic


at least as extreme as the one that was actually
observed sample value given H0 is true
Also called observed level of significance

Smallest value of α for which H0 can be rejected

P-VALUE EXAMPLE

Compare the p-value with α


If p-value < α , reject H0
If p-value > α , do not reject H0
α = .05
Here: p-value = .0228 p-value =.0228
α = .05
Since .0228 < .05, we reject the
null hypothesis
2.8684 3
2.84

16
6/8/2020

EXAMPLE: UPPER TAIL Z TEST


FOR MEAN ( KNOWN)
A phone industry manager thinks that customer
monthly cell phone bill have increased, and now average
over $52 per month. The company wishes to test this
claim. (Assume σ = 10 is known)

Form hypothesis test:


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

Example: Find Rejection Region


Suppose that α = .10 is chosen for this test

Find the rejection region: Reject H0

 = .10

Do not reject H0 Reject H0


0 zα=1.28

Reject H0 if z > 1.28

17
6/8/2020

EXAMPLE: TEST STATISTIC

Obtain sample evidence and compute the test statistic


Suppose a sample is taken with the following results:
n = 64, x = 53.1 (σ=10 was assumed known)
Then the test statistic is:

EXAMPLE: DECISION

Reach a decision and interpret the result:


Reject H0

 = .10

Do not reject H0 Reject H0


1.28
0
z = .88
Do not reject H0 since z = 0.88 ≤ 1.28
i.e.: there is not sufficient evidence that the
mean bill is over $52

18
6/8/2020

P -VALUE SOLUTION

Calculate the p-value and compare to α

p-value = .1894

Reject H0
 = .10

0
Do not reject H0 Reject H0
1.28
z = .88

Do not reject H0 since p-value = .1894 > α = .10

EXAMPLE: TWO-TAIL TEST


( UNKNOWN)

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 H0: μ = 168
α = 0.05 level. HA: μ  168
(Assume the population distribution is
normal)

19
6/8/2020

EXAMPLE SOLUTION: TWO-TAIL


TEST

H0: μ = 168 α/2=.025 α/2=.025


H1: μ  68

α= 0.05 Reject H0 Do not reject H0 Reject H0


-tα/2 tα/2
0
n = 25 -2.0639 2.0639
1.46
σ is unknown, so
use a t statistic
Critical Value
t24 = ± 2.0639 Do not reject H0: not sufficient evidence that true
mean cost is different than $168

PROPORTIONS

Sample proportion in the success category is denoted by p

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


approximated by a normal distribution with mean and standard
deviation

20
6/8/2020

HYPOTHESIS TESTS FOR PROPORTIONS

The sampling
distribution of p is Hypothesis
Tests for p
normal, so the test
statistic is a z value:
np ≥ 5 np < 5
and or
n(1-p) ≥ 5 n(1-p) < 5

Not discussed in
this chapter

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 25
responses. Test at the α = .05
Check:
significance level.
n p = (500)(.08) = 40
n(1-p) = (500)(.92) = 460

21
6/8/2020

Z TEST FOR PROPORTION: SOLUTION

Test Statistic:
H0: p = .08
H1: p ≠ .08
α = .05
n = 500, p = .05
Critical Values: ± 1.96 Decision:
Reject H0 at α = .05
Reject Reject
Conclusion:
.025 .025
There is sufficient evidence to reject
z the company’s claim of 8%
-1.96 0 1.96 response rate.
-2.47

P -VALUE SOLUTION

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 = .0136:
α/2 = .025 α/2 = .025

.0068 .0068

-1.96 0 1.96

z = -2.47 z = 2.47

Reject H0 since p-value = .0136 < α = .05

22
6/8/2020

HYPOTHESIS TESTS FOR VARIANCE

The test statistic is a


Hypothesis
χ2 value given that
Tests for σ2
sampled population
is normal :

EXAMPLE: TEST FOR VARIANCE

There is a claim that the variance of the new bottle filling


machine is 1 cubic centimeter. The foreman of the factory
believes that the variance of the machine is less than that. In
order to check this claim, a sample of 25 one-liter bottles
was selected (1 liter = 1000 cubic centimeters). The
estimated sample variance is .6333 cubic centimeter. With a
significance level of 5%, test the claim?

23
6/8/2020

TEST FOR VARIANCE: SOLUTION

Test Statistic:
H0: σ2 = 1 H1:
σ2 < 1
α = .05

Decision:
Reject Do not reject H0 at α = .05
region
Conclusion:
There is not sufficient evidence to
reject the claim that the population
1.96 variance is 1 cubic centimeter
0 -2.47 χ2
= 13.85

TYPE II ERROR

Type II error is the probability of


failing to reject a false H0
Suppose we fail to reject H0: μ = 52
when in fact the true mean is μ = 50

50 52

Reject Do not reject


H0: μ = 52 H0 : μ = 52

24
6/8/2020

TYPE II ERROR

Suppose we do not reject H0: μ = 52 when in fact the


true mean is μ = 50

This is the range of x where H0


This is the true distribution is not rejected
of x if μ = 50

50 52
Reject Do not reject
H0: μ< 52 H0 : μ = 52

TYPE II ERROR

Suppose we do not reject H0: μ = 52 when in fact


the true mean is μ = 50

Here, β = P( x ≥ cutoff ) if μ = 50

α β

50 52
Reject Do not reject
H0: μ = 52 H0 : μ = 52

25
6/8/2020

CALCULATING

Suppose n = 64 , σ = 6 , and α = .05

(for H0 : μ  52)

So β = P( x ≥ 50.766 ) if μ = 50

50 50.766 52
Reject Do not reject
H0: μ = 52 H0 : μ = 52

CALCULATING

Suppose n = 64 , σ = 6 , and α = .05

Probability of
type II error:
α β = .1539

50 52
Reject Do not reject
H0: μ = 52 H0 : μ = 52

26

You might also like