You are on page 1of 72

Data Science for Managerial

Decisions
Hypothesis Testing

A supposition or proposed explanation made on the basis of limited evidence as a starting


point for further investigation.

2
Null and Alternative Hypothesis

◼ Null Hypothesis ◼ Alternative Hypothesis

◼ Denoted by: H0 ◼ Denoted by: Ha


◼ Null means nothing new or different; no ◼ The alternative is simply the other
change, no effect, no difference; tentative option - there is a change, a difference,
assumption about a population treatment does have an effect
parameter; status quo is maintained;
process under control

3
Developing Null-Alternative Hypothesis

◼ Bisleri’s most popular product is


a 500 ml bottle. Since this
information is on the label, we
assume it to be true.

◼ But, is it true ?

4
Developing Null-Alternative Hypothesis

◼ Suppose we collect a random


sample of 100 bottles from all over
the city

◼ We then measure the volume of


each bottle in the sample and find
the mean volume for all 100 bottles

◼ Using the sample means we can test


the assumption (the Status Quo)

5
Developing Null-Alternative Hypothesis

◼ Example: A new machine is bought in an


attempt to decrease the number of
defective products.

◼ Alternative Hypothesis: The new


machine reduces the number of defective
products.
◼ Null Hypothesis: The new machine does
not reduce the number of defective
products.

6
Developing Null-Alternative Hypothesis

◼ Example: A new sales force bonus plan is


developed in an attempt to increase
sales.

◼ Alternative Hypothesis: The new bonus


plan increase sales.
◼ Null Hypothesis: The new bonus plan
does not increase sales.

7
Summary of Forms for Null and Alternative
Hypotheses about a Population Mean
The equality part of the hypotheses always appears in the null hypothesis.
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 of the
population mean).

H 0 :   0 H 0 :   0 H 0 :  = 0
H a :   0 H a :   0 H a :   0

One-tailed One-tailed Two-tailed


(lower-tail) (upper-tail)

8
Null and Alternative Hypotheses

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

9
Null and Alternative Hypotheses

Example: Metro EMS

The emergency service is meeting the response


H0:   
goal; no follow-up action is necessary.

The emergency service is not meeting the


Ha:   
response goal; appropriate follow-up action is
necessary.

where:  = mean response time for the population of medical emergency requests

10
Type I Error

Because hypothesis tests are based on sample data, we must allow for the possibility of errors.
A Type I error is rejecting H0 when it is true.
The probability of making a Type I error when the null hypothesis is true as an equality is called
the level of significance.
Applications of hypothesis testing that only control the Type I error are often called significance
tests.

11
Type II Error

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


Statisticians avoid the risk of making a Type II error by using “do not reject H0” and not “accept H0”.

12
Type I and Type II Error

Population Condition

H0 True H0 False
Conclusion ( < 12) ( > 12)

Do Not Reject H0 Correct


Type II Error
(Conclude  < 12) Decision

Reject H0 Correct
Type I Error
(Conclude  > 12) Decision

13
Steps of Hypothesis Testing

Step 1. Develop the null and alternative hypotheses.


Step 2. Specify the level of significance .
Step 3. Collect the sample data and compute the value of 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 < .
Critical Value Approach
Step 4. Use the level of significance to determine the critical value and the rejection rule.
Step 5. Use the value of the test statistic and the rejection rule to determine whether to reject H0.

14
One-Tailed Tests About a Population Mean:
s Known
◼ 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.
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.
The response times for a random sample of 40 medical emergencies were tabulated. The sample mean
is 13.25 minutes. The population standard deviation is believed to be 3.2 minutes.
The EMS director wants to perform a hypothesis test, with a .05 level of significance, to determine
whether the service goal of 12 minutes or less is being achieved.

15
One-tailed (upper-tail) Hypothesis Test:
s Known

1 -  of all
x values
𝛼
𝜇0 𝑥ҧ𝛼 𝑥ҧ

16
One-tailed (upper-tail) Hypothesis Test:
s Known

1 -  of all
x values
𝛼
𝜇4 𝜇3 𝜇0 𝜇1 𝑥ҧ𝛼 𝜇2 𝑥ҧ

17
One-tailed (upper-tail) Hypothesis Test:
s Known

𝑥ҧ − 𝜇0
𝑧= 𝜎
𝑛
1 -  of all
z values
𝛼
0 𝑧𝛼 𝑧

