22
Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Embed Size (px)

Citation preview

Page 1: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Chapter 8. Hypothesis testing

§1.The basic concepts of hypothesis testing

Page 2: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

1. An example We selected 20 newborns randomly from a region in 2012,

the average weight of them is 3160g, the sample standard deviation of the weight is 300g, and based on past statistics, the average weight of newborn is 3140g. If the weight of obeys normal distribution. Is there any significant difference about the weight between the newborn in 2012 and the old ones?

Page 3: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Let denote the weight of newborn, then based on the hypothesis, we have .The problem is that whether the mean of population is equal to 3140g or not, which can be expressed as ,

This hypothesis is called zero hypotheses 零假设 or the original hypothesis 原假设 .

If is not correct, so is correct. This hypothesis could be called the alternative hypothesis 备择假设 . The above hypothesis testing problem is often expressed as .

X2~ ( , )X N

0 : 3140H

0 : 3140H 1 : 3140H

0 1: 3140 : 3140H H

Page 4: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

2.significant test 显著性测验 According to statistics, in the past, the average wei

ght of newborns is 3140g, while in 2012, the average weight of newborn samples is 3160g, a difference in 20g, this difference may arise in two situations. One is that there is no essential difference in them, the difference in 20g is only caused by the randomness of the sample; another is caused by the essential difference in them. So the point is whether the difference can be explained by the randomness of sample or not.

Page 5: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

The sample mean is a good estimation of the population mean , if , should be relatively small, we should establish a reasonable limit , When ,we accept the zero hypothesis ;Otherwise ,we will accept alternative hypothesis.

3140 | 3140 |X

C | 3140 |X C

Page 6: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

if the observation of satisfies ,that is to say the small probability event occur. Generally speaking, small probability events will not occur in one experiment, so we believe is unreasonable, we call critical region 临界区 . Otherwise, we have not enough evidence to reject ,so we accept .Which is called significant test.

~ ( 1)/

XT t n

S n

0.005(| | ( 1)) 0.01P T t n

| |T| |t 0.005 ( 1)t n

0.005{| | ( 1)}T t n

0H 0.005{| | ( 1)}t t n

0H

0H

We know that

Setting =0.01,

Hypothesis Test Procedure,Example8.1---P151

Page 7: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

3.Two types of errors 1. The original hypothesis is actually correct, but the test result wro

ngly reject it, which commit "abandoning true" errors, often referred to as type I error.

2. The original hypothesis is not right, but the test result wrongly accept it, which commit "maintaining false " errors, often referred to as type II error. As the sample is random, so we are committing two types of errors on certain probability. In statistics, we call the probability of committing type I error the significance level 显著性水平 , abbreviated as the level. Naturally, people desire the probability of committing two types of errors as small as possible, but for a given sample size, We can not reduce the probability of committing two types of errors simultaneously, Commonly, we often fix the upper bound of the probability of committing type I error, and then select a test with smaller probability of committing type II error.

Page 8: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

§8.2 Test Concerning Means

Let denote a random sample from a normal distribution , is significance level.

1 Test of mean 1.1 Variance known

The problem as follows

When is true, then

,thus So the critical region is .

1( , , )nX X2~ ( , )X N

0 0 1 0: :H H

0H2 21 2 1 2~ ( 1, 1)F S S F n n

/2(| | )P Z Z

/2{| | }Z Z

8.2.1 single normal population hypothesis testing

Page 9: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Example Let us assume ,we have nine ra

ndom samples, and the mean is 4.484,suppose the variance have no change, testing the following problem with the significance level .

we get

,Then can be accepted.

2~ (4.55,0.108 )X N

0.05,

0 1: 4.55 : 4.55H H

0.025

2

0.108, 4.484, 9, 1.96x n Z Z

4.484 4.55| | | | 1.83 1.96

0.108 / 3/

xZ

n

0H

Page 10: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

1.2 Variance unknown

