1 1 slide © 2003 south-western/thomson learning™ slides prepared by john s. loucks st. edward’s...

56
1 © 2003 South-Western/Thomson Learning™ © 2003 South-Western/Thomson Learning™ Slides Prepared by Slides Prepared by JOHN S. LOUCKS JOHN S. LOUCKS St. Edward’s University St. Edward’s University

Upload: hazel-ozier

Post on 16-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

1 1 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Slides Prepared bySlides Prepared byJOHN S. LOUCKSJOHN S. LOUCKS

St. Edward’s UniversitySt. Edward’s University

2 2 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Chapter 9Chapter 9 Hypothesis Testing Hypothesis Testing

Developing Null and Alternative HypothesesDeveloping Null and Alternative Hypotheses Type I and Type II ErrorsType I and Type II Errors One-Tailed Tests About a Population Mean:One-Tailed Tests About a Population Mean:

Large-Sample CaseLarge-Sample Case Two-Tailed Tests About a Population Mean:Two-Tailed Tests About a Population Mean:

Large-Sample CaseLarge-Sample Case Tests About a Population Mean: Small-Sample Tests About a Population Mean: Small-Sample

CaseCase

continuedcontinued

3 3 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Chapter 9Chapter 9 Hypothesis Testing Hypothesis Testing

Tests About a Population ProportionTests About a Population Proportion Hypothesis Testing and Decision MakingHypothesis Testing and Decision Making Calculating the Probability of Type II ErrorsCalculating the Probability of Type II Errors Determining the Sample Size for a Hypothesis Determining the Sample Size for a Hypothesis

TestTest

about a Population Meanabout a Population Mean

4 4 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Developing Null and Alternative Developing Null and Alternative HypothesesHypotheses

Hypothesis testingHypothesis testing can be used to determine can be used to determine whether a statement about the value of a whether a statement about the value of a population parameter should or should not be population parameter should or should not be rejected.rejected.

The The null hypothesisnull hypothesis, , denoted by denoted by HH0 0 , , is a is a tentative assumption about a population tentative assumption about a population parameter.parameter.

The The alternative hypothesisalternative hypothesis, denoted by , denoted by HHaa, is , is

the opposite of what is stated in the null the opposite of what is stated in the null hypothesis.hypothesis.

5 5 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Testing Research HypothesesTesting Research Hypotheses

• The research hypothesis should be The research hypothesis should be expressed as the alternative hypothesis.expressed as the alternative hypothesis.

• The conclusion that the research hypothesis The conclusion that the research hypothesis is true comes from sample data that is true comes from sample data that contradict the null hypothesis.contradict the null hypothesis.

Developing Null and Alternative Developing Null and Alternative HypothesesHypotheses

6 6 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Developing Null and Alternative Developing Null and Alternative HypothesesHypotheses

Testing the Validity of a ClaimTesting the Validity of a Claim

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

• The conclusion that the claim is false comes The conclusion that the claim is false comes from sample data that contradict the null from sample data that contradict the null hypothesis.hypothesis.

7 7 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Testing in Decision-Making SituationsTesting in Decision-Making Situations

• A decision maker might have to choose A decision maker might have to choose between two courses of action, one between two courses of action, one associated with the null hypothesis and associated with the null hypothesis and another associated with the alternative another associated with the alternative hypothesis.hypothesis.

• Example: Accepting a shipment of goods Example: Accepting a shipment of goods from a supplier or returning the shipment of from a supplier or returning the shipment of goods to the supplier.goods to the supplier.

Developing Null and Alternative Developing Null and Alternative HypothesesHypotheses

8 8 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Summary of Forms for Null and Summary of Forms for Null and Alternative Hypotheses about a Alternative Hypotheses about a

Population MeanPopulation Mean

The equality part of the hypotheses always The equality part of the hypotheses always appears in the null hypothesis.appears in the null hypothesis.

In general, a hypothesis test about the value of a In general, a hypothesis test about the value of a population mean population mean must take one of the following must take one of the following three forms (where three forms (where 00 is the hypothesized value of is the hypothesized value of the population mean). the population mean).

HH00: : >> 00 HH00: : << 0 0 HH00: : = = 00

HHaa: : < < 00 HHaa: : > > 00 HHaa: :

00

9 9 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Metro EMSExample: Metro EMS

Null and Alternative HypothesesNull and Alternative Hypotheses

A major west coast city provides one of A major west coast city provides one of the most comprehensive emergency medical the most comprehensive emergency medical services in the world. Operating in a multiple services in the world. Operating in a multiple hospital system with approximately 20 mobile hospital system with approximately 20 mobile medical units, the service goal is to respond to medical units, the service goal is to respond to medical emergencies with a mean time of 12 medical emergencies with a mean time of 12 minutes or less.minutes or less.

