Vous êtes sur la page 1sur 61

Hypothesis Testing

Developing Null and Alternative Hypotheses Type II n Type I and Errors n Population Mean:
n

Known n Population Mean: Unknown n Population Proportion

2007 Thomson South-Western. All Rights

Developing Null and Alternative Hypotheses


Hypothesis testing can be used to determine whether a statement about the value of a population parameter hypothesis, denoted by H0 , is a n The null should tentative or should not be rejected. assumption about a population parameter. n The alternative hypothesis, denoted by Ha, is the opposite of what is stated in the null hypothesis. n The alternative hypothesis is what the test is
n

attempting to establish.

2007 Thomson South-Western. All Rights

Developing Null and Alternative Hypotheses


n

Testing Research Hypotheses

The research hypothesis should be expressed as the alternative hypothesis. The conclusion that the research hypothesis is true comes from sample data that contradict the null hypothesis.

2007 Thomson South-Western. All Rights

Developing Null and Alternative Hypotheses


n

Testing the Validity of a Claim Manufacturers claims are usually given the benefit of conclusion that the as the false Thethe doubt and statedclaim is null comes hypothesis. from sample data that contradict the null hypothesis.

2007 Thomson South-Western. All Rights

Developing Null and Alternative Hypotheses


n

Testing in Decision-Making Situations

A decision maker might have to choose between two courses of action, one associated with the null hypothesis and another associated with Example: Accepting a shipment of goodsthe alternative hypothesis. from a supplier or returning the shipment of goods to the supplier

2007 Thomson South-Western. All Rights

Summary of Forms for Null and Alternative Hypotheses about a Population Mean of the hypotheses always n The equality part
appears in the null hypothesis. n In general, a hypothesis test about the value of a population mean must take one of the following three forms (where 0 is the hypothesized value ofH 0: 0 H 0: 0 H 0: = 0 the population mean). > H : < H : H :
a 0 a 0 a 0

2007 Thomson South-Western. All Rights

Onetailed (lowertail)

Onetailed (uppertail)

Twotailed
6

Null and Alternative Hypotheses


n

Example: Metro EMS

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

2007 Thomson South-Western. All Rights

Null and Alternative Hypotheses


n

Example: Metro EMS

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

2007 Thomson South-Western. All Rights

Null and Alternative Hypotheses


H0: < 12 The emergency service is meeting the response goal; no followup action is necessary. The emergency service is

Ha: > 1 2

not meeting the response goal; appropriate follow-up action is necessary. where: = mean response time for the population of medical emergency requests

2007 Thomson South-Western. All Rights

Type I Error
Because hypothesis tests are based on sample data, we must allow for the possibility of errors. n A Type I error is rejecting H0 when it is true.
n

The probability of making a Type I error when the null hypothesis is true as an equality is called the n Applications of hypothesis testing that only level of significance. control the Type I error are often called significance tests.
n

2007 Thomson South-Western. All Rights

Type II Error
A Type II error is accepting H0 when it is false.
n

It is difficult to control for the probability of making n Statisticians avoid the risk of making a Type a Type II error. II error by using do not reject H0 and not accept H0.
n

2007 Thomson South-Western. All Rights

Type I and Type II Errors

Population Condition H0 True ( < 12) Correct Decision Type I Error H0 False ( > 12) Type II Error

Conclusion Accept H0 (Conclude < 12) Reject H0 (Conclude > 12)

Correct Decision

2007 Thomson South-Western. All Rights

p-Value Approach to One-Tailed Hypothesis Testing


The p-value is the probability, computed using the test statistic, that measures the support (or lack of support) provided by the sample for the null n If the p-value is less than or equal to the level of hypothesis. significance , the value of the test statistic is in the rejection region. n Reject H0 if the p-value
n

< .

2007 Thomson South-Western. All Rights

Lower-Tailed Test About a Population Mean: Known p-Value < , n p-Value Approach
so reject H0.

=. 10
pvalue = .072 z = -z 0 = 1.4 6 -1.2 Thomson South-Western. All Rights

