25
IEEM 320 1 One and Two-Sample Tests of Hypotheses

IEEM 3201 One and Two-Sample Tests of Hypotheses

  • View
    225

  • Download
    1

Embed Size (px)

Citation preview

Page 1: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320 1

One and Two-Sample Tests of

Hypotheses

Page 2: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 2

Statistical Hypotheses

Statistical Hypothesis: an assertion or conjecture concerning (parameters of) one or more populations

? e.g., the population mean is equal to a particular value: = 0

? Hypothesis testing: accept or reject a hypothesis based on the sample information

Page 3: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 3

Null and Alternative Hypotheses

H0, null hypothesis: the hypothesis subject to testing

? H1, alternative hypothesis: H1 is rejected if H0 is accepted, and vice versa

? condition to reject H0: if H0 is true, it is highly unlikely to get the given set of sample values ? the rejection provides a firmer, clearer assertion

? tend to set the desirable conclusion as H1

Page 4: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 4

Null and Alternative Hypotheses

? the form of H1 affects the procedure of the test

? two-tailed test: H0: = 0 vs. H1: 0

? one-tailed test: H0: = 0 vs. H1: > 0

? one-tailed test: H0: = 0 vs. H1: < 0

Page 5: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 5

Null and Alternative Hypotheses

Null Hypothesis: the hypothesis we wish to test and is denoted by H0 .

? Alternative Hypothesis: the rejection of the null hypothesis implies the acceptance of an Alternative hypothesis denoted by H1 .

/ 2zn

1– /2/2

(1-)100% confidence interval

Critical values

Critical regions(reject H0 if here)

Acceptance region(accept H0 if here)

0

/ 2zn

x xx

? e.g.,

H0 : =0

H1 : ≠0

Page 6: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 6

Type I and Type II Error

Rejection of the null hypothesis when it is true is called a type I error.

? Acceptance of the null hypothesis when it is false is called a type II error.

Correct decisionType I errorReject H0

Type II errorCorrect decisionAccept H0

H0 is falseH0 is true

1– /2/2

1

Probability of committing a type I error.

Probability of committing a type II error if =1

0

x

Page 7: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 7

Important Properties

Relationships among , and sample size

? type I error type II error; type I error type II error

? type I error changes with the critical value(s)

? n and ? if the difference between the true value and the

hypothesized value increases

Page 8: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 8

The Power of A Test

The power of a test is the probability of rejecting H0 given that a specific alternative is true.

? The power of a test = 1 – .

Page 9: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 9

One- and two-Tailed Tests

? One-tailed test:

H0: =0 H0: =0

H1: >0 or H1: <0

? Two-tailed test: H0: =0

H1: 0

? e.g., a one-tailed test:

H0: =68

H1: >68

Page 10: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 10

One- and two-Tailed Tests

? One-tailed test:

H0: =0 H0: =0

H1: >0 or H1: <0

? Two-tailed test: H0: =0

H1: 0

? e.g., a one-tailed test:

H0: =68

H1: >68

Page 11: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 11

Two-Tailed Test on Mean

H0: = 0, H1: 0