The director of medical services wants to The director of medical services wants to formulate a hypothesis test that could use a formulate a hypothesis test that could use a sample of emergency response times to sample of emergency response times to determine whether or not the service goal of 12 determine whether or not the service goal of 12 minutes or less is being achieved.minutes or less is being achieved.

10 10 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Metro EMSExample: Metro EMS

Null and Alternative HypothesesNull and Alternative Hypotheses

HypothesesHypotheses Conclusion and ActionConclusion and Action

HH00: : The emergency service is meeting The emergency service is meeting

the response goal; no follow-upthe response goal; no follow-up

action is necessary.action is necessary.

HHaa:: The emergency service is not The emergency service is not

meeting the response goal;meeting the response goal;

appropriate follow-up action isappropriate follow-up action is

necessary.necessary.

Where: Where: = mean response time for the = mean response time for the populationpopulation

of medical emergency requests.of medical emergency requests.

11 11 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Type I ErrorsType I Errors

Since hypothesis tests are based on sample Since hypothesis tests are based on sample data, we must allow for the possibility of data, we must allow for the possibility of errors.errors.

A A Type I errorType I error is rejecting is rejecting HH00 when it is true. when it is true. The person conducting the hypothesis test The person conducting the hypothesis test

specifies the maximum allowable probability of specifies the maximum allowable probability of making amaking a

Type I error, denoted byType I error, denoted by and called the and called the level level of significanceof significance..

12 12 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Type II ErrorsType II Errors

A A Type II errorType II error is accepting is accepting HH00 when it is false. when it is false. Generally, we cannot control for the probability Generally, we cannot control for the probability

of making a Type II error, denoted by of making a Type II error, denoted by .. Statisticians avoid the risk of making a Type II Statisticians avoid the risk of making a Type II

error by using “do not reject error by using “do not reject HH00” and not ” and not “accept “accept HH00”.”.

13 13 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Type I and Type II ErrorsType I and Type II Errors

Population ConditionPopulation Condition

HH0 0 TrueTrue HHa a TrueTrue

ConclusionConclusion (() ) ( ())

AcceptAccept HH00 CorrectCorrect Type II Type II

