A Two - Tail Test

Download Report

Transcript A Two - Tail Test

Ch 11

實習

(2)

A Two - Tail Test

2  Example 11.2

 AT&T has been challenged by competitors who argued that their rates resulted in lower bills.

 A statistics practitioner determines that the mean and standard deviation of monthly long distance bills for all AT&T residential customers are $17.09 and $3.87 respectively.

Jia-Ying Chen

A Two - Tail Test

3  Example 11.2 - continued   A random sample of 100 customers is selected and customers ’ bills recalculated using a leading competitor ’ s rates (see Xm11-02 ).

Assuming the standard deviation is the same (3.87), can we infer that there is a difference between AT&T ’ s bills and the competitor ’ s bills (on the average)? Jia-Ying Chen

4

A Two - Tail Test

 Solution  Is the mean different from 17.09?

H 0 : m = 17.09

H 1 : m  17 .

09 – Define the rejection region

z

 

z

 / 2

or z

z

 / 2 Jia-Ying Chen

A Two

Tail Test

Solution - continued 5 / 2 = 0.025

/ 2 = 0.025

x

17.09

x ( If H above or far below 17.09, in which case we erroneously reject H m 0  is true ( 17 .

09 ) m 0 x in favor of H 1 We want this erroneous rejection of H chance.

0 to be a rare event, say 5% Jia-Ying Chen

A Two

Tail Test

6 Solution - continued / 2 = 0.025

z

= 

x

 m

n

= 17 .

55  17 .

09 3 .

87 100 = 1 .

19 x

17.09

17.55

x From the sample we have: x = 17 .

55 / 2 = 0.025

/ 2 = 0.025

/ 2 = 0.025

-z /2 = -1.96

0

z /2 = 1.96

Rejection region Jia-Ying Chen

A Two

Tail Test

There is insufficient evidence to infer that there is a difference between the bills of AT&T and the competitor.

Also, by the p value approach: The p-value = P(Z< -1.19)+P(Z >1.19) = 2(.1173) = .2346 > .05

/ 2 = 0.025

/ 2 = 0.025

7

z

= 

x

 m

n

= 17 .

55  17 .

09 3 .

87 100 = 1 .

19 -z /2 = -1.96

-1.19

0 1.19

z /2 = 1.96

Jia-Ying Chen

8

Example 1

 A machine that produces ball bearings is set so that the average diameter is 0.5 inch. A sample of 10 ball bearings was measured with the results shown here. Assuming that the standard deviation is 0.05 inch, can we conclude that at the 5% significance level that the mean diameter is not 0.5 inch?

 0.48 0.50 0.49 0.52 0.53 0.48 0.49 0.47 0.46 0.51

Jia-Ying Chen

Solution

9 Jia-Ying Chen

10

Calculation of the Probability of a Type II Error

   To calculate Type II error we need to …  express the rejection region directly, in terms of the parameter hypothesized (not standardized).

 specify the alternative value under H 1 .

型二誤差的定義是, H 1 正確卻無法拒絕 H 0 在什麼規則下你無法拒絕 H 0  單尾  雙尾  Let us revisit Example 11.1

Jia-Ying Chen

11 

Calculation of the Probability of a Type II Error

Let us revisit Example 11.1

x

Express the rejection region directly, not in standardized terms  175.34

 = .05.

 Let the alternative value be m than just m >170)

H 0 :

m

= 170 H 1 :

m

= 180

= 180 (rather Do not reject H 0 m = 170  =.05

x L = 175 .

34 m= 180 Specify the alternative value under H 1 .

Jia-Ying Chen

12

Calculation of the Probability of a Type II Error

 A Type II error occurs when a false H 0 not rejected.

is A false H 0 … …is not rejected

H 0 :

m

H 1 :

m

= 170 = 180

m = 170 x  175 .

x L 34 = 175 .

34  =.05

m= 180 Jia-Ying Chen

13

Calculation of the Probability of a Type II Error

 = P ( x  175 .

34 given = P ( x  175 .

34 given that that H 0 m is false = 180 ) ) = P ( z  175 .

34 65  180 ) 400 = .

0764

H 0 :

m

H 1 :

m

= 170 = 180

m = 170 x L = 175 .

34 m= 180 Jia-Ying Chen

14

Example 2

    A statistics practitioner wants to test the following hypotheses with σ=20 and n=100: H 0 : μ=100 H 1 : μ>100 Using α=0.1 find the probability of a Type II error when μ=102 Jia-Ying Chen

15

Solution

 Rejection region: z>z α Jia-Ying Chen

16

Example 3

    Calculate the probability of a Type II error for the following test of hypothesis, given that μ=203.

H 0 : μ=200 H 1 : μ≠200 α=0.05, σ=10, n=100 Jia-Ying Chen

Solution

17 Jia-Ying Chen

18

Effects on

of changing

  Decreasing the significance level , increases the value of , and vice versa .

2 <

 1 

2 >

 1 m = 170 m= 180 Jia-Ying Chen

Judging the Test

19  A hypothesis test is effectively defined by the significance level  and by the sample size n.

 If the probability of a Type II error  is judged to be too large, we can reduce it by  increasing  , and/or  increasing the sample size.

Jia-Ying Chen

20

Judging the Test

 Increasing the sample size reduces  Re call : z  = x L   m , n thus x L = m  z   n By increasing the sample size the standard deviation of the sampling distribution of the mean decreases. x Jia-Ying Chen

21

Judging the Test

 Increasing the sample size reduces  Re call : z  = x  L  m n , thus x L = m  Note what happens when n increases: z   n  does not change, but  becomes smaller m = 170 x x x L L x L x L x L L m= 180 Jia-Ying Chen

22

Judging the Test

 Power of a test  The power of a test is defined as 1 .

 It represents the probability of rejecting the null hypothesis when it is false.

Jia-Ying Chen

23

Example 4

 For a given sample size

n

, if the level of significance α is decreased, the power of the test will:  a.increase.

 b.decrease.

 c.remain the same.

 d.Not enough information to tell.

Jia-Ying Chen

Example 5

24  During the last energy crisis, a government official claimed that the average car owner refills the tank when there is more than 3 gallons left. To check the claim, 10 cars were surveyed as they entered a gas station. The amount of gas remaining before refill was measured and recorded as follows (in gallons): 3, 5, 3, 2, 3, 3, 2, 6, 4, and 1. Assume that the amount of gas remaining in tanks is normally distributed with a standard deviation of 1 gallon. Compute the probability of a Type II error and the power of the test if the true average amount of gas remaining in tanks is 3.5 gallons. (α=0.05) Jia-Ying Chen

25

Solution

 Rejection region:z>z α

x

 3  1

z

0.05

= 1.645

3.52

10  

β

=

P x μ

0.5239

= 3.5) =

P

(

z

< 0.06) = Power = 1 -

β

= 0.4761

Jia-Ying Chen