Hypothesis Testing

42
Hypothesis Testing Hypothesis Testing

Transcript of Hypothesis Testing

Page 1: Hypothesis Testing

Hypothesis TestingHypothesis Testing

Page 2: Hypothesis Testing

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 tentative is a tentative assumption about a population parameter.assumption about a population parameter.

The The alternative hypothesisalternative hypothesis, denoted by , denoted by HHaa, is the , is the opposite of what is stated in the null hypothesis.opposite of what is stated in the null hypothesis.

Hypothesis testing is similar to a criminal trial. Hypothesis testing is similar to a criminal trial. The hypotheses are:The hypotheses are:

HH00: The defendant is innocent: The defendant is innocent

HHaa: The defendant is guilty: The defendant is guilty

Page 3: Hypothesis Testing

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

HH0 0 : : 24 24HH1 1 : : > 24 > 24

Page 4: Hypothesis Testing

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.

HH0 0 : : 67.6 ounces 67.6 ouncesHH1 1 : : < 67.6 ounces < 67.6 ounces

Page 5: Hypothesis Testing

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

HH0 0 : : = 2 inches= 2 inchesHH1 1 : : 2 inches 2 inches

Page 6: Hypothesis Testing

A Summary of Forms for Null and A 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

Page 7: Hypothesis Testing

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.

Page 8: Hypothesis Testing

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 population = mean response time for the population

of medical emergency requests.of medical emergency requests.

Page 9: Hypothesis Testing

Type I and Type II ErrorsType I and Type II Errors

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

A A Type I errorType I error is rejecting is rejecting HH00 when it is true. when it is true. A A Type II errorType II error is accepting is accepting HH00 when it is false. when it is false. 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 aType I error, denoted by Type I error, denoted by and called the and called the level of level of significancesignificance..

Generally, we cannot control for the probability of Generally, we cannot control for the probability of making a Type II error, denoted by making a Type II error, denoted by ..

Statistician avoids the risk of making a Type II Statistician avoids the risk of making a Type II error by using “do not reject error by using “do not reject HH00” and not “accept ” and not “accept HH00”.”.

Page 10: Hypothesis Testing

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 Conclusion Conclusion

Example: Metro EMSExample: Metro EMS

Page 11: Hypothesis Testing

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

Page 12: Hypothesis Testing

The Steps of Hypothesis TestingThe Steps of Hypothesis Testing

Determine the appropriate hypotheses.Determine the appropriate hypotheses. Select the test statistic for deciding whether or Select the test statistic for deciding whether or

not to reject the null hypothesis.not to reject the null hypothesis. Specify the level of significance Specify the level of significance for the test. for the test. Use Use to develop the rule for rejecting to develop the rule for rejecting HH00.. Collect the sample data and compute the Collect the sample data and compute the

value of the test statistic.value of the test statistic. a) Compare the test statistic to the critical a) Compare the test statistic to the critical

value(s) in the rejection rule, or value(s) in the rejection rule, or b) Compute the b) Compute the pp-value based on the test -value based on the test statistic and compare it to statistic and compare it to to determine to determine whether or not to reject whether or not to reject HH00..

Page 13: Hypothesis Testing

HypothesesHypotheses

HH00: : oror HH00: :

HHaa::HHaa::

Test StatisticTest Statistic

KnownKnown Unknown Unknown

Rejection RuleRejection Rule

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/

Page 14: Hypothesis Testing

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)

Page 15: Hypothesis Testing

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

Page 16: Hypothesis Testing

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

Page 17: Hypothesis Testing

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: Mean:

Large-Sample Case (Large-Sample Case (nn >> 30) 30)

z xn

0

/z x

n

0

/z xs n

0/

z xs n

0/

Page 18: Hypothesis Testing

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.

Page 19: Hypothesis Testing

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

Page 20: Hypothesis Testing

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

Page 21: Hypothesis Testing

Example: Glow ToothpasteExample: Glow Toothpaste

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

Assume that a sample of 30 toothpaste tubesAssume that a sample of 30 toothpaste tubes

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

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

ConclusionConclusion: : We are 95% confident that the mean We are 95% confident that the mean filling weight of the toothpaste tubes is not 6 filling weight of the toothpaste tubes is not 6 ounces. The filling process should be stopped and ounces. The filling process should be stopped and the filling mechanism adjusted.the filling mechanism adjusted.

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

Assume that a sample of 30 toothpaste tubesAssume that a sample of 30 toothpaste tubes

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

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

ConclusionConclusion: : We are 95% confident that the mean We are 95% confident that the mean filling weight of the toothpaste tubes is not 6 filling weight of the toothpaste tubes is not 6 ounces. The filling process should be stopped and ounces. The filling process should be stopped and the filling mechanism adjusted.the filling mechanism adjusted.

74.230/2.

61.6

/0

ns

xz

74.2

30/2.

61.6

/0

ns

xz

xx

Page 22: Hypothesis Testing

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.

Page 23: Hypothesis Testing

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

Page 24: Hypothesis Testing

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

Page 25: Hypothesis Testing

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/

Page 26: Hypothesis Testing

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.

Page 27: Hypothesis Testing

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.

Page 28: Hypothesis Testing

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

Page 29: Hypothesis Testing

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 ?

known ?known ?

Popul. Popul. approx.approx.normal normal

?? known ?known ?

Use Use ss to toestimate estimate

Use Use ss to toestimate 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

Page 30: Hypothesis Testing

A Summary of Forms for Null and A 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

Page 31: Hypothesis Testing

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( )

Page 32: Hypothesis Testing

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.

Page 33: Hypothesis Testing

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

Page 34: Hypothesis Testing

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).

Page 35: Hypothesis Testing

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.

Page 36: Hypothesis Testing

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. Formulate the null and alternative hypotheses.1. Formulate the null and alternative hypotheses.

2. Use the level of significance 2. 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. Using the rejection rule, solve for the value of 3. 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. Use the results from step 3 to state the values 4. 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 of HH00; this defines the acceptance region.; this defines the acceptance region.

5. Using the sampling distribution of for any 5. 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

Page 37: Hypothesis Testing

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

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

1. Hypotheses are: 1. Hypotheses are: HH00: : and and HHaa::

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

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

4. We will accept 4. 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

Page 38: Hypothesis Testing

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

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

5. Probabilities that the sample mean will be in 5. 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

Page 39: Hypothesis Testing

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.

Page 40: Hypothesis Testing

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

Page 41: Hypothesis Testing

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

MeanMean

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

nz z

a

( )

( )

2 2

02

nz z

a

( )

( )

2 2

02

Page 42: Hypothesis Testing

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.