18
One-Tailed (upper-tail) Tests about a Population Mean:
s Known
◼ Critical Value and p -Value Approaches

H0:   
1. Develop the hypotheses.
Ha:   

2. Specify the level of significance.  = .05

3. Compute the value of the test statistic.


x −  13.25 − 12
z= = = 2.47
s / n 3.2 / 40

19
One-Tailed (upper-tail) Tests about a Population Mean:
s Known
◼ Critical Value Approaches

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.

20
One-Tailed (upper-tail) Tests about a Population Mean:
s Known
◼ p -Value Approaches

Sampling
distribution  = .05
of z = x −  0
s/ n

p-value
= 

z
0 z = z statistics=
1.645 2.47

21
One-Tailed Tests (upper-tail) about a Population Mean:
s Known
◼ p -Value Approaches

4. Compute the p –value.

p–value = Prob (z ≥2.47)


= 1 - Prob (z≤2.47) = 1 − .9932 = .0068

5. Determine whether to reject H0.


Because p–value = .0068 <  = .05, we reject H0.

There is sufficient statistical evidence to infer that Metro EMS is not


meeting the response goal of 12 minutes.

22
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 hypothesis.
If the p-value is less than or equal to the level of significance , the value of the test statistic is in the
rejection region.
Reject H0 if the p-value <  .

23
One-Tailed Tests (lower-tail) about a Population Mean:
s Known

◼ Consider the case of a wholesaler that buys lightbulbs from the manufacturer.
The wholesaler buys the bulbs in large lots and does not want to accept a lot of
bulbs unless the mean life is atleast 1000 hours. As each shipment arrives, the
wholesaler tests a sample to determine whether it should accept the shipment or
not. The company will reject the shipment only if it feels that the mean life is
below 1000 hours
𝐻0 : μ ≥ 1000
𝐻𝑎 : μ < 1000

They collected a random sample of 40 lightbulbs. The mean life is 992.6 hours. The
population standard deviation is believed to be 32 hours. The wholesaler wants to
perform a hypothesis test, with a 0.10 level of significance.
24
One-tailed (lower-tail) Hypothesis Test:
s Known

1 -  of all
x values
𝛼

𝑥ҧ𝛼 𝜇0 𝑥ҧ

25
One-tailed (lower-tail) Hypothesis Test:
s Known

1 -  of all
x values
𝛼
𝜇4 𝑥ҧ𝛼 𝜇3 𝜇0 𝜇1 𝜇2 𝑥ҧ

26
One-tailed (lower-tail) Hypothesis Test:
s Known

𝑥ҧ − 𝜇0
𝑧= 𝜎
𝑛
1 -  of all
z values
𝛼

−𝑧𝛼 0 𝑧

27
One-Tailed (lower-tail) test about a Population Mean:
s Known
◼ Critical Value and p -Value Approaches

H0:   
1. Develop the hypotheses.
Ha:   

2. Specify the level of significance.  = 0.10

3. Compute the value of the test statistic.


𝑥lj − 𝜇 992.6 − 1000
𝑧= = = − 1.46
𝜎/ 𝑛 32/ 40

28
One-Tailed (lower-tail) test about a Population Mean:
s Known
◼ Critical Value Approaches

4. Determine the critical value and rejection rule.

For  = .10, -z.10 = -1.28


Reject H0 if z < -1.28

5. Determine whether to reject H0.


Because -1.46 < -1.28 , we reject H0.

29
One-Tailed (lower-tail) test about a Population Mean:
s Known
◼ p -Value Approaches p-Value <  ,
so reject H0.

 = .10 Sampling
distribution
x − 0
of z =
s/ n
p-value
= 7

z
z = -z = 0
-1.46 -1.28
30
One-Tailed Tests About a Population Mean:
s Known
◼ p -Value Approaches

4. Compute the p –value.

p–value = Prob (z ≤ - 1.46)


= 0.072

5. Determine whether to reject H0.


Because p–value = 0.072 <  = 0.10, we reject H0.

31
Critical Value Approach to
One-Tailed Hypothesis Testing
◼ The test statistic z has a standard normal probability distribution.

◼ We can use the standard normal probability distribution table to find the z-value with an area of
 in the lower (or upper) tail of the distribution.
The value of the test statistic that established the boundary of the rejection region is called the
critical value for the test.
The rejection rule is:
➢ Lower tail: Reject H0 if z < -z
➢ Upper tail: Reject H0 if z > z