Sampling distributio n z = x 0 / n of z

2007

Upper-Tailed Test About a Population Mean: Known p-Value < , n p-Value Approach
so reject H0.

Sampling distributio n z = x 0 / n of

=. 04
pValue = .011 z 0 z = z = 2.2 9

2007 Thomson South-Western. All Rights 1.7

Critical Value Approach to One-Tailed Hypothesis Testing


The test statistic z has a standard normal probability distribution. n We can use the standard normal probability
n

distribution table to find the z-value with an area of value of the test upper) that n The in the lower (orstatistic tail of the distribution.the established the
n

boundary of the rejection region is called The rejection rule is: critical value for the test. Lower tail: Reject H0 if z < -z Upper tail: Reject H0 if z > z

2007 Thomson South-Western. All Rights

Lower-Tailed Test About a Population Mean: Known n Critical Value Approach


Sampling distributio n z = x 0 / n of Do Not Reject H0 0

Reject H0 = .10

z = 1.28

2007 Thomson South-Western. All Rights

Upper-Tailed Test About a Population Mean: Known n Critical Value Approach


Sampling distributio n z = x 0 / n of Do Not Reject H0 0 z = 1.645

Reject H0 = .0 5

2007 Thomson South-Western. All Rights

Steps of Hypothesis Testing


Step 1. Develop the null and alternative hypotheses. Step 2. Specify the level of significance . the sample data and compute Step 3. Collect the test statistic. p-Value Approach Step 4. Use the value of the test statistic to compute the p-value. Step 5. Reject H0 if p-value < .

2007 Thomson South-Western. All Rights

Steps of Hypothesis Testing


Critical Value Approach Step 4. Use the level of significance to determine the critical value and the Step 5.rejection rule. of the test statistic and the Use the value rejection rule to determine whether to reject H0.

2007 Thomson South-Western. All Rights

One-Tailed Tests About a Population Mean: Known n Example: Metro EMS


The response times for a random sample of 40 medical emergencies were tabulated. The sample mean is 13.25 minutes. The population director wants to The EMS standard hypothesis test, with perform adeviation is believed a to .05 level of significance, to determine be 3.2 minutes. whether the service goal of 12 minutes or less is being achieved.
2007 Thomson South-Western. All Rights

Approaches 1. Develop the hypotheses.

One-Tailed Tests About a Population Mean: pKnownand Critical Value -Value


H0: < 12 Ha: > 1 2. Specify the level of =. 2 significance. 05 3. Compute the value of the test statistic. x 13.25 12 z= = = 2.47 / n 3.2/ 40

2007 Thomson South-Western. All Rights

Approach 4. Compute the p value. For z = 2.47, cumulative probability = .9932.

One-Tailed Tests About a Population Mean: pKnown Value

pvalue = 1 .9932 = .0068 5. Determine whether to reject H0. Because pvalue = .0068 < = .05, we reject H0. There is sufficient statistical evidence to infer that Metro EMS is not meeting the response goal of 12 minutes.
2007 Thomson South-Western. All Rights

One-Tailed Tests About a Population Mean: Known n p Value Approach


Sampling distributio n z = x 0 / n of

=. 05
pvalue = .0068 z 0 z = 1.64 All Rights 5 z = 2.4 7

2007 Thomson South-Western.

One-Tailed Tests About a Population Mean: Known n Excel Formula


Worksheet A
Response 1 Time 2 19.5 3 15.2 4 11.0 5 12.8 6 12.4 7 20.3 8 9.6 9 10.9 10 16.2 11 13.4 12 19.7 B C Sample Size =COUNT(A2:A41) Sample Mean =AVERAGE(A2:A41) Population Std. Dev. 3.2 Hypothesized Value 12 Note: Rows 13-41 are not shown. Standard Error =C4/SQRT(C1) Test Statistic z =(C2-C5)/C7

p -Value (lower tail) =NORMSDIST(C8) p -Value (lower tail) =1-C10 p -Value (two tail) =2*(MIN(C10,C11))

2007 Thomson South-Western. All Rights

One-Tailed Tests About a Population Mean: Known n Excel Value


Worksheet A
Response 1 Time 2 19.5 3 15.2 4 11.0 5 12.8 6 12.4 7 20.3 8 9.6 9 10.9 10 16.2 11 13.4 12 19.7 B Sample Size 40 Sample Mean 13.25 Population Std. Dev. 3.2 Hypothesized Value 12 Standard Error 0.506 Test Statistic z 2.47 p -Value (lower tail) 0.9933 p -Value (upper tail) 0.0067 p -Value (two tail) 0.0134 Note: Rows 13-41 are not shown. C

2007 Thomson South-Western. All Rights

Approach 4. Determine the critical value and rejection rule. For = .05, z.05 = 1.645 Reject H0 if z > 1.645 5. Determine whether to reject H0. Because 2.47 > 1.645, we reject H0. There is sufficient statistical evidence to infer that Metro EMS is not meeting the response goal of 12 minutes.
2007 Thomson South-Western. All Rights

One-Tailed Tests About a Population Mean: Critical Value Known

p-Value Approach to Two-Tailed Hypothesis Testing


Compute the p-value using the following three steps: 1. Compute the value of the test
n

statistic z. the upper tail (z > 0), find the area 2. If z is in under the standard normal curve to the right of z. If z is in the lower tail (z < 0), find the area under 3. Double the tail area obtained in step 2 to the obtain standard normal curve to the left of z.
n

Thethe p value. rejection rule: Reject H0 if the p-value <

2007 Thomson South-Western. All Rights

Critical Value Approach to Two-Tailed Hypothesis Testing


The critical values will occur in both the lower and n upper standard normal probability Use the tails of the standard normal curve. distribution table to find z/2 (the z-value with an area of /2 The rejection rule is: in n the upper tail ofH0 if distribution). Reject the z < -z/2 or
n

z > z/2.

2007 Thomson South-Western. All Rights

Example: Glow Toothpaste


n

Two-Tailed Test About a Population Mean: Known The production line for Glow toothpaste is designed to fill tubes with a mean oz. weight of 6 oz. Periodically, a sample of 30 Glow tubes willQuality assurance procedures the for be selected in order to check call filling process. of the filling process if the the continuation sample results are consistent with the assumption that the mean filling weight for the population of toothpaste tubes is 6 oz.; otherwise the process will be adjusted.

2007 Thomson South-Western. All Rights

Example: Glow Toothpaste


Two-Tailed Test About a Population Mean: Known Assume that a sample of 30 toothpaste tubes provides a sample mean of 6.1 oz. oz. The population standard deviation is Glow Perform be 0.2 oz. believed to a hypothesis test, at the . 03 level of significance, to help determine whether the filling process should continue operating or be stopped and corrected.
n 2007 Thomson South-Western. All Rights

Approaches 1. Determine the hypotheses.

Two-Tailed Tests About a Population Mean: pKnown and Critical Value Value
H0: = 6 6 Ha: 2. Specify the level of =. significance. 03 3. Compute the value of the test statistic. x 0 6 6 .1 z= = = 2 4 .7 / n .2/ 30

Glo w

2007 Thomson South-Western. All Rights

Approach 4. Compute the p value. For z = 2.74, cumulative probability = .9969 pvalue = 2(1 .9969) = .0062 5. Determine whether to reject H0. Because pvalue = .0062 < = .03, we reject sufficient statistical evidence to There isH0. infer that the alternative hypothesis is true (i.e. the mean filling weight is not 6 ounces).
2007 Thomson South-Western. All Rights

Two-Tailed Tests About a Population Mean: pKnown Value

Glo w

Two-Tailed Tests About a Population Mean: p-Value Known


p -value =. 0031 /2 = . 015 z= -2.74 -z/2 = -2.17 1/2 p -value =. 0031 /2 = . 015 z 0 z/2 = 2.17 z= 2.74 1/2

Glo w

Approach

2007 Thomson South-Western. All Rights

Two-Tailed Tests About a Population Mean: Known n Excel Formula Worksheet


A 1 Weight 2 6.04 3 5.99 4 5.92 5 6.03 6 6.01 7 5.95 8 6.09 9 6.07 10 6.07 11 5.97 12 5.96 B C Sample Size =COUNT(A2:A31) Sample Mean =AVERAGE(A2:A31) Population Std. Dev. 0.2 Hypothesized Value 6 Standard Error =C4/SQRT(C1) Test Statistic z =(C2-C5)/C7 p -Value (lower tail) =NORMSDIST(C8) p -Value (upper tail) =1-C10 p -Value (two tail) =2*(MIN(C10,C11))

Glo w

Note: Rows 13-31 are not shown.


2007 Thomson South-Western. All Rights

Two-Tailed Tests About a Population Mean: Known n Excel Value Worksheet


A 1 Weight 2 6.04 3 5.99 4 5.92 5 6.03 6 6.01 7 5.95 8 6.09 9 6.07 10 6.07 11 5.97 12 5.96 B Sample Size 30 Sample Mean 6.1 Population Std. Dev. 0.2 Hypothesized Value 6 Standard Error 0.0365 Test Statistic z 2.7386 p -Value (lower tail) 0.9969 p -Value (upper tail) 0.0031 p -Value (two tail) 0.0062 C

Glo w

Note: Rows 13-31 are not shown.


2007 Thomson South-Western. All Rights

Approach 4. Determine the critical value and rejection rule. For /2 = .03/2 = .015, z.015 = 2.17 H0 if z < -2.17 or z Reject

Two-Tailed Tests About a Population Mean: Critical Value Known

Glo w

> 2.17 5. Determine whether to reject H0. Because 2.74 > 2.17, we There reject H0. statistical evidence to is sufficient infer that the alternative hypothesis is true (i.e. the mean filling weight is not 6 ounces).

2007 Thomson South-Western. All Rights

Approach

Two-Tailed Tests About a Population Mean: Critical Value Known


Sampling distributio n z = x 0 / n of Reject Do Not Reject H0 H0 /2 = . 015 z 0 -2.17 2.17

Glo w

Reject H0 /2 = . 015

2007 Thomson South-Western. All Rights

Confidence Interval Approach to Two-Tailed Tests About a Population Mean


Select a simple random sample from the x population and use the value of the sample mean to develop n Ifthe confidence interval for the population mean the confidence interval contains the . hypothesized (Confidence intervals are covered in Chapter value 0, do not reject H0. Otherwise, reject 8.) H0.
n

2007 Thomson South-Western. All Rights

Confidence Interval Approach to Two-Tailed Tests About a Population Mean


The 97% confidence interval for is

x z /2

6.1 2.17(.2 = n

Glo w

30 )

6.1 = .07924

the population mean, 0 = 6, is not in this interval, the hypothesis-testing conclusion is that the null hypothesis, H0: = 6, can be rejected.
2007 Thomson South-Western. All Rights

or 6.02076 to 6.17924 Because the hypothesized value for

Tests About a Population Mean: Unknown


n

Test Statistic
x 0 t= s/ n

This test statistic has a t distribution with n - 1 degrees of freedom.

2007 Thomson South-Western. All Rights

Tests About a Population Mean: Unknown


n

Rejection Rule: p -Value Approach Reject H0 if p value < Rejection Rule: Critical Value Approach H0: > 0 H0: < 0 H0: = 0 Reject H0 if t < -t Reject H0 if t > t Reject H0 if t < - t/2 or t > t/2

2007 Thomson South-Western. All Rights

p -Values and the t Distribution


The format of the t distribution table provided in most statistics textbooks does not have sufficient detail n However, we can still use the t distribution to determine the exact p-value for a table to hypothesis test. identify a range for the p-value. n An advantage of computer software packages is that the computer output will provide the p-value for the t distribution.
n

2007 Thomson South-Western. All Rights

Example: Highway Patrol


n

One-Tailed Test About a Population Mean: Unknown Highway Patrol periodically A State samples vehicle speeds at various locations on a particular roadway. The sample of vehicle speeds is used to test the hypothesis H0: < 65 The locations where H0 is rejected are deemed the best locations for radar traps.

2007 Thomson South-Western. All Rights

Example: Highway Patrol


n

One-Tailed Test About a Population Mean: Unknown At Location F, a sample of 64 vehicles shows a mean speed of 66.2 mph with a standard deviation of 4.2 mph. Use = .05 to test the hypothesis.

2007 Thomson South-Western. All Rights

One-Tailed Test About a Population Mean: Unknown


p Value and Critical Value Approaches 1. Determine the hypotheses.
n

H0: < 65 Ha: > 2. Specify the level of 65 = . significance. 05 3. Compute the value of the test statistic. x 0 66.2 65 t= = = 2.286 s/ n 4.2/ 64

2007 Thomson South-Western. All Rights

One-Tailed Test About a Population Mean: Unknown


p Value Approach 4. Compute the p value. For t = 2.286, the pvalue must be less than .025 (for t = 1.998) and greater than .01 (for t = 2.387).
n

2007 Thomson South-Western. All Rights

5. Determine whether to .01 < pvalue < .025 reject H0. Because pvalue < = .05, we reject H0. We are at least 95% confident that the mean speed of vehicles at Location F is greater than 65 mph.

One-Tailed Test About a Population Mean: Unknown


n
1 2 3 4 5 6 7 8 9 10 11 12 13

Excel Formula Worksheet


A B C Speed Sample Size =COUNT(A2:A65) 69.6 Sample Mean =AVERAGE(A2:A65) 73.5 Sample Std. Dev. =STDEV(A2:A65) 74.1 64.4 Hypoth. Value 65 66.3 68.7 Standard Error =C3/SQRT(C1) 69.0 Test Statistic t =(C2-C5)/C7 65.2 Degr. of Freedom =C1-1 71.1 70.8 p -Value (lower tail) =IF(C8<0,TDIST(-C8,C9,1),1-TDIST(C8,C9,1)) 64.6 p -Value (upper tail) =1-C11 67.4 p -Value (two tail) =2*MIN(C11,C12)

Note: Rows 14-65 are not shown.


2007 Thomson South-Western. All Rights

One-Tailed Test About a Population Mean: Unknown


n
1 2 3 4 5 6 7 8 9 10 11 12 13

Excel Value Worksheet


A B Speed Sample Size 64 69.6 Sample Mean 66.2 73.5 Sample Std. Dev. 4.2 74.1 64.4 Hypoth. Value 65 66.3 68.7 Standard Error 0.525 69.0 Test Statistic t 2.286 65.2 Degr. of Freedom 63 71.1 70.8 p -Value (lower tail) 0.9872 64.6 p -Value (upper tail) 0.0128 67.4 p -Value (two tail) 0.0256 C

Note: Rows 14-65 are not shown.


2007 Thomson South-Western. All Rights

One-Tailed Test About a Population Mean: Unknown


Critical Value Approach 4. Determine the critical value and rejection rule. For = .05 and d.f. = 64 1 = 63, t.05 = 1.669 Reject H0 if t > 1.669 5. Determine whether to reject H0. Because 2.286 > 1.669, we reject H0. We are at least 95% confident that the mean speed of vehicles at Location F is greater than 65 mph. Location F is a good candidate for a radar trap.
n

2007 Thomson South-Western. All Rights

One-Tailed Test About a Population Mean: Unknown

Do Not Reject H0

Reject H0 = .0 5 t = 1.66 9

2007 Thomson South-Western. All Rights

appears in the null hypothesis. n In general, a hypothesis test about the value of a population proportion p must take one of the following three forms (where p0 is the hypothesized value of p p0 H 0: p proportion). = p0 H 0: p H 0: the population p0

A Summary of Forms for Null and Alternative Hypotheses About a Population Proportion hypotheses always n The equality part of the

H a: p < p0

H a: p > p0

H a: p p0

2007

OneOneTwotailed tailed tailed (lower (upper tail) tail) Thomson South-Western. All Rights

Tests About a Population Proportion


n

Test Statistic

p p0 z= p
where :

p =

p0 (1 p0 ) n

assuming np > 5 and n(1 p) > 5

2007 Thomson South-Western. All Rights

Tests About a Population Proportion


n

Rejection Rule: p Value Approach Reject H0 if p value < Rejection Rule: Critical Value Approach H0: p < p0 H0: p > p0 H0: p = p0 Reject H0 if z > z Reject H0 if z < -z Reject H0 if z < -z/2 or z > z/2

2007 Thomson South-Western. All Rights

Two-Tailed Test About a Population Proportion


n

Example: National Safety Council (NSC) a Christmas and New Years For

week, the National Safety Council estimated that 500 people would be killed and 25,000 injured on the nations roads. The NSC claimed that 50% of the accidents would be caused by drunk driving.

2007 Thomson South-Western. All Rights

Two-Tailed Test About a Population Proportion


n

Example: National Safety Council (NSC) A sample of 120 accidents showed that 67 were caused by drunk driving. Use these data to test the NSCs claim with = .05.

2007 Thomson South-Western. All Rights

Two-Tailed Test About a Population Proportion


p Value and Critical Value Approaches 1. Determine the hypotheses.
n

H 0: p = .5 H a: p .5
= .05

2. Specify the level of significance.

3. Compute the value of the test statistic. p0(1 p0 ) .5(1 .5) p = = =.045644 n 120 a common error is p p0 (67/ 120) .5 z= = = 1.28 p using p .045644 in this formulaThomson South-Western. All Rights 2007

Two-Tailed Test About a Population Proportion


pValue Approach 4. Compute the p -value. For z = 1.28, cumulative probability = .8997
n

pvalue = whether to 5. Determine 2(1 .8997) = .2006 reject H0. Because pvalue = .2006 > = .05, we cannot reject H0.

2007 Thomson South-Western. All Rights

Using Excel to Conduct Hypothesis Tests about a Population Proportion


n

Excel Formula Worksheet


1 2 3 4 5 6 7 8 9 10 11 12 13 A Drunk Driving No Yes No Yes No Yes Yes No No Yes Yes Yes B Sample Size Response of Interest Count for Response Sample Proportion C =COUNT(A2:A121) Yes =COUNTIF(A2:A121,C2) =C3/C1 Note: Rows 14-121 Hypothesized Value 0.5 are not shown. Standard Error =SQRT(C6*(1-C6)/C1) Test Statistic z =(C4-C6)/C8 p -Value (lower tail) =NORMSDIST(C9) p -Value (upper tail) =1-C11 p -Value (two tail) =2*MIN(C11,C12)

2007 Thomson South-Western. All Rights

Using Excel to Conduct Hypothesis Tests about a Population Proportion


n

Excel Value Worksheet


1 2 3 4 5 6 7 8 9 10 11 12 13 A Drunk Driving No Yes No Yes No Yes Yes No No Yes Yes Yes B Sample Size Response of Interest Count for Response Sample Proportion 120 Yes 67 0.5583 C

Hypothesized Value 0.5 Standard Error 0.0456 Test Statistic z 1.28 p -Value (lower tail) 0.8997 p -Value (upper tail) 0.1003 p -Value (two tail) 0.2006

Note: Rows 14-121 are not shown.

2007 Thomson South-Western. All Rights

Two-Tailed Test About a Population Proportion


Critical Value Approach 4. Determine the criticals value and rejection rule. For /2 = .05/2 = .025, z.025 =Reject H0 if z < -1.96 or z 1.96 > 1.96 5. Determine whether to reject H0. Because 1.278 > -1.96 and < 1.96, we cannot reject H0.
n

2007 Thomson South-Western. All Rights

Vous aimerez peut-être aussi