92
Statistics for Economics Department of Economics Dr. Mohammad Zainal ECON 506 Chapter 9 Hypothesis Testing: Single Population

Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Embed Size (px)

Citation preview

Page 1: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Statistics for Economics

Department of Economics

Dr. Mohammad ZainalECON 506

Chapter 9Hypothesis Testing:Single Population

Page 2: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Chapter Goals

After completing this chapter, you should be able to:

Formulate null and alternative hypotheses for applications involving a single population mean from a normal distribution a single population proportion (large samples) the variance of a normal distribution

Formulate a decision rule for testing a hypothesis Know how to use the critical value and p-value

approaches to test the null hypothesis (for both mean and proportion problems)

Know what Type I and Type II errors are Assess the power of a test

Econ 506, by Dr. M. Zainal Ch. 9-2

Page 3: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

What is a Hypothesis?

We perform of hypothesis only when we are making a decision about a population parameter based the value of a sample statistic.

Consider an example of a person who has been indicted for committing a crime and is being tried in a court.

Based on the available evidence, the judge will make one of the following decisions: The person is not guilty (null hypothesis, Ho). The person is guilty (alternative hypothesis, H1).

Econ 506, by Dr. M. Zainal Ch. 9-3

Page 4: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

What is a Hypothesis?

A null hypothesis is a claim about a population parameter that is assumed to be true until it is declared false.

An alternative hypothesis is a claim about a population parameter that will be true if the null hypothesis is false.

The alternative hypothesis is often what the test is attempting to establish.

Econ 506, by Dr. M. Zainal Ch. 9-4

Page 5: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

What is a Hypothesis?

The research hypothesis should be expressed as the alternative hypothesis

Manufacturers’ claims are usually given the benefit of the doubt and stated as the null hypothesis.

Econ 506, by Dr. M. Zainal Ch. 9-5

Page 6: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

What is a Hypothesis?

In the court example, we start the prosecution by assuming the person is not guilty.

The prosecutors collect all possible evidences to prove the null hypothesis is false (guilty).

Rejection and nonrejection regionsNot enough evidence to declare theperson guilty and, hence, the nullhypothesis is not rejected in this region

Enough evidence to declare the personguilty and, hence, the null hypothesis isrejected in this region

Nonrejection region Rejection region

C

Critical point

Level of evidence0

Econ 506, by Dr. M. Zainal Ch. 9-6

Page 7: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

What is a Hypothesis?

Actual Situation

The person is not guilty The person is guilty

Court’s decision

The person is not guilty Correct  decision

Type II or  error

The person is guiltyType I or error

Correct  decision

Econ 506, by Dr. M. Zainal Ch. 9-7

Page 8: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

What is a Hypothesis?

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

population mean

population proportion

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

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

9.1

Econ 506, by Dr. M. Zainal Ch. 9-8

Page 9: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

The Null Hypothesis, H0

States the assumption (numerical) to be testedExample: The average number of TV sets in

U.S. Homes is equal to three ( )

Is always about a population parameter, not about a sample statistic

3μ:H0

3μ:H0 3X:H0

Econ 506, by Dr. M. Zainal Ch. 9-9

Page 10: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

The Null Hypothesis, H0

Begin with the assumption that the null hypothesis is true Similar to the notion of innocent until

proven guilty Refers to the status quo Always contains “=” , “≤” or “” sign May or may not be rejected

(continued)

Econ 506, by Dr. M. Zainal Ch. 9-10

Page 11: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

The Alternative Hypothesis, H1

Is the opposite of the null hypothesis e.g., The average number of TV sets in U.S.

homes is not equal to 3 ( H1: μ ≠ 3 ) Challenges the status quo Never contains the “=” , “≤” or “” sign May or may not be supported Is generally the hypothesis that the

researcher is trying to support

Econ 506, by Dr. M. Zainal Ch. 9-11

Page 12: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Population

Claim: thepopulationmean age is 50.(Null Hypothesis:

REJECT

Supposethe samplemean age is 20: X = 20

SampleNull Hypothesis

20 likely if μ = 50?Is

Hypothesis Testing Process

If not likely,

Now select a random sample

H0: μ = 50 )