32
p-Value Approach to
Two-Tailed Hypothesis Testing
◼ Compute the p-value using the following three steps:
1. Compute the value of the test statistic z.
2. If z is in the upper tail (z > 0), compute the probability that z is greater than or equal to the value of
the test statistic. If z is in the lower tail (z < 0), compute the probability that z is less than or equal
to the value of the test statistic.
3. Double the tail area obtained in step 2 to obtain the p –value.
◼ The rejection rule:
Reject H0 if the p-value <  .

33
Critical Value Approach to
Two-Tailed Hypothesis Testing

◼ The critical values will occur in both the lower and upper tails of the standard normal curve.

◼ Use the standard normal probability distribution table to find z/2 (the z-value with an area of /2
in the upper tail of the distribution).
◼ The rejection rule is:
Reject H0 if z < -z/2 or z > z/2.

34
Two-Tailed Tests About a Population Mean:
s Known
◼ Example: Glow Toothpaste

The production line for Glow toothpaste is designed to fill tubes with a mean weight of 6 oz.
Periodically, a sample of 30 tubes will be selected in order to check the filling process.
Quality assurance procedures call for the continuation of the filling process if the 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.
Assume that a sample of 30 toothpaste tubes provides a sample mean of 6.1 oz. The population
standard deviation is believed to be 0.2 oz.
Perform a hypothesis test, at the .03 level of significance, to help determine whether the filling process
should continue operating or be stopped and corrected.

35
Two-tailed Hypothesis Test:
s Known

1 -  of all
x values
𝛼/2 𝛼/2

𝑥𝐴ҧ 𝛼/2 𝜇0 𝑥ҧ𝐵𝛼/2 𝑥ҧ

36
Two-tailed Hypothesis Test:
s Known

1 -  of all
x values
𝛼/2 𝛼/2

𝜇4 𝜇3 𝜇0 𝜇1 𝑥ҧ𝐵𝛼/2 𝜇2 𝑥ҧ
𝑥𝐴ҧ 𝛼/2

37
Two-tailed Hypothesis Test:
s Known

𝑥ҧ − 𝜇0
𝑧= 𝜎
𝑛
1 -  of all
z values
𝛼/2 𝛼/2

−𝑧𝛼/2 0 +𝑧𝛼/2 𝑧

38
Two-Tailed Tests About a Population Mean:
s Known

◼ Critical Value and p-value Approaches

H0:  = 
1. Determine the hypotheses. Ha:  ≠ 

2. Specify the level of significance.  = .03

3. Compute the value of the test statistic.


x − 0 6.1 − 6
z= = = 2.74
s / n .2 / 30

39
Two-Tailed Tests About a Population Mean:
s Known

◼ Critical Value Approaches

4. Determine the critical value and rejection rule.

For /2 = .03/2 = .015, z.015 = 2.17


Reject H0 if z < -2.17 or z > 2.17

5. Determine whether to reject H0.


Because 2.74 > 2.17, we reject H0.

There is sufficient statistical evidence to infer that the alternative hypothesis


is true (i.e. the mean filling weight is not 6 ounces).

40
Two-Tailed Tests About a Population Mean:
s Known

◼ Critical Value Approaches

Sampling
distribution
of z = x −  0
s/ n

Reject H0 Do Not Reject H0 Reject H0


/2 = .015 /2 = .015

z
-2.17 0 2.17

41
Two-Tailed Tests About a Population Mean:
s Known

◼ p –Value Approach

1/2 1/2
p -value p -value
= .0031 = .0031

/2 = /2 =
.015 .015

z
z = -2.74 0 z = 2.74
-z/2 = -2.17 z/2 = 2.17
42
Two-Tailed Tests About a Population Mean:
s Known

◼ p –Value Approach

4. Compute the p –value.

p–value = Prob (z ≥2.74) + Prob (z ≤ - 2.74)


= 2* Prob (z≤-2.74) = .0062

5. Determine whether to reject H0.


Because p–value = .0062 <  = .03, we reject H0.

There is sufficient statistical evidence to infer that the alternative hypothesis


is true (i.e. the mean filling weight is not 6 ounces).

43
Summary till Now

44
If population standard deviation (𝜎) is known
One-Tailed (upper-tail) Tests

H0:   0
1) Develop the hypotheses:
Ha:   0