X1, …, Xn ~ i.i.d. normal with variance 2

)1 ,0(normal~/

0

n

X

)or ( 2//2//00 zzPn

X

n

X

if the true mean is 0,

;2//0

zn

Xit is unlikely for it is unlikely for

nzX 2/0

Xzn

2/0or

Page 12: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 12

Two-Tailed Test on Mean

/2zn

1–

/2/2

0

/2zn

x

Critical regions(reject H0 if here)x

Acceptance region(accept H0 if here)x

(1-)100% confidence interval

Critical values

Page 13: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 13

One-Tailed Test on Mean

H0: = 0, H1: > 0

X1, …, Xn ~ i.i.d. normal with variance 2

)1 ,0(normal~/

0

n

X

)(/

0 zPn

X

if the true mean is 0,

;/

0

zn

Xit is unlikely for it is unlikely for

nzX 0

Page 14: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 14

One-Tailed Test on Mean

1–

0 x

nz

Critical regions(reject H0 if here)x

Acceptance region(accept H0 if here)x

Critical values

Page 15: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 15

One-Tailed Test on Mean

H0: = 0, H1: < 0

X1, …, Xn ~ i.i.d. normal with variance 2

)1 ,0(normal~/

0

n

X

)(

/0 zPn

X

if the true mean is 0,

;/

0

zn

Xit is unlikely for it is unlikely for

nzX 0

Page 16: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 16

One-Tailed Test on Mean

1–

0 xn

z

Critical regions(reject H0 if here)xAcceptance region

(accept H0 if here)x

Critical values

Page 17: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 17

Type I and Type II Error

type I error: Rejecting H0 when it is true

? type II error: Accepting H0 when it is false

Correct decisionType I errorReject H0

Type II errorCorrect decisionAccept H0

H0 is falseH0 is true

1

x

1– /2/2

0

x

Probability of committing a type I error.

Probability of committing a type II error if =1

Type II error: change with

a given 1

Page 18: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 18

Effect of Sample Size on Type I Error

Solution:

follows a normal distribution with = 68 and =3.6/6 = 0.6

x 0/ 2 / 2( ) 1

/

XP z z

n

Example: Find the type 1 error. H0: = 68, H1: 68.

given = 3.6, n = 36; critical regions: 69or 67 xx

67.1 and 67.1 6.06869

26.06867

1 zz

Hence 095.0)67.1()67.1( zPzP

Page 19: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 19

Effect of Sample Size on Type I

Solution:

follows a normal distribution with = 68 and =3.6/8 = 0.45

x 0/ 2 / 2( ) 1

/

XP z z

n

1 2

67 68 69 682.22 and 2.22

0.45 0.45z z

Hence ( 2.22) ( 2.22) 0.0264P z P z

Example: Find the type 1 error. H0: = 68, H1: 68.

given = 3.6, n = 64; critical regions: 69or 67 xx

Page 20: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 20

p-Value

A p-value is the lowest level (of significance) at which the observed value of the test statistic is significant.

Calculate the p-value and compare it with a preset significance level . If the p-value is smaller than , we reject the null hypothesis.

Page 21: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 21

Type II Error

accepting when H0 is false

type II error: a function of the true value of parameter

Find type II error. H0: = 68, H1: 68.

= 3.6; n = 64, critical regions:

the true = 70

69or 67 xx

Example on page 292

Page 22: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 22

Important Properties

Relationships among , and sample size

? type I error type II error; type I error type II error

? type I error changes with the critical value(s)

? n and ? if the difference between the true value and the

hypothesized value increases

Page 23: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 23

Examples

? A random sample of 100 recorded deaths in U.S> during the past year showed an average life span of 71.8 years. Assuming a population standard deviation of 8.9 years, does this seem to indicate that the mean life span today is greater than 70 years? Use a 0.05 level of significance.

Page 24: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 24

Examples

? A manufacturer of sports equipment has developed a new fishing line that claims has a mean breaking strength of 8 kilograms with s standard deviation of 0.5 kilogram. Test the hypothesis that u=8 kilograms again H1 that u is not equal to 8 if a random of sample of 50 lines is tested and found to have a mean breaking strength of 7.8 kilograms. Use a 0.01 level significance.

Page 25: IEEM 3201 One and Two-Sample Tests of Hypotheses

IEEM 320IEEM151

Notes 20, Page 25

Examples

? Some company has published figures on the annual number of kilowatt-hours expended by various home appliances. It is claimed that a vacuum cleaner expends an average of 46 kilowatt-hours per hour. If a random sample of 12 homes included in a planned study indicates that vacuum cleaners expended an average of 42 kilowatt-hours per year with a standard deviation of 11.9 kilowatt-hours, does this suggest at the 0.05 level of significance that vacuum cleaners expend, on average, less than 46 kilowatt-hours annually? Assume the population of kilowatt-hours to be normal.