X

Econ 506, by Dr. M. Zainal Ch. 9-12

Page 13: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Reason for Rejecting H0

Sampling Distribution of X

μ = 50If H0 is true

If it is unlikely that we would get a sample mean of this value ...

... then we reject the null

hypothesis that μ = 50.

20

... if in fact this werethe population mean…

X

Econ 506, by Dr. M. Zainal Ch. 9-13

Page 14: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Level of Significance,

Defines the unlikely values of the sample statistic if the 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

Econ 506, by Dr. M. Zainal Ch. 9-14

Page 15: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Level of Significance and the Rejection Region

H0: μ ≥ 3 H1: μ < 3

0

H0: μ ≤ 3 H1: μ > 3

Representscritical value

Lower-tail test

Level of significance =

0Upper-tail test

Two-tail testRejection region is shaded

/2

0

/2H0: μ = 3 H1: μ ≠ 3

Econ 506, by Dr. M. Zainal Ch. 9-15

Page 16: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

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

Econ 506, by Dr. M. Zainal Ch. 9-16

Page 17: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Errors in Making Decisions

Type II Error Fail to reject a false null hypothesis

The probability of Type II Error is β

(continued)

Econ 506, by Dr. M. Zainal Ch. 9-17

Page 18: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Outcomes and Probabilities

Actual SituationDecisionDo NotReject

H0

No Error(1 - )

Type II Error( β )

RejectH0

Type I Error( )

Possible Hypothesis Test Outcomes

H0 FalseH0 True

Key:Outcome

(Probability) No Error( 1 - β )

Econ 506, by Dr. M. Zainal Ch. 9-18

Page 19: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Type I & II Error Relationship

Type I and Type II errors can not happen atthe 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 ( β )

Econ 506, by Dr. M. Zainal Ch. 9-19

Page 20: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Factors Affecting Type II Error

All else equal, β when the difference between

hypothesized parameter and its true value

β when

β when σ

β when n

Econ 506, by Dr. M. Zainal Ch. 9-20

Page 21: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Formulating Hypotheses

Left-TailedTest

Right-TailedTest

Two-TailedTest

Sign in the null hypothesis Ho

= or = or =

Sign in the alternative hypothesis HA

< >

Critical region In the left tail In the right tail In both tails

Econ 506, by Dr. M. Zainal Ch. 9-21

Page 22: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Formulating Hypotheses

Example 1: A manufacturing company has worked to reduce the noise of one of their tools. They would like to show in its advertising that the tool is quieter. The average of the prior design was 150 decibels.

What is the appropriate hypothesis test?

Econ 506, by Dr. M. Zainal Ch. 9-22

Page 23: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Formulating Hypotheses

What is the appropriate test?

H0: µ ≥ 150 (the tool is not quieter) status quoHA: µ < 150 (the tool is quieter) wants to support

If the null hypothesis is rejected, the company has sufficient evidence to support that the tool is now quieter.

Econ 506, by Dr. M. Zainal Ch. 9-23

Page 24: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Formulating Hypotheses

Example 2: The average annual income of buyers of Ford pickup trucks is claimed to be $65,000 per year. An industry analyst would like to test this claim.

What is the appropriate hypothesis test?

Econ 506, by Dr. M. Zainal Ch. 9-24

Page 25: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Formulating Hypotheses

Example 1: The average annual income of buyers of Ford F150 pickup trucks is claimed to be $65,000 per year. An industry analyst would like to test this claim.

What is the appropriate test?

H0: µ = 65,000 (income is as claimed) status quoHA: µ ≠ 65,000 (income is different than claimed)

The analyst will believe the claim unless sufficient evidence is found to discredit it.

Econ 506, by Dr. M. Zainal Ch. 9-25

Page 26: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Power of the Test

The power of a test is the probability of rejecting a null hypothesis that is false

i.e., Power = P(Reject H0 | H1 is true)

Power of the test increases as the sample size increases

Econ 506, by Dr. M. Zainal Ch. 9-26

Page 27: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Hypothesis Tests for the Mean

Known Unknown

Hypothesis Tests for

