hypothesis and test procedures a statistical test of hypothesis consist of : 1. the null hypothesis,...

38
Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic and its p-value 4. The rejection region 5. The conclusion 1 Chapter 9 - Hypothesis Tests 0 H 1 H

Upload: cori-dawson

Post on 13-Jan-2016

267 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Hypothesis and Test Procedures  A statistical test of hypothesis consist of :1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic and its p-value4. The rejection region5. The conclusion

1

Chapter 9 - Hypothesis Tests

0H

1H

Page 2: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Definition 9.1:Hypothesis testing can be used to determine whether a statement about the value of a population parameter should or should not be rejected.Null hypothesis, H0 : A null hypothesis is a claim (or statement)

about a population parameter that is assumed to be true. (the null hypothesis is either rejected or fails to be rejected.)Alternative hypothesis, H1 : An alternative hypothesis is a claim

about a population parameter that will be true if the null hypothesis is false.Test Statistic is a function of the sample data on which the decision is to be based.p-value is the probability calculated using the test statistic. The smaller the p-value, the more contradictory is the data to .

2

0H

Page 3: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

It is not always obvious how the null and alternative hypothesis should be formulated.

When formulating the null and alternative hypothesis, the nature or purpose of the test must also be taken into account. We will examine:

1) The claim or assertion leading to the test.2) The null hypothesis to be evaluated.3) The alternative hypothesis.4) Whether the test will be two-tail or one-tail.5) A visual representation of the test itself.

In some cases it is easier to identify the alternative hypothesis first. In other cases the null is easier.

9.1 Developing Null and Alternative Hypothesis

Page 4: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

9.1.1 Alternative Hypothesis as a Research Hypothesis

• Many applications of hypothesis testing involve an attempt to gather evidence in support of a research hypothesis.

• In such cases, it is often best to begin with the alternative hypothesis and make it the conclusion that the researcher hopes to support.

• The conclusion that the research hypothesis is true is made if the sample data provide sufficient evidence to show that the null hypothesis can be rejected.

Page 5: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Example 9.1: A new drug is developed with the goalof lowering blood pressure more than the existing drug.

• Alternative Hypothesis: The new drug lowers blood pressure more than the existing drug. • Null Hypothesis: The new drug does not lower blood pressure more than the existing drug.

Page 6: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

9.1.2 Null Hypothesis as an Assumption to be Challenged

• We might begin with a belief or assumption that a statement about the value of a population parameter is true.

• We then using a hypothesis test to challenge the assumption and determine if there is statistical evidence to conclude that the assumption is incorrect.

• In these situations, it is helpful to develop the null hypothesis first.

Page 7: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Example 9.2 : The label on a soft drink bottle states that it contains at least 67.6 fluid ounces.

• Null Hypothesis: The label is correct. µ > 67.6 ounces.• Alternative Hypothesis: The label is incorrect. µ < 67.6 ounces.

Page 8: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Example 9.3: Average tire life is 35000 miles.

• Null Hypothesis: µ = 35000 miles

• Alternative Hypothesis: µ 35000 miles

Page 9: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

9.1.3 How to decide whether to reject or accept ?The entire set of values that the test statistic may assume is

divided into two regions. One set, consisting of values that

support the and lead to reject , is called the rejection

region. The other, consisting of values that support the is

called the acceptance region. H0 always gets “=“.

Tails of a Test

9

0H

1H 0H

0H

Two-Tailed Test

Left-Tailed Test

Right-Tailed Test

Sign in = = or = or

Sign in < >

Rejection Region In both tail In the left tail In the right tail

0H

1H

Page 10: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

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

9.2 Type I & Type II Error

Page 11: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

9.2.2 Type II Error

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

It is difficult to control for the probability of making

a Type II error, . Statisticians avoid the risk of making a Type II

error by using “do not reject H0” and not “accept H0”.

Page 12: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Type I and Type II Errors

CorrectDecision

Type II Error

CorrectDecisionType I ErrorReject H0

Do not reject H0

H0 True H0 FalseConclusion

Population Condition

Page 13: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

9.3 Population Mean, , ( known and unknown )

Null Hypothesis :

Test Statistic :

13

0 0 :H

• any population, is known and n is largeor• normal population, is known and n is small

• any population, is unknown and n is large

• normal population, is unknown and n is small

xZ

n

xZ s

n

1

xt sn

v n

Page 14: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Alternative hypothesis Rejection Region

14

1 0:H

1 0:H

1 0:H

2 2 or  ZZ z z

Z z

Z< z

Page 15: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Definition 9.2: p-value The p-value is the smallest significance level at which the null hypothesis is rejected.

15

0

0

Using the value approach, we reject the null hypothesis,  if

value for one tailed test

value for two tailed test2

and we do not reject the null hypothesis,  if

value    for one tailed

p H

p

p

H

p

test

value    for two tailed test2

p

Page 16: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Example 9.4

16

The average monthly earnings for women in managerial and