(conclude (conclude Conclusion Conclusion Error Error

RejectReject HH00 Type IType I Correct Correct

(conclude (conclude rrorrror ConclusionConclusion

Example: Metro EMSExample: Metro EMS

14 14 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

The Use of The Use of pp-Values-Values

The The pp-value-value is the probability of obtaining a is the probability of obtaining a sample result that is at least as unlikely as sample result that is at least as unlikely as what is observed.what is observed.

The The pp-value can be used to make the decision -value can be used to make the decision in a hypothesis test by noting that:in a hypothesis test by noting that:• if the if the pp-value is less than the level of -value is less than the level of

significance significance , the value of the test statistic , the value of the test statistic is in the rejection region.is in the rejection region.

• if the if the pp-value is greater than or equal to -value is greater than or equal to , , the value of the test statistic is not in the the value of the test statistic is not in the rejection region.rejection region.

Reject Reject HH00 if the if the pp-value < -value < ..

15 15 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Steps of Hypothesis TestingSteps of Hypothesis Testing

1.1. Develop the null and alternative hypotheses.Develop the null and alternative hypotheses.2.2. Specify the level of significance Specify the level of significance ..3.3. Select the test statistic that will be used to Select the test statistic that will be used to

test the hypothesis.test the hypothesis.

Using the Test Statistic:Using the Test Statistic:6.6. Use Use to determine the critical value(s) for to determine the critical value(s) for

the test statistic and state the rejection rule the test statistic and state the rejection rule for for HH00..

7.7. Collect the sample data and compute the Collect the sample data and compute the value of the test statistic.value of the test statistic.

8.8. Use the value of the test statistic and the Use the value of the test statistic and the rejection rule to determine whether to reject rejection rule to determine whether to reject HH00. .

continued continued

16 16 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Steps of Hypothesis TestingSteps of Hypothesis Testing

Using the Using the pp-Value:-Value:6.6. Collect the sample data and compute the Collect the sample data and compute the

value of the test statistic.value of the test statistic.7.7. Use the value of the test statistic to compute Use the value of the test statistic to compute

the the pp-value.-value.

8.8. Reject Reject HH00 if if pp-value < -value < ..

17 17 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

HypothesesHypotheses Left-Tailed Right-Tailed Left-Tailed Right-Tailed

HH00: : HH00: :

HHaa::HHaa::

Test StatisticTest Statistic KnownKnown Unknown Unknown

Rejection Rule Rejection Rule Left-Tailed Right-TailedLeft-Tailed Right-Tailed

Reject Reject HH0 0 if if zz > > zzReject Reject HH0 0 if if zz < - < -zz

One-Tailed Tests about a Population One-Tailed Tests about a Population Mean: Large-Sample Case (Mean: Large-Sample Case (nn >> 30) 30)

z xn

0

/z x

n

0

/z xs n

0/

z xs n

0/

18 18 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Metro EMSExample: Metro EMS

One-Tailed Test about a Population Mean: One-Tailed Test about a Population Mean: Large Large nn

Let Let = = PP(Type I Error) = .05 (Type I Error) = .05

Sampling distribution of (assuming H0 is true and = 12)

Sampling distribution of (assuming H0 is true and = 12)

xx

1212 c c

Reject H0Reject H0

Do Not Reject H0Do Not Reject H0

xx1.6451.645xx

(Critical value)(Critical value)

19 19 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Metro EMSExample: Metro EMS

One-Tailed Test about a Population Mean: Large One-Tailed Test about a Population Mean: Large nn

Let Let nn = 40, = 13.25 minutes, = 40, = 13.25 minutes, ss = 3.2 = 3.2 minutesminutes

(The sample standard deviation (The sample standard deviation ss can be used to can be used to

estimate the population standard deviation estimate the population standard deviation .).)

Since 2.47 > 1.645, we reject Since 2.47 > 1.645, we reject HH00..

ConclusionConclusion: : We are 95% confident that Metro We are 95% confident that Metro EMSEMS

is not meeting the response goal of 12 minutes;is not meeting the response goal of 12 minutes;

appropriate action should be taken to improveappropriate action should be taken to improve

service.service.

xx

zx

n

/.. /

.13 25 123 2 40

2 47zx

n

/.. /

.13 25 123 2 40

2 47

20 20 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Metro EMSExample: Metro EMS

Using the Using the pp-value to Test the Hypothesis-value to Test the Hypothesis

Recall that Recall that zz = 2.47 for = 13.25. Then = 2.47 for = 13.25. Then pp--value = .0068.value = .0068.

Since Since pp-value < -value < , that is .0068 < .05, , that is .0068 < .05, we we reject reject HH00..

Using the Using the pp-value to Test the Hypothesis-value to Test the Hypothesis

Recall that Recall that zz = 2.47 for = 13.25. Then = 2.47 for = 13.25. Then pp--value = .0068.value = .0068.

Since Since pp-value < -value < , that is .0068 < .05, , that is .0068 < .05, we we reject reject HH00..

xx

p-valuep-value

00 1.645 1.645

Do Not Reject H0Do Not Reject H0

Reject H0Reject H0

zz2.472.47

21 21 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Using Excel to ConductUsing Excel to Conducta One-Tailed Hypothesis Testa One-Tailed Hypothesis Test

Formula WorksheetFormula Worksheet

Note: Rows 13-41 are not shown.Note: Rows 13-41 are not shown.

A B C

1Response

Time Sample Size 402 19.5 Sample Mean =AVERAGE(A2:A41)3 15.2 Sample Std. Dev. =STDEV(A2:A41)4 11.0 5 12.8 Lev. of Signif. 0.056 12.4 Critical Value =NORMSINV(1-C5)7 20.3 8 9.6 Hypoth. Value 129 10.9 Standard Error =C3/SQRT(C1)10 16.2 Test Statistic =(C2-C8)/C911 13.4 p -Value =1-NORMSDIST(C10)12 19.7 Conclusion =IF(C11<C5,"Reject","Do Not Reject")

22 22 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Using Excel to Conduct Using Excel to Conduct a One-Tailed Hypothesis Testa One-Tailed Hypothesis Test

Value WorksheetValue WorksheetA B C

1Response

Time Sample Size 402 19.5 Sample Mean 13.253 15.2 Sample Std. Dev. 3.204 11.0 5 12.8 Lev. of Signif. 0.056 12.4 Critical Value 1.6457 20.3 8 9.6 Hypoth. Value 129 10.9 Standard Error 0.506010 16.2 Test Statistic 2.47111 13.4 p -Value 0.006712 19.7 Conclusion Reject

Note: Rows 13-41 are not shown.Note: Rows 13-41 are not shown.

23 23 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

HypothesesHypotheses

HH00: :

HHaa::

Test StatisticTest Statistic KnownKnown Unknown Unknown

Rejection RuleRejection Rule

Reject Reject HH0 0 if |if |zz| > | > zz

Two-Tailed Tests about a Population Two-Tailed Tests about a Population Mean: Large-Sample Case (Mean: Large-Sample Case (nn >> 30) 30)

z xn

0

/z x

n

0

/z xs n

0/

z xs n

0/

24 24 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Glow ToothpasteExample: Glow Toothpaste

Two-Tailed Tests about a Population Mean: Large Two-Tailed Tests about a Population Mean: Large nn

The production line for Glow toothpaste is The production line for Glow toothpaste is designed to fill tubes of toothpaste with a mean designed to fill tubes of toothpaste with a mean weight of 6 ounces. weight of 6 ounces.

Periodically, a sample of 30 tubes will be Periodically, a sample of 30 tubes will be selected in order to check the filling process. selected in order to check the filling process. Quality assurance procedures call for the Quality assurance procedures call for the continuation of the filling process if the sample continuation of the filling process if the sample results are consistent with the assumption that the results are consistent with the assumption that the mean filling weight for the population of mean filling weight for the population of toothpaste tubes is 6 ounces; otherwise the filling toothpaste tubes is 6 ounces; otherwise the filling process will be stopped and adjusted.process will be stopped and adjusted.

25 25 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Glow ToothpasteExample: Glow Toothpaste

Two-Tailed Tests about a Population Mean: Large Two-Tailed Tests about a Population Mean: Large nn

A hypothesis test about the population mean A hypothesis test about the population mean can be used to help determine when the filling can be used to help determine when the filling process should continue operating and when it process should continue operating and when it should be stopped and corrected.should be stopped and corrected.

• HypothesesHypotheses

HH00: :

HHaa::

• Rejection RuleRejection Rule

ssuming a .05 level of significance, ssuming a .05 level of significance,

Reject Reject HH0 0 if if z z < -1.96 or if < -1.96 or if zz > 1.96 > 1.96

26 26 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Glow ToothpasteExample: Glow Toothpaste

Two-Tailed Test about a Population Mean: Two-Tailed Test about a Population Mean: Large Large nn

Sampling distribution of (assuming H0 is true and = 6)

Sampling distribution of (assuming H0 is true and = 6)

xx

00 1.96 1.96

Reject H0Reject H0Do Not Reject H0Do Not Reject H0

zz

Reject H0Reject H0

-1.96 -1.96

27 27 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Glow ToothpasteExample: Glow Toothpaste

Two-Tailed Test about a Population Mean: Two-Tailed Test about a Population Mean: Large Large nn

Assume that a sample of 30 toothpaste Assume that a sample of 30 toothpaste tubestubes

provides a sample mean of 6.1 ounces and provides a sample mean of 6.1 ounces and standardstandard

deviation of 0.2 ounces.deviation of 0.2 ounces.

Let Let nn = 30, = 6.1 ounces, = 30, = 6.1 ounces, ss = .2 = .2 ouncesounces

Two-Tailed Test about a Population Mean: Two-Tailed Test about a Population Mean: Large Large nn

Assume that a sample of 30 toothpaste Assume that a sample of 30 toothpaste tubestubes

provides a sample mean of 6.1 ounces and provides a sample mean of 6.1 ounces and standardstandard

deviation of 0.2 ounces.deviation of 0.2 ounces.

Let Let nn = 30, = 6.1 ounces, = 30, = 6.1 ounces, ss = .2 = .2 ouncesounces

74.230/2.

61.6

/0

ns

xz

74.2

30/2.

61.6

/0

ns

xz

xx

28 28 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Glow ToothpasteExample: Glow Toothpaste

ConclusionConclusion: : Since 2.74 > 1.96, we reject Since 2.74 > 1.96, we reject HH00. .

We are 95% confident that the meanWe are 95% confident that the mean

filling weight of the toothpaste tubes filling weight of the toothpaste tubes is is

not 6 ounces. The filling process not 6 ounces. The filling process should should be examined and most be examined and most likely adjusted.likely adjusted.

29 29 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Glow ToothpasteExample: Glow Toothpaste

Using the Using the pp-Value for a Two-Tailed Hypothesis Test-Value for a Two-Tailed Hypothesis Test

Suppose we define the Suppose we define the pp-value for a two-tailed test as -value for a two-tailed test as double double the area found in the tail of the distribution.the area found in the tail of the distribution.

With With zz = 2.74, the standard normal probability = 2.74, the standard normal probability

table shows there is a .5000 - .4969 = .0031 probabilitytable shows there is a .5000 - .4969 = .0031 probability

of a difference larger than .1 in the upper tail of theof a difference larger than .1 in the upper tail of the

distribution.distribution.

Considering the same probability of a larger difference in Considering the same probability of a larger difference in the lower tail of the distribution, we havethe lower tail of the distribution, we have

pp-value = 2(.0031) = .0062-value = 2(.0031) = .0062

The The pp-value .0062 is less than -value .0062 is less than = .05, so = .05, so HH00 is rejected. is rejected.

30 30 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Using Excel to ConductUsing Excel to Conducta Two-Tailed Hypothesis Testa Two-Tailed Hypothesis Test

Formula WorksheetFormula WorksheetA B C

1 Weight Sample Size 302 6.04 Sample Mean =AVERAGE(A2:A31)3 5.99 Sample Std. Dev. =STDEV(A2:A31)4 5.92 5 6.03 Lev. of Signif. 0.056 6.01 Crit. Value (lower) =NORMSINV(C5/2)7 5.95 Crit. Value (upper) =NORMSINV(1-C5/2)8 6.099 6.07 Hypoth. Value 610 6.07 Standard Error =C3/SQRT(C1)11 5.97 Test Statistic =(C2-C9)/C1012 5.96 p -Value =2*NORMSDIST(C11)13 6.08 Conclusion =IF(C12<C5,"Reject","Do Not Reject")

Note: Rows 14-31 are not shown.Note: Rows 14-31 are not shown.

31 31 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Value WorksheetValue Worksheet

Using Excel to ConductUsing Excel to Conducta Two-Tailed Hypothesis Testa Two-Tailed Hypothesis Test

A B C1 Weight Sample Size 302 6.04 Sample Mean 6.13 5.99 Sample Std. Dev. 0.24 5.92 5 6.03 Lev. of Signif. 0.056 6.01 Crit. Value (lower) -1.9607 5.95 Crit. Value (upper) 1.9608 6.099 6.07 Hypoth. Value 610 6.07 Standard Error 0.036511 5.97 Test Statistic 2.73912 5.96 p -Value 0.00613 6.08 Conclusion Reject

Note: Rows 14-31 are not shown.Note: Rows 14-31 are not shown.

32 32 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Confidence Interval Approach to aConfidence Interval Approach to aTwo-Tailed Test about a Population MeanTwo-Tailed Test about a Population Mean

Select a simple random sample from the Select a simple random sample from the population and use the value of the sample population and use the value of the sample mean to develop the confidence interval for mean to develop the confidence interval for the population mean the population mean ..

If the confidence interval contains the If the confidence interval contains the hypothesized value hypothesized value 00, do not reject , do not reject HH00. . Otherwise, reject Otherwise, reject HH00..

xx

33 33 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Glow ToothpasteExample: Glow Toothpaste

Confidence Interval Approach to a Two-Tailed Confidence Interval Approach to a Two-Tailed Hypothesis TestHypothesis Test

The 95% confidence interval for The 95% confidence interval for is is

or 6.0284 to 6.1716or 6.0284 to 6.1716

Since the hypothesized value for the Since the hypothesized value for the population mean, population mean, 00 = 6, is not in this interval, = 6, is not in this interval, the hypothesis-testing conclusion is that the null the hypothesis-testing conclusion is that the null hypothesis,hypothesis,

HH00: : = 6, can be rejected. = 6, can be rejected.

x zn

/ . . (. ) . .2 6 1 1 96 2 30 6 1 0716x zn

/ . . (. ) . .2 6 1 1 96 2 30 6 1 0716

34 34 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Test StatisticTest Statistic KnownKnown Unknown Unknown

This test statistic has a This test statistic has a tt distribution with distribution with nn - 1 - 1 degrees of freedom.degrees of freedom.

Rejection RuleRejection Rule

One-TailedOne-Tailed Two-TailedTwo-Tailed

HH00: : Reject Reject HH0 0 if if tt > > tt

HH00: : Reject Reject HH0 0 if if tt < - < -tt

HH00: : Reject Reject HH0 0 if |if |tt| > | > tt

Tests about a Population Mean:Tests about a Population Mean:Small-Sample Case (Small-Sample Case (nn < 30) < 30)

tx

n

0

/tx

n

0

/txs n

0/

txs n

0/

35 35 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

p p -Values and the -Values and the tt Distribution Distribution

The format of the The format of the tt distribution table provided distribution table provided in most statistics textbooks does not have in most statistics textbooks does not have sufficient detail to determine the sufficient detail to determine the exactexact p p-value -value for a hypothesis test.for a hypothesis test.

However, we can still use the However, we can still use the tt distribution distribution table to identify a table to identify a rangerange for the for the pp-value.-value.

An advantage of computer software packages An advantage of computer software packages is that the computer output will provide the is that the computer output will provide the pp--value for thevalue for the

tt distribution. distribution.

36 36 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Highway PatrolExample: Highway Patrol

One-Tailed Test about a Population Mean: Small One-Tailed Test about a Population Mean: Small nn

A State Highway Patrol periodically samples A State Highway Patrol periodically samples vehicle speeds at various locations on a particular vehicle speeds at various locations on a particular roadway. The sample of vehicle speeds is used to roadway. The sample of vehicle speeds is used to test the hypothesis test the hypothesis

HH00: : << 65. 65.

The locations where The locations where HH00 is rejected are deemed the is rejected are deemed the best locations for radar traps.best locations for radar traps.

At Location F, a sample of 16 vehicles shows At Location F, a sample of 16 vehicles shows a mean speed of 68.2 mph with a standard a mean speed of 68.2 mph with a standard deviation of 3.8 mph. Use an deviation of 3.8 mph. Use an = .05 to test the = .05 to test the hypothesis.hypothesis.

37 37 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Highway PatrolExample: Highway Patrol

One-Tailed Test about a Population Mean: Small One-Tailed Test about a Population Mean: Small nn

Let Let nn = 16, = 68.2 mph, = 16, = 68.2 mph, ss = 3.8 mph = 3.8 mph

= .05, d.f. = 16-1 = 15, = .05, d.f. = 16-1 = 15, tt = 1.753 = 1.753

Since 3.37 > 1.753, we reject Since 3.37 > 1.753, we reject HH00..

ConclusionConclusion: : We are 95% confident that the mean We are 95% confident that the mean speed of vehicles at Location F is greater than 65 speed of vehicles at Location F is greater than 65 mph. Location F is a good candidate for a radar mph. Location F is a good candidate for a radar trap. trap.

37.316/8.3

652.68

/0

ns

xt

37.3

16/8.3

652.68

/0

ns

xt

xx

38 38 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Using Excel to Conduct a One-Tailed Using Excel to Conduct a One-Tailed Hypothesis Test: Small-Sample CaseHypothesis Test: Small-Sample Case

Formula WorksheetFormula WorksheetA B C

1Vehicle Speed Sample Size 16

2 69.6 Sample Mean =AVERAGE(A2:A17)3 73.5 Sample Std. Dev. =STDEV(A2:A17)4 74.1 5 64.4 Lev. of Signif. 0.056 66.3 Critical Value =TINV(2*C5,C1-1)7 68.7 8 69.0 Hypoth. Value 659 65.2 Standard Error =C3/SQRT(C1)10 71.1 Test Statistic =(C2-C8)/C911 70.8 p -Value =TDIST(C10, C1-1,1)12 64.6 Conclusion =IF(C11<C5,"Reject","Do Not Reject")

Note: Rows 13-17 are not shown.Note: Rows 13-17 are not shown.

39 39 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Value WorksheetValue Worksheet

Using Excel to Conduct a One-Tailed Using Excel to Conduct a One-Tailed Hypothesis Test: Small-Sample CaseHypothesis Test: Small-Sample Case

Note: Rows 13-17 are not shown.Note: Rows 13-17 are not shown.

A B C

1Vehicle Speed Sample Size 16

2 68.2 Sample Mean 68.203 77.0 Sample Std. Dev. 3.804 71.0 5 64.2 Lev. of Signif. 0.056 66.8 Critical Value 1.7537 68.3 8 65.9 Hypoth. Value 659 63.9 Standard Error 0.949010 71.1 Test Statistic 3.37211 71.6 p -Value 0.002112 60.7 Conclusion Reject

40 40 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Summary of Test Statistics to be Used in aSummary of Test Statistics to be Used in aHypothesis Test about a Population MeanHypothesis Test about a Population Mean

n n >> 30 ? 30 ?

assumed assumed

knownknown ??

Population Population approximatelyapproximately

normal normal ??Use Use s s toto

estimate estimate Use Use s s toto

estimate estimate

Use Use ss totoestimate estimate

Increase Increase nnto to >> 30 30/

xz

n

/

xz

n

/

xzs n

/

xzs n

/

xz

n

/

xz

n

/

xts n

/

xts n

YesYes

YesYes

YesYes

YesYes

NoNo

NoNo

NoNo

NoNo

assumed assumed

knownknown ??

41 41 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Summary of Forms for Null and Summary of Forms for Null and Alternative Hypotheses about a Alternative Hypotheses about a

Population ProportionPopulation Proportion The equality part of the hypotheses always The equality part of the hypotheses always

appears in the null hypothesis.appears in the null hypothesis. In general, a hypothesis test about the value of In general, a hypothesis test about the value of

a population proportion a population proportion pp must take one of the must take one of the following three forms (where following three forms (where pp00 is the is the hypothesized value of the population hypothesized value of the population proportion). proportion).

HH00: : pp >> pp00 HH00: : pp << pp00 HH00: : pp = = pp00

HHaa: : pp < < pp00 HHaa: : pp > > pp00 HHaa: : pp

pp00

42 42 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Tests about a Population Proportion:Tests about a Population Proportion:Large-Sample Case (Large-Sample Case (npnp >> 5 and 5 and nn(1 - (1 - pp) ) >>

5)5) Test StatisticTest Statistic

where:where:

Rejection RuleRejection Rule

One-TailedOne-Tailed Two-TailedTwo-Tailed

HH00: : pppp Reject Reject HH0 0 if z > zif z > z

HH00: : pppp Reject Reject HH0 0 if z < -zif z < -z

HH00: : pppp Reject Reject HH0 0 if |z| > if |z| > zz

zp p

p

0

z

p p

p

0

pp p

n

0 01( ) pp p

n

0 01( )

43 43 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: NSCExample: NSC

Two-Tailed Test about a Population Proportion: Two-Tailed Test about a Population Proportion: Large Large nn

For a Christmas and New Year’s week, For a Christmas and New Year’s week, the National Safety Council estimated that 500 the National Safety Council estimated that 500 people would be killed and 25,000 injured on people would be killed and 25,000 injured on the nation’s roads. The NSC claimed that 50% the nation’s roads. The NSC claimed that 50% of the accidents would be caused by drunk of the accidents would be caused by drunk driving.driving.

A sample of 120 accidents showed that A sample of 120 accidents showed that 67 were caused by drunk driving. Use these 67 were caused by drunk driving. Use these data to test the NSC’s claim with data to test the NSC’s claim with = 0.05. = 0.05.

44 44 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: NSCExample: NSC

Two-Tailed Test about a Population Proportion: Two-Tailed Test about a Population Proportion: Large Large nn

• HypothesisHypothesis

HH00: : pp = .5 = .5

HHaa: : pp .5 .5

• Test StatisticTest Statistic

0 (67/ 120) .51.278

.045644p

p pz

0 (67/ 120) .51.278

.045644p

p pz

0 0(1 ) .5(1 .5).045644

120p

p p

n

0 0(1 ) .5(1 .5)

.045644120p

p p

n

45 45 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: NSCExample: NSC

Two-Tailed Test about a Population Proportion: Two-Tailed Test about a Population Proportion: Large Large nn

• Rejection RuleRejection Rule

Reject Reject HH00 if if zz < -1.96 or < -1.96 or zz > 1.96 > 1.96

• ConclusionConclusion

Do not reject Do not reject HH00. .

For For zz = 1.278, the = 1.278, the pp-value is .201. If -value is .201. If we rejectwe reject

HH00, we exceed the maximum allowed , we exceed the maximum allowed risk of risk of committing a Type I error (committing a Type I error (pp--value > .050).value > .050).

46 46 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Formula WorksheetFormula Worksheet

Using Excel to Conduct Hypothesis TestsUsing Excel to Conduct Hypothesis Testsabout a Population Proportionabout a Population Proportion

Note: Rows 14-121 are not shown.Note: Rows 14-121 are not shown.

A B C

1Drunk

Driving Sample Size 1202 No Number of "Yes" =COUNTIF(A2:A121,"Yes")3 Yes Sample Proportion =C2/C14 No 5 Yes Lev. of Signif. 0.056 No Crit. Value (lower) =NORMSINV(C5/2)7 Yes Crit. Value (upper) =NORMSINV(1-C5/2)8 Yes9 No Hypoth. Value 0.510 No Standard Error =SQRT(C3*(1-C3)/C1)11 Yes Test Statistic =(C3-C8)/C912 Yes p -Value =2*(1-NORMSDIST(C11))13 Yes Conclusion =IF(C12<C5,"Reject","Do Not Reject")

47 47 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Using Excel to Conduct Hypothesis TestsUsing Excel to Conduct Hypothesis Testsabout a Population Proportionabout a Population Proportion

Value WorksheetValue WorksheetA B C

1Drunk

Driving Sample Size 1202 No Number of "Yes" 673 Yes Sample Proportion 0.55834 No 5 Yes Lev. of Signif. 0.056 No Crit. Value (lower) -1.9607 Yes Crit. Value (upper) 1.9608 Yes9 No Hypoth. Value 0.510 No Standard Error 0.045611 Yes Test Statistic 1.27812 Yes p -Value 0.20113 Yes Conclusion Do Not Reject

Note: Rows 14-121 are not shown.Note: Rows 14-121 are not shown.

48 48 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Hypothesis Testing and Decision MakingHypothesis Testing and Decision Making

In many decision-making situations the In many decision-making situations the decision maker may want, and in some cases decision maker may want, and in some cases may be forced, to take action with both the may be forced, to take action with both the conclusion do not reject conclusion do not reject HH00 and the conclusion and the conclusion reject reject HH00..

In such situations, it is recommended that the In such situations, it is recommended that the hypothesis-testing procedure be extended to hypothesis-testing procedure be extended to include consideration of making a Type II error.include consideration of making a Type II error.

49 49 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Calculating the Probability of a Type II Calculating the Probability of a Type II Error Error

in Hypothesis Tests about a Population in Hypothesis Tests about a Population MeanMean1.1. Formulate the null and alternative hypotheses. Formulate the null and alternative hypotheses.

2.2. Use the level of significance Use the level of significance to establish a to establish a rejection rule based on the test statistic.rejection rule based on the test statistic.

3.3. Using the rejection rule, solve for the value of Using the rejection rule, solve for the value of the sample mean that identifies the rejection the sample mean that identifies the rejection region.region.

4.4. Use the results from step 3 to state the values of Use the results from step 3 to state the values of the sample mean that lead to the acceptance of the sample mean that lead to the acceptance of HH00; it also defines the acceptance region.; it also defines the acceptance region.

5.5. Using the sampling distribution of for any Using the sampling distribution of for any value of value of from the alternative hypothesis, and from the alternative hypothesis, and the acceptance region from step 4, compute the the acceptance region from step 4, compute the probability that the sample mean will be in the probability that the sample mean will be in the acceptance region.acceptance region.

xx

50 50 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Metro EMS (revisited)Example: Metro EMS (revisited)

Calculating the Probability of a Type II ErrorCalculating the Probability of a Type II Error

1.1. Hypotheses are: Hypotheses are: HH00: : and and HHaa::

2.2. Rejection rule is: Reject Rejection rule is: Reject HH00 if if zz > 1.645 > 1.645

3.3. Value of the sample mean that identifies the Value of the sample mean that identifies the rejection region:rejection region:

4.4. We will accept We will accept HH00 when when xx << 12.8323 12.8323

121.645

3.2/ 40x

z

12

1.6453.2/ 40

xz

3.212 1.645 12.8323

40x

3.212 1.645 12.8323

40x

51 51 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Metro EMS (revisited)Example: Metro EMS (revisited)

Calculating the Probability of a Type II ErrorCalculating the Probability of a Type II Error

5.5. Probabilities that the sample mean will be in Probabilities that the sample mean will be in the the acceptance region:acceptance region:

Values of Values of 1- 1-14.014.0 -2.31-2.31 .0104.0104 .9896.989613.613.6 -1.52-1.52 .0643.0643 .9357.935713.213.2 -0.73-0.73 .2327.2327 .7673.767312.8312.83 0.00 0.00 .5000.5000 .5000.500012.812.8 0.06 0.06 .5239.5239 .4761.476112.412.4 0.85 0.85 .8023.8023 .1977.197712.000112.0001 1.645 1.645 .9500.9500 .0500.0500

12.83233.2/ 40

z

12.83233.2/ 40

z

52 52 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Example: Metro EMS (revisited)Example: Metro EMS (revisited)

Calculating the Probability of a Type II ErrorCalculating the Probability of a Type II Error

Observations about the preceding table:Observations about the preceding table:

• When the true population mean When the true population mean is close to is close to the null hypothesis value of 12, there is a the null hypothesis value of 12, there is a high probability that we will make a Type II high probability that we will make a Type II error.error.

• When the true population mean When the true population mean is far is far above the null hypothesis value of 12, there above the null hypothesis value of 12, there is a low probability that we will make a Type is a low probability that we will make a Type II error.II error.

53 53 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Power of the TestPower of the Test

The probability of correctly rejecting The probability of correctly rejecting HH00 when it when it is false is called the is false is called the powerpower of the test. of the test.

For any particular value of For any particular value of , the power is 1 – , the power is 1 – ..

We can show graphically the power associated We can show graphically the power associated with each value of with each value of ; such a graph is called a ; such a graph is called a power curvepower curve..

54 54 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

wherewhere

zz = = zz value providing an area of value providing an area of in the tail in the tail

zz = = zz value providing an area of value providing an area of in the tail in the tail= population standard deviation= population standard deviation

00 = value of the population mean in = value of the population mean in HH00

a a = value of the population mean used for = value of the population mean used for thethe Type II error Type II error

Note: In a two-tailed hypothesis test, use Note: In a two-tailed hypothesis test, use zz /2 /2 not not zz

Determining the Sample SizeDetermining the Sample Sizefor a Hypothesis Test About a Population for a Hypothesis Test About a Population

MeanMean

nz z

a

( )

( )

2 2

02

nz z

a

( )

( )

2 2

02

55 55 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

Relationship among Relationship among , , , and , and nn

Once two of the three values are known, the Once two of the three values are known, the other can be computed.other can be computed.

For a given level of significance For a given level of significance , increasing , increasing the sample size the sample size nn will reduce will reduce ..

For a given sample size For a given sample size nn, decreasing , decreasing will will increase increase , whereas increasing , whereas increasing will decrease will decrease b.b.

56 56 Slide

Slide

© 2003 South-Western/Thomson Learning™© 2003 South-Western/Thomson Learning™

End of Chapter 9End of Chapter 9