The problem as follows ,When is true, then

,Thus ,So the critical region is .

0 0 1 0: :H H

0H

~ ( 1)/

XT t n

S n

/2(| | ( 1))P T t n

/2{| | ( 1)}t t n

Page 11: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Example Let us assume have normal distribution,

we have 25 random samples, and the mean is 66.5,and the standard deviation of sample is 15, testing the following problem with the significance level .

, 2.06, ,we get

,Then can be accepted.

X

0.05,

0 1: 70 : 70H H 25n

0.025 (24)t 66.5x 66.5 70

| | | | 1.167 2.0615 / 5

t

0H

Page 12: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

There are still two other kinds of problem of testing mean as follows

0 0 1 0: :H H

0 0 1 0: :H H

Page 13: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

2 Test of variance The problem as follows

When is true, then

thus

So the critical region is

2 2 2 20 0 1 0: :H H

22 2

2

( 1)~ ( 1)

n Sn

0H

2 2 2 21 /2 /2( ( 1) ( 1))P n or n

2 2 2 21 /2 /2{ ( 1)} { ( 1)}n n

Page 14: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Example Let us assume have normal distribution, we have

5 random samples, 1.32, 1.55, 1.36, 1.40, 1.44,and the standard deviation is , testing the following problem with the significance level

From the given sample, we have

hence

,So we reject .

X

0.048 0.05.

2 2 2 20 1: 0.048 : 0.048H H

5n 2 20.025 0.975(4) 11.14, (4) 0.484

2 0.00778S

22

4 0.0077813.51 11.14

0.048

0H

Page 15: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

There are still two other kinds of problem of testing variance as follows ;

2 2 2 20 0 1 0: :H H

2 2 2 20 0 1 0: :H H

Page 16: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

§8.2.2 Two normal population hypothesis testing

Let denote a random sample of size from a distribution that is

denote a random sample of size from a distribution that is where , are unknown parameters, the two random samples are independent.

11 2, ,..., nX X X

1n2

1 1( , ),N 21 2, ,..., nY Y Y

2n2

2 2( , ),N 2

1 1, 22 2,

Page 17: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

1. , testing of

The problem as follows

When is true, then

,

Thus ,So the critical region is

.

2 21 2 1 2

0 1 2 1 1 2: :H a H a

0H

1

1 2

2~( )

1 1( 2)

X Y a

Sn n

T t n n

/2 1 2(| | ( 2))P T t n n

/2 1 2{| | ( 2)}T t n n

Page 18: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Example Let us assume and both have normal

distribution with equal variances, we have the following random samples, X :24.3, 20.8, 23.7, 21.3, 17.4;

Y :18.2, 16.9, 20.2, 16.7. testing the following problem with the significance level

X Y

0.05,

0 1 2 1 1 2: :H H

Page 19: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Using similar methods above to discuss the following problems

0 1 2 1 1 2: :H a H a

0 1 2 1 1 2: :H a H a

Page 20: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

2 testing of

The problem as follows

When is true, then

hence

So the critical region is .

2 21 2/

2 2 2 20 1 2 1 1 2: :H H

0H2 21 2 1 2~ ( 1, 1)F S S F n n

1 2 1 2 2 1 2( ( 1, 1) ( 1, 1))P F F n n F F n n or

1 2 1 2 2 1 2{ ( 1, 1) ( 1, 1)}F F n n F F n n or

Page 21: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Using similar methods above to discuss the following problems,

2 2 2 20 1 2 1 1 2: :H H

Page 22: Chapter 8. Hypothesis testing §1.The basic concepts of hypothesis testing

Example

There are two team A and B participate a paper contest, A team have 9 people, and B team have 8 people, the score as follows:A team 85, 59, 66, 81, 35, 57, 76, 63, 78,B team 65, 72, 69, 65, 58, 68, 52, 64,Can we believe the variance of B team is significantly greater than A team’s concerning the significance level 0.05?