Econ 506, by Dr. M. Zainal Ch. 9-27

Page 28: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Test of Hypothesisfor the Mean (σ Known)

Convert sample result ( ) to a z value

The decision rule is:

α0

0 z

nσμxz if H Reject

σ Known σ Unknown

Hypothesis Tests for

Consider the test

00 μμ:H

01 μμ:H

(Assume the population is normal)

x

9.2

Econ 506, by Dr. M. Zainal Ch. 9-28

Page 29: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Decision Rule

Reject H0Do not reject H0

zα0

μ0

H0: μ = μ0

H1: μ > μ0

Critical value

Z

α0

0 z

nσμxz if H Reject

nσ/Zμx if H Reject α00

nσzμ α0

Alternate rule:

x

cxEcon 506, by Dr. M. Zainal Ch. 9-29

Page 30: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

p-Value Approach to Testing

p-value: Probability of obtaining a test statistic more extreme ( ≤ or ) than the observed sample value given H0 is true

Also called observed level of significance

Smallest value of for which H0 can be rejected

Econ 506, by Dr. M. Zainal Ch. 9-30

Page 31: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

p-Value Approach to Testing Convert sample result (e.g., ) to test statistic (e.g., z

statistic )

Obtain the p-value For an upper

tail test:

Decision rule: compare the p-value to

If p-value < , reject H0

If p-value , do not reject H0

(continued)x

)μμ | nσ/

μ-x P(z

true) is H that given , nσ/

μ-x P(z value-p

00

00

Econ 506, by Dr. M. Zainal Ch. 9-31

Page 32: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

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)

H0: μ ≤ 52 the average is not over $52 per monthH1: μ > 52 the average is greater than $52 per month

(i.e., sufficient evidence exists to support the manager’s claim)

Form hypothesis test:

Econ 506, by Dr. M. Zainal Ch. 9-32

Page 33: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Suppose that = .10 is chosen for this test

Find the rejection region:

Reject H0Do not reject H0

= .10

1.280

Reject H0

Example: Find Rejection Region(continued)

1.28nσ/

μxz if H Reject 00

Econ 506, by Dr. M. Zainal Ch. 9-33

Page 34: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Example: Sample Results

Obtain sample and compute the test statistic

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

Using the sample results,

0.88

6410

5253.1

μxz 0

(continued)

Econ 506, by Dr. M. Zainal Ch. 9-34

Page 35: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Example: Decision

Reach a decision and interpret the result:

Reject H0Do not reject H0

= .10

1.280

Reject H0

Do not reject H0 since z = 0.88 < 1.28i.e.: there is not sufficient evidence that the

mean bill is over $52

z = 0.88

(continued)

Econ 506, by Dr. M. Zainal Ch. 9-35

Page 36: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Example: p-Value Solution

Calculate the p-value and compare to (assuming that μ = 52.0)

Reject H0

= .10

Do not reject H0 1.280

Reject H0

Z = .88

(continued)

.1894