2) Specify the level of significance: 
ҧ 0
𝑥−𝜇
3) Compute the value of the test statistic: 𝑧𝑠𝑡𝑎𝑡 = 𝜎
𝑛 𝑝
4) Determine the critical value: 𝑍𝛼 [from z distribution table]
𝑧
5) Reject H0 if 𝑧𝑠𝑡𝑎𝑡 ≥ 𝑍𝛼 0
6) Compute the p-value: 𝑝𝑟𝑜𝑏 𝑧 ≥ 𝑧𝑠𝑡𝑎𝑡 = 1 − 𝑝𝑟𝑜𝑏 𝑧 ≤ 𝑧𝑠𝑡𝑎𝑡 𝑍𝛼 𝑧𝑠𝑡𝑎𝑡

7) Reject H0 if 𝑝 ≤𝛼

Steps 1-5 -> Critical value approach


Steps 1-3, and Steps 6-7 -> p - value approach 45
If population standard deviation (𝜎) is known
One-Tailed (lower-tail) Tests

H0:  ≥ 0
1) Develop the hypotheses:
Ha:   0 
2) Specify the level of significance: 
ҧ 0
𝑥−𝜇
3) Compute the value of the test statistic: 𝑧𝑠𝑡𝑎𝑡 = 𝜎 𝑝
𝑛
4) Determine the critical value: −𝑍𝛼 [from z distribution table]
𝑧
5) Reject H0 if 𝑧𝑠𝑡𝑎𝑡 ≤ −𝑍𝛼 0
6) Compute the p-value: 𝑝𝑟𝑜𝑏 𝑧 ≤ 𝑧𝑠𝑡𝑎𝑡
𝑧𝑠𝑡𝑎𝑡 −𝑍𝛼

7) Reject H0 if 𝑝 ≤𝛼
Steps 1-5 -> Critical value approach
Steps 1-3, and Steps 6-7 -> p - value approach 46
If population standard deviation (𝜎) is known
Two-Tailed Tests

H0:  = 0
1) Develop the hypotheses:
Ha:  ≠ 0
/ /
2) Specify the level of significance: 
ҧ 0
𝑥−𝜇
3) Compute the value of the test statistic: 𝑧𝑠𝑡𝑎𝑡 = 𝜎 𝑝/2
𝑛 𝑝/2
4) Determine critical values: 𝑍𝛼/2 & −𝑍𝛼/2 [from z table]
𝑧
5) Reject H0 if 𝑧𝑠𝑡𝑎𝑡 ≤ −𝑍𝛼/2 or 𝑧𝑠𝑡𝑎𝑡 ≥ 𝑍𝛼/2 0
6) Compute the p-value: 2 ∗ 𝑝𝑟𝑜𝑏 𝑧 ≤ 𝑧𝑠𝑡𝑎𝑡 if 𝑧𝑠𝑡𝑎𝑡 < 0 𝑧𝑠𝑡𝑎𝑡 −𝑍𝛼/2 +𝑍𝛼/2 𝑧𝑠𝑡𝑎𝑡
or 2 ∗ 𝑝𝑟𝑜𝑏 𝑧 ≥ 𝑧𝑠𝑡𝑎𝑡 if 𝑧𝑠𝑡𝑎𝑡 > 0

7) Reject H0 if 𝑝 ≤𝛼 Steps 1-5 -> Critical value approach


Steps 1-3, and Steps 6-7 -> p - value approach 47
Tests About a Population Mean:
s Unknown
◼ Test Statistic
x − 0
t=
s/ n

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

48
If population standard deviation (𝜎) is unknown
One-Tailed (upper-tail) Tests

H0:   0
1) Develop the hypotheses:
Ha:   0

2) Specify the level of significance: 
ҧ 0
𝑥−𝜇
3) Compute the value of the test statistic: 𝑡𝑠𝑡𝑎𝑡 = 𝑠
𝑛 𝑝
4) Determine the critical value: 𝑡𝛼 [from t distribution table/excel]
𝑡
5) Reject H0 if 𝑡𝑠𝑡𝑎𝑡 ≥ 𝑡𝛼 0
6) Compute the p-value: 𝑝𝑟𝑜𝑏 𝑡 ≥ 𝑡𝑠𝑡𝑎𝑡 𝑡𝛼 𝑡𝑠𝑡𝑎𝑡

7) Reject H0 if 𝑝 ≤𝛼 Steps 1-5 -> Critical value approach


Steps 1-3, and Steps 6-7 -> p - value approach

49
If population standard deviation (𝜎) is unknown
One-Tailed (lower-tail) Tests

