+ All Categories
Home > Documents > STATISTICAL INFERENCE PART V

STATISTICAL INFERENCE PART V

Date post: 02-Jan-2016
Category:
Upload: fletcher-oneill
View: 23 times
Download: 2 times
Share this document with a friend
Description:
STATISTICAL INFERENCE PART V. HYPOTHESIS TESTING. H 0 is True. H 0 is False. Type I error P (Type I error) = . Reject H 0. Correct Decision. Type II error P (Type II error) = . Do not reject H 0. Correct Decision. TESTS OF HYPOTHESIS. 1- . 1- . - PowerPoint PPT Presentation
36
STATISTICAL INFERENCE PART V HYPOTHESIS TESTING 1
Transcript

STATISTICAL INFERENCEPART V

HYPOTHESIS TESTING

1

TESTS OF HYPOTHESIS

2

H0 is FalseH0 is True

Reject H0

Do not reject H0

Type I errorP(Type I error) =

Correct Decision

Correct Decision

Type II errorP(Type II error) = 1-

1-

()=Power function of the test for all . = P(Reject H0)=P((x1,x2,…,xn)C)

Tests are based on the following principle: Fix , minimize .

POWER OF THE TEST AND P-VALUE

• 1- = Power of the test = P(Reject H0|H0 is not true)

• p-value = Observed significance level = Probability of obtaining a test statistics at least as extreme as the one that you observed by chance, OR, the smallest level of significance at which the null hypothesis can be rejected OR the maximum value of that you are willing to tolerate.

3

CALCULATION OF P-VALUE

• Determine the value of the test statistics,• For One-Tailed Test:p-value= P(z > z0) if HA: >0

p-value= P(z < z0) if HA: <0

• For Two-Tailed Testp=p-value = 2.P(z>z0)p=p-value = 2.P(z<-z0)

z0

p-value

z0

p-value

-z0 z0

p/2p/2

00

xz

/ n

4

DECISION RULE BY USING P-VALUES

• REJECT H0 IF p-value <

• DO NOT REJECT H0 IF p-value

p-value

5

Example

• Do the contents of bottles of catsup have a net weight below an advertised threshold of 16 ounces?

• To test this 25 bottles of catsup were selected. They gave a net sample mean weight of . It is known that the standard deviation is . We want to test this at significance levels 1% and 5%.

X 15.9.4

6

CALCULATIONS

The z-score is:

The p-value is the probability of getting a score worse than this (relative to the alternative hypothesis) i.e.,

Compare the p-value to the significance level. Since

it is bigger than both 1% and 5%, we do not reject the null hypothesis.

15.9 16

Z 1.25.4

25

P(Z 1.25) .1056

7

P-value for this one-tailed Test

• The p-value for this test is 0.1056

• Thus, do not reject H0 at 1% and 5% significance level. We do not have enough evidence to say that the contents of bottles of catsup have a net weight of less than 16 ounces.

-1.25

0.1056

0.10

0.05

8

Test of Hypothesis for the Population Mean ( unknown)

• For samples of size n drawn from a Normal Population, the test statistic:

has a Student t-distribution with n1 degrees

of freedom

x-t

s/ n

9

EXAMPLE

• 5 measurements of the tar content of a certain kind of cigarette yielded 14.5, 14.2, 14.4, 14.3 and 14.6 mg per cigarette. Show the difference between the mean of this sample and the average tar content claimed by the manufacturer, =14.0, is significant at =0.05.

x 14.4

52

2 2i2 i 1

( x x ) (14.5 14.4 ) ... ( 14.6 14.4 )s 0.025

n 1 5 1s 0.158

10

SOLUTION

• H0: = 14.0

HA: 14.0

Decision Rule: Reject Ho if t<-t/2 or t> t/2.

0

/ 2 ,n 1 0.025 ,4

x 14.4 14.0t 5.66

s / n 0.158 / 5t t 2.766

11

CONCLUSION

• Reject H0 at = 0.05. Difference is significant.

0.0250.0250.95

-2.766 2.766 5.66

Reject H0Reject H0

12

P-value of This Test

• p-value = 2.P(t > 5.66) = 2(0.0024)=0.0048Since p-value = 0.0048 < = 0.05, reject H0.Minitab OutputT-Test of the MeanTest of mu = 14.0000 vs mu not = 14.0000

Variable N Mean StDev SE Mean T P-Value C1 5 14.4000 0.1581 0.0707 5.66 0.0048

13

CONCLUSION USING THE CONFIDENCE INTERVALS

MINITAB OUTPUT:

Confidence Intervals

Variable N Mean StDev SE Mean 95.0 % C.I. C1 5 14.4000 0.1581 0.0707 ( 14.2036, 14.5964)

• Since 14 is not in the interval, reject H0.

14

EXAMPLE

Problem: At a certain production facility that assembles computer keyboards, the assembly time is known (from experience) to follow a normal distribution with mean of 130 seconds and standard deviation of 15 seconds. The production supervisor suspects that the average time to assemble the keyboards does not quite follow the specified value. To examine this problem, he measures the times for 100 assemblies and found that the sample mean assembly time ( ) is 126.8 seconds. Can the supervisor conclude at the 5% level of significance that the mean assembly time of 130 seconds is incorrect?

x

15

• We want to prove that the time required to do the assembly is different from what experience dictates:

• The sample mean is• The standard deviation is • The standardized test statistic value is:

AH : 130

X 126.8

15

126.8 130

Z 2.1315

100

16

Two-Tail Hypothesis:

H0:

HA:

1-z0

Do not Reject H0

z=test statistic values

(-zz<z

Reject H0

(z<-z

Type I ErrorProbability

-z

Reject H0

(z>z

17

Test Statistic: -2.13=

10015

130-126.8=

n

-X=z

.9

z

-z

0 Z

.90

Rejection Region

18

CONCLUSION

• Since –2.13<-1.96, it falls in the rejection region.

• Hence, we reject the null hypothesis that the time required to do the assembly is 130 seconds. The evidence suggests that the task now takes either more or less than 130 seconds.

19

DECISION RULE

• Reject Ho if z < -1.96 or z > 1.96.

In terms of , reject H0 if X

15X 130 1.96 = 127.6

10015

or X 130 1.96 =132.94100

20

06

P-VALUE

• In our example, the p-value is

So, since 0.0332 < 0.05, we reject the null.p value 2.P(Z 2.13) 2(0.0166) 0.0332

21

Calculating the Probability of Type II ErrorHo: = 130

HA: 130

• Suppose we would like to compute the probability of not rejecting H0 given that the null hypothesis is false (for instance =135 instead of 130), i.e.

=P(not rejecting Ho|Ho is false).

Assuming =135 this statement becomes:P(127.06 x 132.94| 135)

127.06-135 132.94-135P( Z )

15/ 100 15/ 100P(-5.29 Z -1.37) .0853

22

TESTING HYPOTHESIS ABOUT POPULATION PROPORTION, p

• ASSUMPTIONS:1. The experiment is binomial.2. The sample size is large enough.

x: The number of successThe sample proportion is

approximately for large n (np 5 and nq 5 ).

x pqp̂ ~ N(p, )

n n

23

HYPOTHESIS TEST FOR pTwo-sided Test Test Statistic Rejecting Area

H0: p = p0

HA: p p0

• Reject Ho if z < -z/2 or z > z/2.

p̂ pz

pq / n

Reject H0

/2/2

z/2- z/2

Do not reject H0Reject H0

1-

24

HYPOTHESIS TEST FOR p

One-sided Tests Test Statistic Rejecting Area1. H0: p= p0

HA: p > p0

• Reject Ho if z > z.

2. H0: p = p0

HA: p < p0

• Reject Ho if z < - z.

p̂ pz

pq / n

p̂ pz

pq / n

z

-z

Do not reject H0Reject H0

Reject H0 Do not reject H0

1-

1-

25

EXAMPLE

• Mom’s Home Cokin’ claims that 70% of the customers are able to dine for less than $5. Mom wishes to test this claim at the 92% level of confidence. A random sample of 110 patrons revealed that 66 paid less than $5 for lunch.

Ho: p = 0.70HA: p 0.70

26

ANSWER

• x = 66, n = 110 and p = 0.70

• = 0.08, z/2 = z0.04 = 1.75

• Test Statistic:

x 66p̂ 0.6

n 110

0.6 0.7z 2.289

(0.7)(0.3) /110

27

CONCLUSION

• DECISION RULE:Reject H0 if z < -1.75 or z > 1.75.

• CONCLUSION: Reject H0 at = 0.08. Mom’s claim is not true.

-1.75 1.75-2.289

/2/2

28

P-VALUE

• p-value = 2. P(z < -2.289) =2(0.011) = 0.022

The smallest value of to reject H0 is 0.022.

Since p-value = 0.022 < = 0.08, reject H0.

0.011

-2.289

29

CONFIDENCE INTERVAL APPROACH

• Find the 92% CI for p.

92% CI for p: 0.52 p 0.68• Since is not in the above interval, reject

H0. Mom has overestimated the percentage of customers that pay less than 5$ for a meal.

30

110

)4.0)(6.0(75.16.0

n

q̂p̂zp̂ 2/

7.0p

What happens with wider confidence intervals? Exercise: Calculate the 95% and 99% CIs for p.

SAMPLING DISTRIBUTION OF s2

• The statistic

is chi-squared distributed with n-1 d.f. when the population random variable is normally distributed with variance 2.

22

2

(n 1)s

31

CHI-SQUARE DISTRIBUTION

AA

1 - A

2A

2

02

f(2)

32

Inference about the Population Variance (2)

• Test statistic2

22

(n 1)s

which is chi-squared distributed with n - 1 degrees of freedom

Confidence interval estimator:

LCL = (n - 1) s2

21 - /2

2

/2

UCL = (n - 1) s2

33

Testing the Population Variance (2)EXAMPLE

• Proctor and Gamble told its customers that the variance in the weights of its bottles of Pepto-Bismol is less than 1.2 ounces squared. As a marketing representative for P&G, you select 25 bottles and find a variance of 1.7. At the 10% level of significance, is P&G maintaining its pledge of product consistency?

H0: 2 = 1.2

HA: 2 < 1.2

34

ANSWER

• n=25, s2=1.7, =0.10,• Test Statistics:

• Decision Rule: Reject H0 if • Conclusion: Because 2=34 > 15.6587, do not reject

H0.• We don’t have enough evidence that suggests the

variability in product weights less than 1.2 ounces squared.

22

2

(n 1)s (24)1.734

1.2

20.90,24 15.659

2 2,n 1 15.6587

35

EXAMPLE

• A random sample of 22 observations from a normal population possessed a variance equal to 37.3. Find 90% CI for 2.

90% CI for 2:

2 22

2 20.05,21 0.95,21

2

2

(n 1)s (n 1)s

(21)37.3 (21)37.3

32.6705 11.5913

23.9757 67.5765

36


Recommended