.810610.88)P(z

6410/52.053.1zP

52.0) μ | 53.1xP(

p-value = .1894

Do not reject H0 since p-value = .1894 > = .10Econ 506, by Dr. M. Zainal Ch. 9-36

Page 37: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

One-Tail Tests

In many cases, the alternative hypothesis focuses on one particular direction

H0: μ ≥ 3 H1: μ < 3

H0: μ ≤ 3 H1: μ > 3

This is a lower-tail test since the alternative hypothesis is focused on the lower tail below the mean of 3

This is an upper-tail test since the alternative hypothesis is focused on the upper tail above the mean of 3

Econ 506, by Dr. M. Zainal Ch. 9-37

Page 38: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Upper-Tail Tests

Reject H0Do not reject H0

zα0μ

H0: μ ≤ 3 H1: μ > 3

There is only one critical value, since the rejection area is in only one tail

Critical value

Zx

cx

Econ 506, by Dr. M. Zainal Ch. 9-38

Page 39: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Lower-Tail Tests

Reject H0 Do not reject H0

There is only one critical value, since the rejection area is in only one tail

-z 0

μ

H0: μ ≥ 3 H1: μ < 3

Z

Critical value

x

cx

Econ 506, by Dr. M. Zainal Ch. 9-39

Page 40: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Two-Tail Tests

In some settings, the alternative hypothesis does not specify a unique direction

Do not reject H0 Reject H0Reject H0

There are two critical values, defining the two regions of rejection

/2

0

H0: μ = 3 H1: μ 3

/2

Lower critical value

Uppercritical value

3

z

x

-z/2 +z/2

Econ 506, by Dr. M. Zainal Ch. 9-40

Page 41: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Hypothesis Testing ExampleTest the claim that the true mean # of TV

sets in US homes is equal to 3.(Assume σ = 0.8)

State the appropriate null and alternativehypotheses H0: μ = 3 , H1: μ ≠ 3 (This is a two tailed test)

Specify the desired level of significance Suppose that = .05 is chosen for this test

Choose a sample size Suppose a sample of size n = 100 is selected

Econ 506, by Dr. M. Zainal Ch. 9-41

Page 42: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Hypothesis Testing Example

2.0.08.16

1000.8

32.84

μXz 0

Determine the appropriate technique σ is known so this is a z test

Set up the critical values For = .05 the critical z values are ±1.96

Collect the data and compute the test statistic Suppose the sample results are

n = 100, x = 2.84 (σ = 0.8 is assumed known)So the test statistic is:

(continued)

Econ 506, by Dr. M. Zainal Ch. 9-42

Page 43: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Hypothesis Testing Example

Is the test statistic in the rejection region?

Reject H0 Do not reject H0

= .05/2

-z = -1.96 0

Reject H0 if z < -1.96 or z > 1.96; otherwise do not reject H0

(continued)

= .05/2

Reject H0

+z = +1.96

Here, z = -2.0 < -1.96, so the test statistic is in the rejection region

Econ 506, by Dr. M. Zainal Ch. 9-43

Page 44: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Hypothesis Testing Example

Reach a decision and interpret the result

-2.0

Since z = -2.0 < -1.96, we reject the null hypothesisand conclude that there is sufficient evidence that the mean number of TVs in US homes is not equal to 3

(continued)

Reject H0 Do not reject H0

= .05/2

-z = -1.96 0

= .05/2

Reject H0

+z = +1.96

Econ 506, by Dr. M. Zainal Ch. 9-44

Page 45: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Example: p-Value

Example: How likely is it to see a sample mean of 2.84 (or something further from the mean, in either direction) if the true mean is = 3.0?

.0228

/2 = .025

-1.96 0-2.0

.02282.0)P(z

.02282.0)P(z

Z1.962.0

x = 2.84 is translated to a z score of z = -2.0

p-value

= .0228 + .0228 = .0456

.0228

/2 = .025

Econ 506, by Dr. M. Zainal Ch. 9-45

Page 46: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Example: p-Value

Compare the p-value with If p-value < , reject H0

If p-value , do not reject H0

Here: p-value = .0456 = .05

Since .0456 < .05, we reject the null hypothesis

(continued)

.0228

/2 = .025

-1.96 0-2.0

Z1.962.0

.0228

/2 = .025

Econ 506, by Dr. M. Zainal Ch. 9-46

Page 47: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

t Test of Hypothesis for the Mean (σ Unknown)

Convert sample result ( ) to a t test statistic

σ Known σ Unknown

Hypothesis Tests for

x

The decision rule is:

α , 1-n0

0 t

nsμxt if H Reject

Consider the test

00 μμ:H

01 μμ:H

(Assume the population is normal)

9.3

Econ 506, by Dr. M. Zainal Ch. 9-47

Page 48: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

t Test of Hypothesis for the Mean (σ Unknown)

For a two-tailed test:

The decision rule is:

α/2 , 1-n0

α/2 , 1-n0

0 t

nsμxt if or t

nsμxt if H Reject

Consider the test

00 μμ:H

01 μμ:H

(Assume the population is normal, and the population variance is unknown)

(continued)

Econ 506, by Dr. M. Zainal Ch. 9-48

Page 49: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Example: Two-Tail Test( Unknown)

The average cost of a hotel room in Chicago 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)

H0: μ = 168 H1: μ 168