H0:  ≥ 0
1) Develop the hypotheses:
Ha:   0 
2) Specify the level of significance: 
ҧ 0
𝑥−𝜇
3) Compute the value of the test statistic: 𝑡𝑠𝑡𝑎𝑡 = 𝑠 𝑝
𝑛
4) Determine the critical value: −𝑡𝛼 [from t distribution table/excel]
𝑡
5) Reject H0 if 𝑡𝑠𝑡𝑎𝑡 ≤ −𝑡𝛼 0
6) Compute the p-value: 𝑝𝑟𝑜𝑏 𝑡 ≤ 𝑡𝑠𝑡𝑎𝑡
𝑡𝑠𝑡𝑎𝑡 −𝑡𝛼

7) Reject H0 if 𝑝 ≤𝛼
Steps 1-5 -> Critical value approach
Steps 1-3, and Steps 6-7 -> p - value approach
50
If population standard deviation (𝜎) is unknown
Two-Tailed Tests

H0:  = 0
1) Develop the hypotheses:
Ha:  ≠ 0
/ /
2) Specify the level of significance: 
ҧ 0
𝑥−𝜇
3) Compute the value of the test statistic: 𝑡𝑠𝑡𝑎𝑡 = 𝑠 𝑝/2
𝑛 𝑝/2
4) Determine critical values: 𝑡𝛼/2 & −𝑡𝛼/2 [from t table/excel]
𝑡
5) Reject H0 if 𝑡𝑠𝑡𝑎𝑡 ≥ 𝑡𝛼/2 or 𝑡𝑠𝑡𝑎𝑡 ≤ −𝑡𝛼/2 0
6) Compute the p-value: 2 ∗ 𝑝𝑟𝑜𝑏 𝑡 ≤ 𝑡𝑠𝑡𝑎𝑡 if 𝑡𝑠𝑡𝑎𝑡 < 0 𝑡𝑠𝑡𝑎𝑡 −𝑡𝛼/2 +𝑡𝛼/2 𝑡𝑠𝑡𝑎𝑡
or 2 ∗ 𝑝𝑟𝑜𝑏 𝑡 ≥ 𝑡𝑠𝑡𝑎𝑡 if 𝑡𝑠𝑡𝑎𝑡 > 0

7) Reject H0 if 𝑝 ≤𝛼 Steps 1-5 -> Critical value approach


Steps 1-3, and Steps 6-7 -> p - value approach 51
Tests About a Population Mean:
s Unknown
Rejection Rule: p -Value Approach
Reject H0 if p –value < 
Rejection Rule: Critical Value Approach
H0:    and Ha:    Reject H0 if t < -t

H0:    and Ha:    Reject H0 if t > t

H0:  =  and Ha:  ≠  Reject H0 if t < - t/ or t > t/

52
p -Values and the t Distribution

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

53
Example: Highway Patrol

◼ One-Tailed Test About a Population Mean: s Unknown

A State Highway Patrol periodically 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. 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.

54
One-Tailed Test About a Population Mean:
s Unknown
◼ p –Value and Critical Value Approaches

H0:  < 65
1. Determine the hypotheses. Ha:  > 65

2. Specify the level of significance.  = .05

3. Compute the value of the test statistic.


x − 0 66.2 − 65
t= = = 2.286
s / n 4.2 / 64

55
One-Tailed Test About a Population Mean:
s 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.

56
One-Tailed Test About a Population Mean:
s Unknown
◼ p –Value Approach

4. Compute the p –value.

p–value = prob (t ≥ 2.286) with d.f. = 64-1 =63


i.e. using Excel Function
p–value =T.DIST.RT(2.286,63) = 0.0128

5. Determine whether to reject H0.


Because p–value <  = .05, we reject H0.
We are at least 95% confident that the mean speed of vehicles at Location
F is greater than 65 mph.

57
One-Tailed Test About a Population Mean:
s Unknown

Reject H0
Do Not Reject H0
 = 

t
0 t =
1.669

58
Calculating the Probability of a Type II Error
in Hypothesis Tests About a Population Mean
1. Formulate the null and alternative hypotheses.
2. Using the critical value approach, use the level of significance  to determine the critical value and
the rejection rule for the test.
3. Using the rejection rule, solve for the value of the sample mean corresponding to the critical value
of the test statistic.
4. Use the results from step 3 to state the values of the sample mean that lead to the acceptance of H0;
this defines the acceptance region.
5. Using the sampling distribution of 𝑥ҧ for a value of  satisfying the alternative hypothesis, and the
acceptance region from step 4, compute the probability that the sample mean will be in the
acceptance region. (This is the probability of making a Type II error at the chosen level of  .)