professional positions is 2400. Do men in the same positions

have average monthly earnings that are higher than those for women ?

A random sampl

RM

e of 40 men in managerial and professional

positions showed 3600 and 400. Test the appropriate

hypothesis using  0.01

n

x RM s RM

Page 17: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Solution

17

0

1

0.01

1.The hypothesis to be tested are,

:  2400

: 2400

2.We use normal distribution 30

3. Rejection Region : Z ; 2.33

 4. Test Statistic     

H

H

n

z z z

0

3600 2400 18.97

400

40

Since 18.97 2.33, falls in the rejection region, we reject 

and conclude that average monthly earnings for men in managerial

and professional positions are significant

xZ

s

n

H

ly higher than those for women.

Page 18: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

18

9.4 Population Proportion, p

0 0

0

0 0

Null Hypothesis : :

ˆTest Statistic     :          

H p p

p pZ

p q

n

Alternative hypothesis Rejection Region

1 0:H p p

1 0:H p p

1 0:H p p

2 2 or  ZZ z z

Z z

Z< z

Page 19: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Example 9.5

When working properly, a machine that is used to make chips for calculators

does not produce more than 4% defective chips. Whenever the machine

produces more than 4% defective chips it needs an adjustment. To check if

the machine is working properly, the quality control department at the

company often takes sample of chips and inspects them to determine if the

chips are good or defective. One such random sample of 200 chips taken

recently from the production line contained 14 defective chips. Test at the 5%

significance level whether or not the machine needs an adjustment.

19

Page 20: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Solution

20

0

1

0

0 0

0.05

The hypothesis to be tested are ,

:    0.04

: 0.04

Test statistic is

ˆ 0.07 0.042.17

0.04(0.96)200

Rejection Region : Z     ; 1.65

Since 2.17 1.

H p

H p

p pZ

p q

n

z z z

065, falls in the rejection region, we can reject  

and conclude that the machine needs an adjustment.

H

Page 21: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

2 21 2

1 2 1 22

1 2

2 21 2

1 2 1 22

1 2

1 2

2 21 2

1 2 12

1 2

(i) if ( , ) is known and normally

distributed population

(ii) if  ( , ) is unknown, large

30, 30

or ,

x x zn n

s sx x z n

n n

n n

s sx x z x

n n

2 2

1 22

21 2

s sx z

n n

21

9.5 Inferences About the Difference Between Two Population Means

9.5.1 Interval Estimation of 1 2

Page 22: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

2 21 2

1 2 , 2 1 21 2

1 2

22 21 2

1 222 2

1 2

1 1 2 2

(iii) if  ( , ) is unknown, normally distributed

population and small sample size   30, 30  

with 1 1

1 1

v

s sx x t

n n

n n

s sn n

vs s

n n n n

2

22

Page 23: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

1 2 1 2

1 2

1 22

for (ii) and (iii) cases, if ( , ) is unknown but we assume = ,

the pooled estimator is used to estimate , then the formula is given as follows:

for large sample size   30, 30 ,

pS

n n

x x z

1 2

1 2

1 2

1 2 2, 21 2

2 21 1 2 2

1 2

1 1

for small sample size   30, 30

1 1

1 1with

2

p

n n p

p

Sn n

n n

x x t Sn n

n s n sS

n n

Page 24: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Example 9.6 :

The scientist wondered whether there was a difference in the average daily

intakes of dairy products between men and women. He took a sample of n =50

adult women and recorded their daily intakes of dairy products in grams per day.

He did the same for adult men. A summary of his sample results is listed below.

Construct a 95% confidence interval for the difference in the average daily intakes

of daily products for men and women. Can you conclude that there is a difference

in the average daily intakes of daily products for men and women?

24

Men Women

Sample size 50 50

Sample mean 780 grams per day 762 grams per day

Sample standard deviation

35 30

Page 25: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Solution

25

2 22 21 2

1 2

1 22

Hence, 95% CI   :

35 30780 762 1.96

50 50

18 12.78

[6.78,30.78]

Thus, we should be willin

s sx x z

n n

1 2

g to conclude that there is a difference in the

average daily intakes of daily products for men and women as

0 there is no difference between two population means

is not one of the possible value

1 2s for ( ).

Page 26: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Test statistics:

26

9.5.2 Hypothesis Test For the Difference between Two Populations Means, 1 2

0 1 2Null Hypothesis :         : 0H

1 2

For two large and independent samples

and and   are known.

1 2 1 2

2 21 2

1 2

x xZ

n n

1 2

1 2

For two large and independent samples

and and   are unknown.

(Assume )

1 2 1 2

2 21 2

1 2

x xZ

s sn n

1 2 1 2

1 2

2 21 1 2 2

1 2

1 1

1 1with

2

p

p

x xZ

Sn n

n s n sS

n n

1 2

1 2

For two large and independent samples

and and   are unknown.

(Assume )

Page 27: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

27

• For two small and independent samples taken from two normally distributed populations.

1 2 1 2

2 21 2