Econ 506, by Dr. M. Zainal Ch. 9-49

Page 50: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Example Solution: Two-Tail Test

= 0.05

n = 25 is unknown, so

use a t statistic Critical Value:

t24 , .025 = ± 2.0639 Do not reject H0: not sufficient evidence that true mean cost is different than $168

Reject H0Reject H0

/2=.025

-t n-1,α/2

Do not reject H0

0

/2=.025

-2.0639 2.0639

1.46

2515.40

168172.50

ns

μxt 1n

1.46

H0: μ = 168 H1: μ 168

t n-1,α/2

Econ 506, by Dr. M. Zainal Ch. 9-50

Page 51: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Tests of the Population Proportion

Involves categorical variables

Two possible outcomes “Success” (a certain characteristic is present)

“Failure” (the characteristic is not present)

Fraction or proportion of the population in the “success” category is denoted by P

Assume sample size is large

9.4

Econ 506, by Dr. M. Zainal Ch. 9-51

Page 52: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Proportions

Sample proportion in the success category is denoted by

When nP(1 – P) > 5, can be approximated by a normal distribution with mean and standard deviation

sizesamplesampleinsuccessesofnumber

nxp ˆ

Pμ p̂n

P)P(1σ p̂

(continued)

Econ 506, by Dr. M. Zainal Ch. 9-52

Page 53: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Hypothesis Tests for Proportions

The sampling distribution of is approximately normal, so the test statistic is a z value:

n)P(1P

Ppz00

0

ˆ

nP(1 – P) > 5

Hypothesis Tests for P

Not discussed in this chapter

nP(1 – P) < 5

Econ 506, by Dr. M. Zainal Ch. 9-53

Page 54: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

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 significance level.

Check: Our approximation for P is

= 25/500 = .05

nP(1 - P) = (500)(.05)(.95)= 23.75 > 5

Econ 506, by Dr. M. Zainal Ch. 9-54

Page 55: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Z Test for Proportion: Solution

= .05 n = 500, = .05

Reject H0 at = .05

H0: P = .08 H1: P .08

Critical Values: ± 1.96

Test Statistic:

Decision:

Conclusion:

z0

Reject Reject

.025.025

1.96-2.47

There is sufficient evidence to reject the company’s claim of 8% response rate.

2.47

500.08).08(1

.08.05

n)P(1P

Ppz00

0

ˆ

-1.96

Econ 506, by Dr. M. Zainal Ch. 9-55

Page 56: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

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 H0Reject H0

/2 = .025

1.960

Z = -2.47

(continued)

0.01362(.0068)

2.47)P(Z2.47)P(Z

p-value = .0136:

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

Z = 2.47

-1.96

/2 = .025

.0068.0068

Econ 506, by Dr. M. Zainal Ch. 9-56

Page 57: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Power of the Test

Recall the possible hypothesis test outcomes:Actual Situation

Decision

Do Not Reject H0

No error(1 - )

Type II Error( β )

Reject H0Type I Error

( )

H0 FalseH0 TrueKey:

Outcome(Probability)

No Error( 1 - β )

β denotes the probability of Type II Error 1 – β is defined as the power of the test

Power = 1 – β = the probability that a false null hypothesis is rejected

9.5

Econ 506, by Dr. M. Zainal Ch. 9-57

Page 58: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Type II Error

or

The decision rule is:

α0

0 zn/σ

μxz if H Reject

00 μμ:H

01 μμ:H

Assume the population is normal and the population variance is known. Consider the test

nσ/Zμxx if H Reject α0c0

If the null hypothesis is false and the true mean is μ*, then the probability of type II error is

n/σ*μxzPμ*)μ|xxP(β c

c

Econ 506, by Dr. M. Zainal Ch. 9-58

Page 59: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Type II Error Example

Type II error is the probability of failing to reject a false H0

Reject H0: μ 52

Do not reject H0 : μ 52

5250

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

cxEcon 506, by Dr. M. Zainal Ch. 9-59

Page 60: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Type II Error Example

Suppose we do not reject H0: μ 52 when in fact the true mean is μ* = 50

Reject H0: μ 52

Do not reject H0 : μ 52

5250

This is the true distribution of x if μ = 50

This is the range of x where H0 is not rejected

(continued)

cxEcon 506, by Dr. M. Zainal Ch. 9-60

Page 61: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Type II Error Example

Suppose we do not reject H0: μ 52 when in fact the true mean is μ* = 50

Reject H0: μ 52

Do not reject H0 : μ 52

5250

β

Here, β = P( x ) if μ* = 50

(continued)

cx

cx

Econ 506, by Dr. M. Zainal Ch. 9-61

Page 62: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Calculating β

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

Reject H0: μ 52

Do not reject H0 : μ 52

5250

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

50.7666461.64552

nσzμx α0c

(for H0 : μ 52)

50.766

cxEcon 506, by Dr. M. Zainal Ch. 9-62

Page 63: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Calculating β

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

Reject H0: μ 52

Do not reject H0 : μ 52

.1539.3461.51.02)P(z64

65050.766zP50)μ*|50.766xP(

5250

(continued)

Probability of type II error:

β = .1539

cxEcon 506, by Dr. M. Zainal Ch. 9-63

Page 64: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Power of the Test ExampleIf the true mean is μ* = 50, The probability of Type II Error = β = 0.1539 The power of the test = 1 – β = 1 – 0.1539 = 0.8461

Actual SituationDecision

Do Not Reject H0

No error1 - = 0.95

Type II Errorβ = 0.1539

Reject H0Type I Error = 0.05

H0 FalseH0 TrueKey:

Outcome(Probability)

No Error1 - β = 0.8461

(The value of β and the power will be different for each μ*)Econ 506, by Dr. M. Zainal Ch. 9-64

Page 65: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Hypothesis Tests of one Population Variance

If the population is normally distributed,

2

22

1n σ1)s(n

has a chi-square distribution with (n – 1) degrees of freedom

Goal: Test hypotheses about thepopulation variance, σ2

9.6

Econ 506, by Dr. M. Zainal Ch. 9-65

Page 66: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Hypothesis Tests of one Population Variance

The test statistic for hypothesis tests about one population variance is

20

22

1n σ1)s(n

χ

(continued)

Econ 506, by Dr. M. Zainal Ch. 9-66

Page 67: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Decision Rules: VariancePopulation variance

Lower-tail test:H0: σ2 σ0

2

H1: σ2 < σ02

Upper-tail test:H0: σ2 ≤ σ0

2

H1: σ2 > σ02

Two-tail test:H0: σ2 = σ0

2

H1: σ2 ≠ σ02

/2 /2

Reject H0 if Reject H0 if Reject H0 ifor

2, 1n χ

2,1 1n χ

2,1 1n 2/χ

2, 1n 2/χ

2,1 1n

21n χχ 2

, 1n2

1n χχ 2, 1n

21n 2/ χχ

2,1 1n

21n 2/ χχ

Econ 506, by Dr. M. Zainal Ch. 9-67

Page 68: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Proportions

The sample proportion of successes is denoted by p :

When both nπ and n(1- π) are at least 5, pis approximately normally distributed with mean and standard deviation

(continued)

sizesamplesampleinsuccessesofnumber

nxp

πμp nπ)π(1σp

Econ 506, by Dr. M. Zainal Ch. 9-68

Page 69: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Hypothesis Tests for Variances

Hypothesis Testsfor Variances

Tests for a SinglePopulation Variance

Tests for TwoPopulation Variances

Chi-Square test statistic F test statistic

Econ 506, by Dr. M. Zainal Ch. 9-69

Page 70: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Single Population

Hypothesis Tests for Variances

Tests for a SinglePopulation Variance

Chi-Square test statistic

H0: σ2 = σ02

HA: σ2 ≠ σ02

H0: σ2 σ02

HA: σ2 < σ02

H0: σ2 ≤ σ02

HA: σ2 > σ02

*Two tailed test

Lower tail test

Upper tail test

Econ 506, by Dr. M. Zainal Ch. 9-70

Page 71: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Chi-Square Test Statistic

Hypothesis Tests for Variances

Tests for a SinglePopulation Variance

Chi-Square test statistic *

The chi-squared test statistic for a Single Population Variance is:

2

22

σ1)s(n

where

2 = standardized chi-square variable

n = sample size

s2 = sample variance

σ2 = hypothesized variance

Econ 506, by Dr. M. Zainal Ch. 9-71

Page 72: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

The Chi-square Distribution

The chi-square distribution is a family of distributions, depending on degrees of freedom (Like the t distribution).

The chi-square distribution curve starts at the origin and lies entirely to the right of the vertical axis.

The chi-square distribution assumes nonnegative values only, and these are denoted by the symbol 2 (read as “chi-square”).

Econ 506, by Dr. M. Zainal Ch. 9-72

Page 73: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

The Chi-square Distribution The shape of a specific chi-square distribution

depends on the number of degrees of freedom. peak of a 2 distribution curve with 1 or 2

degrees of freedom occurs at zero and for a curve with 3 or more degrees of freedom at (df−2).

0 4 8 12 16 20 24 28 0 4 8 12 16 20 24 28 0 4 8 12 16 20 24 28

d.f. = 1 d.f. = 5 d.f. = 15

2 22

Econ 506, by Dr. M. Zainal Ch. 9-73

Page 74: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Finding the Critical Value

The critical value, , is found from the chi-square table

Do not reject H0 Reject H0

2

2

2

H0: σ2 ≤ σ02

HA: σ2 > σ02

Upper tail test:

Econ 506, by Dr. M. Zainal Ch. 9-74

Page 75: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Finding the Critical Value

Econ 506, by Dr. M. Zainal Ch. 9-75

Page 76: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Finding the Critical Value

Example: Find the value of 2 for 7 degrees of freedom and anarea of .10 in the right tail of the chi-square distribution curve.

Econ 506, by Dr. M. Zainal Ch. 9-76

Page 77: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Finding the Critical Value

Example: Find the value of 2 for 9 degrees of freedom and anarea of .05 in the left tail of the chi-square distribution curve.

Econ 506, by Dr. M. Zainal Ch. 9-77

Page 78: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Example

A commercial freezer must hold the selected temperature with little variation. Specifications call for a standard deviation of no more than 4 degrees (or variance of 16 degrees2). A sample of 16 freezers is tested and yields a sample variance of s2 = 24. Test to see whether the standard deviation specification is exceeded. Use = .05

Econ 506, by Dr. M. Zainal Ch. 9-78

Page 79: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Finding the Critical Value Use the chi-square table to find the critical value:

Do not reject H0 Reject H0

= .05

2

2

2

= 24.9958

= 24.9958 ( = .05 and 16 – 1 = 15 d.f.)

22.516

1)24(16σ1)s(n2

22

The test statistic is:

Since 22.5 < 24.9958, do not reject H0

There is not significant evidence at the = .05 levelthat the standard deviation specification is exceeded

Econ 506, by Dr. M. Zainal Ch. 9-79

Page 80: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Lower Tail or Two Tailed Chi-square Tests

H0: σ2 = σ02

HA: σ2 ≠ σ02

H0: σ2 σ02

HA: σ2 < σ02

2/2

Do not reject H0Reject

21-

2

Do not reject H0

Reject

/2

21-/2

2

/2

Reject

Lower tail test: Two tail test:

(2U)(2

L)

Econ 506, by Dr. M. Zainal Ch. 9-80

Page 81: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Confidence Interval Estimatefor σ2

2/2

/2

21-/2

2

/2

(2U)(2

L)

The confidence interval estimate for σ2 is

2L

22

2U

2 1)s(nσ1)s(nχχ

Where 2L and 2

U are from the 2 distribution with n -1 degrees

of freedom

Econ 506, by Dr. M. Zainal Ch. 9-81

Page 82: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Example

A sample of 16 freezers yields a sample variance of s2 = 24.

Form a 95% confidence interval for the population variance.

Econ 506, by Dr. M. Zainal Ch. 9-82

Page 83: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Use the chi-square table to find 2L and 2

U :

6.2621

( = .05 and 16 – 1 = 15 d.f.)

Example(continued)

2.025

/2=.025

2.975

/2=.025

(2U)(2

L)27.4884 57.489σ13.096

6.26211)24(16σ

27.48841)24(16

1)s(nσ1)s(n

2

2

2L

22

2U

2

χχ

We are 95% confident that the population variance is between 13.096 and 57.489 degrees2. (Taking the square root, we are 95% confident that the population standard deviation is between 3.619 and 7.582 degrees.)

Econ 506, by Dr. M. Zainal Ch. 9-83

Page 84: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Problems

Example: Write the null and alternative hypotheses for each ofthe following examples. Determine if each is a case of a two-tailed, a left-tailed, or a right-tailed test.

o To test if the mean number of hours spent working per weekby college students who hold jobs is different from 20 hours.

o To test whether or not a bank's ATM is out of service for anaverage of more than 10 hours per month.

o To test if the mean length of experience of airport securityguards is different from three years.

o To test if the mean credit card debt of college seniors is lessthan $1000.

Econ 506, by Dr. M. Zainal Ch. 9-84

Page 85: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Problems

Econ 506, by Dr. M. Zainal Ch. 9-85

Page 86: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Problems

The management of Priority Health Club claims that itsmembers lose an average of 10 pounds or more within the firstmonth after joining the club. A consumer agency that wants tocheck this claim took a random sample of 36 members of thishealth club and found that they lost an average of 9.2 poundswithin the first month of membership with a standard deviationof 2.4 pounds.

o Find the p-value for this test.

o What will your decision be if = .01? What if = .05?

Econ 506, by Dr. M. Zainal Ch. 9-86

Page 87: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

ProblemsData:

Hypothesis:

Test statistic:

(a) P-value =(b) - Since the value of is smaller than the p-value, then we decide not to reject at %1 level of significance.

- Since the value of is greater than the p-value, then we decide to reject at %5 level of significance.

36, 9.2, 2.4n x s

0 1: 10 . : 10H vs H

0 9.2 10 22.4 / 6/c

xZs n

( 2) 0.02275P Z

0.01

0.05

Econ 506, by Dr. M. Zainal Ch. 9-87

Page 88: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Problems

Canon Inc. has introduced a copying machine that featurestwo-color copying capability in a compact system copier. Theaverage speed of the standard compact system copier is 27copies per minute. Suppose the company wants to testwhether the new copier has the same average speed as itsstandard compact copier. Conduct a test at an = 0.05 levelof significance.

Ho : = 27

HA : 27

n = 24

Econ 506, by Dr. M. Zainal Ch. 9-88

Page 89: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

ProblemsFor = 0.05 and df = 24 - 1 = 23, the critical values of t are ± 2.069The rule is:

Do not reject Ho if: [-2.069 t 2.069]The test statistic is:

Lower Rejection Region

Upper Rejection Region

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0.0

.025 .025

.95

Nonrejection Region

t 2.069-2.069

The t Distribution

7.4̅ 24.6 27

7.424

2.41.51 1.59

Econ 506, by Dr. M. Zainal Ch. 9-89

Page 90: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Problems

Direct Mailing Company sells computers and computer parts bymail. The company claims that at least 90% of all orders aremailed within 72 hours after they are received. The qualitycontrol department at the company often takes samples tocheck if this claim is valid. A recently taken sample of 150orders showed that 129 of them were mailed within 72 hours.Do you think the company's claim is true? Use a 2.5%significance level.

Econ 506, by Dr. M. Zainal Ch. 9-90

Page 91: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Problems

Econ 506, by Dr. M. Zainal Ch. 9-91

Page 92: Chapter 9 Hypothesis Testing: Single Population 9 Hypothesis Testing: Single Population Chapter Goals After completing this chapter, you should be able to: Formulate null and alternative

Chapter Summary

Addressed hypothesis testing methodology

Performed Z Test for the mean (σ known)

Discussed critical value and p-value approaches to hypothesis testing

Performed one-tail and two-tail tests

Performed t test for the mean (σ unknown)

Performed Z test for the proportion

Discussed type II error and power of the test

Performed a hypothesis test for the variance (χ2)

Econ 506, by Dr. M. Zainal Ch. 9-92