59
Calculating the Probability
of a Type II Error
◼ 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.
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.
The response times for a random sample of 40 medical emergencies were tabulated. The sample mean
is 13.25 minutes. The population standard deviation is believed to be 3.2 minutes.
The EMS director wants to perform a hypothesis test, with a .05 level of significance, to determine
whether the service goal of 12 minutes or less is being achieved.

60
Calculating the Probability
of a Type II Error

1. Hypotheses are: H0:    and Ha:   


2. Rejection rule is: Reject H0 if z > 1.645
3. Value of the sample mean that identifies the rejection region:
x − 12
z=  1.645
3.2 / 40
 3.2 
x  12 + 1.645   = 12.8323
 40 

4. We will accept H0 when x < 12.8323

61
Calculating the Probability
of a Type II Error
Sampling
distribution c
of 𝑥ҧ when
Reject H0 H0:   
H0 is true
Ha:   
and  = 12

x
12 Sampling
distribution
of 𝑥ҧ when
H0 is false
Note:
and a > 12
b

x
c a 62
Calculating the Probability
of a Type II Error
5. Probabilities that the sample mean will be in the acceptance region:

12.8323 − 
z=
Values of  3.2 / 40 b 1-b
14.0 -2.31 .0104 .9896
13.6 -1.52 .0643 .9357
13.2 -0.73 .2327 .7673
12.8323 0.00 .5000 .5000
12.8 0.06 .5239 .4761
12.4 0.85 .8023 .1977
12.0001 1.645 .9500 .0500

β = Prob (𝑥ҧ < 12.8323 𝜇 > 12 = Prob (𝑥ҧ ≤ 12.8323 𝜇 > 12


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

Observations about the preceding table:

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

Example:  = 12.0001, b = .9500


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

Example:  = 14.0, b = .0104

64
Power of the Test

The probability of correctly rejecting H0 when it is false is called the power of the test.
For any particular value of , the power is 1 – b.
We can show graphically the power associated with each value of ; such a graph is called a
power curve.

65
Power of the Test

1.00

Rejecting Null Hypothesis


0.90

Probability of Correctly
0.80
H0 False
0.70
0.60
0.50
0.40
0.30
0.20
0.10
0.00 
11.5 12.0 12.5 13.0 13.5 14.0 14.5

66
Determining the Sample Size for a Hypothesis Test
About a Population Mean
The specified level of significance determines the maximum probability of making a Type I
error.
By controlling the sample size, the probability of making a Type II error is controlled.

67
Determining the Sample Size for a Hypothesis Test
About a Population Mean
Sampling
distribution c
of 𝑥ҧ when H0:   
H0 is true Reject H0
Ha:   
and  = 0

x
0 Sampling
distribution
of 𝑥ҧ when
H0 is false
Note:
and a > 0
b

x
c a 68
Determining the Sample Size for a Hypothesis Test
About a Population Mean

( z + zb ) 2 s 2
n=
( 0 −  a )2
where
z = z value providing an area of  in the tail
zb = z value providing an area of b in the tail
s = population standard deviation
0 = value of the population mean in H0
a = value of the population mean used for the
Type II error
Note: In a two-tailed hypothesis test, use z /2 not z

69
Determining the Sample Size for a Hypothesis Test
About a Population Mean
Let’s assume that the director of medical services makes the following statements about the
allowable probabilities for the Type I and Type II errors:
If the mean response time is  = 12 minutes, I am willing to risk an  = .05 probability of rejecting
H0.
If the mean response time is 0.75 minutes over the specification ( = 12.75), I am willing to risk a b
= .10 probability of not rejecting H0.

 = .05, b = .10
z = 1.645, zb = 1.28
0 = 12, a = 12.75
s = 3.2
( z + zb )2s 2(1.645 + 1.28)2 (3.2)2
n= = = 155.75  156
( 0 − a ) 2
(12 − 12.75) 2

70
Relationship Among , b, and n

Once two of the three values are known, the other can be computed.
For a given level of significance , increasing the sample size n will reduce b.
For a given sample size n, decreasing  will increase b, whereas increasing  will decrease b.

71
Thank You !!!

You might also like