1 2

22 21 2

1 22 22 2

1 2

1 1 2 2

1 11 1

x xt

s sn n

s sn n

vs s

n n n n

1 2 1 2

1 2

1 2

1 1

2

p

x xt

Sn n

v n n

1 2

1 2

For two small and independent samples

and and   are unknown.

(Assume )

Page 28: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Alternative hypothesis Rejection Region

28

1 1 2: 0H

1 1 2: 0H

1 1 2: 0H

2 2 or  ZZ z z

Z z

Z< z

Page 29: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Example 9.7

29

A university conducted an investigation to determine whether

car ownership affects academic achievement was based on two

random samples of 100 male students, each drawn from the

student body. The grad 1

1

2 221 2

2

e point average for the 100 non

owners of cars had an average and variance equal to 2.70

and 0.36 as opposed to 2.54 and 0.40 for the

100 car owners. Do the data present sufficient

n

x

s x s

n

evidence to

indicate a difference in the mean achievements between car owners

and non owners of cars? Test using 0.05

Page 30: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Solution

30

0 1 2

1 1 2

1 2 1 2

2 21 2

1 2

The hypothesis to be tested are ,

: 0

: 0

Therefore, test statistic is

2.70 2.54 1.84

0.36 0.40

100 100

H

H

x xZ Z

s s

n n

Page 31: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

z=-1.96 z=+1.96

Do NotReject H 0

00 Reject HReject H

2 2 0.05 2 0.025Rejection Region : Z or  Z   ; 1.96z z z z

0Since 1.84 does not exceed 1.96 and not less than 1.96, we fail to reject 

and that is, there is not sufficient evidence to declare that there is a difference

in the average academic achievement for

H

the two groups.

Page 32: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

1 1 2 21 2

21 2

ˆ ˆ ˆ ˆ1 1ˆ ˆ

p p p pp p z

n n

32

9.6 Inferences About the Difference Between Two Population Proportion,

9.6.1 Interval Estimation of

1 2p p

1 2p p

Page 33: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Example 9.8:A researcher wanted to estimate the difference between the percentages of users of two toothpastes who will never switch to another toothpaste. In a sample of 500 users of Toothpaste A taken by this researcher, 100 said that the will never switch to another toothpaste. In another sample of 400 users of Toothpaste B taken by the same researcher, 68 said that they will never switch to another toothpaste. Construct a 97% confidence interval for the difference between the proportions of all users of the two toothpastes who will never switch.

33

Page 34: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Solutions

Toothpaste A : n1 = 500 and x1 = 100

Toothpaste B : n2 = 400 and x2 = 68

The sample proportions are calculated;

Thus, with 97% confidence we can state that the difference between the two

population proportions is between -0.026 and 0.086.

34

1 2

1 1 2 21 2

1 22

100 68ˆ ˆ0.20; 0.17

500 400

A 97% confidence interval ;

ˆ ˆ ˆ ˆ(1 ) (1 )ˆ ˆ

0.20(0.80) 0.17(0.83)0.20 0.17 2.17

500 400

0.03 0.05628

[ 0.026,0.086]

p p

p p p pp p Z

n n

Page 35: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

35

9.6.2 Hypothesis Test For the Difference between Two Population Proportion, 1 2p p

0 1 2

1 2 1 2 1 2

1 2

1 2

1 2 1 2

1 2

Null Hypothesis : : 0

Test Statistics     : 

ˆ ˆˆ where

ˆ ˆ ˆ ˆ(1 ) (1 )

ˆ ˆ

1 1ˆ ˆ

H p p

p p p p x xZ p

n np p p pn n

p p p pZ

pqn n

Page 36: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

36

Alternative hypothesis Rejection Region

1 1 2: 0H p p

1 1 2: 0H p p

1 1 2: 0H p p

2 2 or  ZZ z z

Z z

Z< z

Page 37: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Example 9.9:Reconsider Example 9.8, At the significance level 1%, can we conclude that the proportion of users of Toothpaste A who will never switch to another toothpaste is higher than the proportion of users of Toothpaste B who will never switch to anothertoothpaste?

37

Page 38: Hypothesis and Test Procedures A statistical test of hypothesis consist of : 1. The Null hypothesis, 2. The Alternative hypothesis, 3. The test statistic

Solution

38

0 1 2 1 2

1 1 2 1 2

1 2 1 2

1 2

The hypothesis to be tested are ,

: 0 is not greater than

: 0 is greater than

Therefore, test statistic is

ˆ ˆ 0.20 0.17

1 1ˆ ˆ

H p p p p

H p p p p

p p p pZ Z

pqn n

0.01

0

0 1.15

1 1(0.187)(0.813)

500 400

Rejection Region : Z ;   2.33

Since 1.15 2.33, we fail to reject and therefore, we conclude that the

proportions of users of  Toothpaste A who will

z z

H

never switch to another toothpaste

is not greater than the proportion of users of  Toothpaste B who will never switch

to another toothpaste.