statistical test for population mean

32
One Sample Inf-1 In statistical testing, we use deductive reasoning to specify what should happen if the conjecture or null hypothesis is true. A study is designed to collect data to challenge this hypothesis. We determine if what we expected to happen is supported by the data. If it is not supported, we reject the conjecture. If it cannot be rejected we (tentatively) fail to reject the conjecture. We have not proven the conjecture, we have simply not been able to disprove it with these data. Statistical Test for Population Mean

Upload: toby

Post on 14-Jan-2016

55 views

Category:

Documents


0 download

DESCRIPTION

Statistical Test for Population Mean. In statistical testing, we use deductive reasoning to specify what should happen if the conjecture or null hypothesis is true. A study is designed to collect data to challenge this hypothesis. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Statistical Test for Population Mean

One Sample Inf-1

• In statistical testing, we use deductive reasoning to

specify what should happen if the conjecture or null

hypothesis is true. • A study is designed to collect data to challenge this

hypothesis. • We determine if what we expected to happen is

supported by the data. • If it is not supported, we reject the conjecture. • If it cannot be rejected we (tentatively) fail to

reject the conjecture. • We have not proven the conjecture, we have simply

not been able to disprove it with these data.

Statistical Test for Population Mean

Page 2: Statistical Test for Population Mean

One Sample Inf-2

Statistical tests are based on the concept of Proof by Contradiction.

If P then Q = If NOT Q then NOT P

Analogy with justice system

Logic Behind Statistical Tests

Court of Law1. Start with premise that person is

innocent. (Opposite is guilty.)

2. If enough evidence is found to show beyond reasonable doubt that person committed crime, reject premise. (Enough evidence that person is guilty.)

3. If not enough evidence found, we don’t reject the premise. (Not enough evidence to conclude person guilty.)

Statistical Hypothesis Test1. Start with null hypothesis, status quo.

(Opposite is alternative hypothesis.)2. If a significant amount of evidence is

found to refute null hypothesis, reject it. (Enough evidence to conclude alternative is true.)

3. If not enough evidence found, we don’t reject the null. (Not enough evidence to disprove null.)

Page 3: Statistical Test for Population Mean

One Sample Inf-3

CLAIM: A new variety of turf grass has been developed that is

claimed to resist drought better than currently used

varieties.

CONJECTURE: The new variety resists drought no better than currently

used varieties.

DEDUCTION: If the new variety is no better than other varieties (P), then

areas planted with the new variety should display the same

number of surviving individuals (Q) after a fixed period

without water than areas planted with other varieties.

CONCLUSION: If more surviving individuals are observed for the new

varieties than the other varieties (NOT Q), then we

conclude the new variety is indeed not the same as the

other varieties, but in fact is better (NOT P).

Examples in Testing Logic

Page 4: Statistical Test for Population Mean

One Sample Inf-4

1. Null Hypothesis (H0:)

2. Alternative Hypothesis (HA:)

3. Test Statistic (T.S.)

Computed from sample data.

Sampling distribution is known if

the Null Hypothesis is true.

4. Rejection Region (R.R.)

Reject H0 if the test statistic

computed with the sample

data is unlikely to come from

the sampling distribution under

the assumption that the Null

Hypothesis is true.

5. Conclusion:

Reject H0 or Do Not Reject H0

H0: ≤ 530

HA: > 530

Other HA:

< 530 530

),(~.. * 10N

n

yzST

R.R. z* > z

Or z* < -z

rz*| >

z

Five Parts of a Statistical Test

Page 5: Statistical Test for Population Mean

One Sample Inf-5

Research Hypotheses: The thing we are primarily interested in “proving”.

03A

02A

01A

H

H

H

:

:

:Average heightof the class

m61H

m61H

m61H

3A

2A

1A

.:

.:

.:

Null Hypothesis: Things are what they say they are, status quo.

00H : m61H0 .:

Hypotheses

(It’s common practice to always write H0 in this way, even though what is meant is the opposite of HA in each case.)

Page 6: Statistical Test for Population Mean

One Sample Inf-6

Some function of the data that uses estimates of the parameters we are interested in and whose sampling distribution is known when we assume the null hypothesis is true.

Most good test statistics are constructed using some form of a sample mean.

Test Statistic

Why?The Central Limit Theorem Of Statistics

Page 7: Statistical Test for Population Mean

One Sample Inf-7

Test Statistic: Sample Mean

Under H0: the sample mean has a

sampling distribution that is normal with mean 0.

n

iiy

ny

1

1

n,N~y

),(N~y

0

0

Under HA: the sample mean has a

sampling distribution that is also normal but with a mean that is different from 0.

n,N~y

),(N~y

1

1

003A

02A

01A

orH

H

H

:

:

:Hypotheses of interest:

Developing a Test Statistic for the Population Mean

Page 8: Statistical Test for Population Mean

One Sample Inf-8

H0: True

HA1: True

01

What would you conclude if the sample mean fell in location (1)? How about location (2)? Location (3)? Which is most likely 1, 2, or 3 when H0 is true?

(1) (2)(3)

Graphical View

Page 9: Statistical Test for Population Mean

One Sample Inf-9

0Reject H0 if the sample mean is in the upper tail ofthe sampling distribution.

Rejection Region

),(N n0

C1

01 HjectCyIf Re

How do we determine C1?

H0: Assumed True

Testing HA1: 0

Rejection Region

Page 10: Statistical Test for Population Mean

One Sample Inf-10

Reject H0 if the sample mean is larger than “expected”.

If H0 were true, we would expect 95% of sample means to be less than the upper limit of a 90% CI for μ.

nC

645.101

In this case, if we use this critical value, in 5 out of 100 repetitions of the study we would reject Ho incorrectly. That is, we would make an error.

But, suppose HA1 is the true situation, then

most sample means will be greater than C1 and we will be making the correct decision to reject more often.

From the standard normal table.

05.0645.10

n

yP

Determining the Critical Value for the Rejection Region

Page 11: Statistical Test for Population Mean

One Sample Inf-11

H0 = 0 True

Testing HA1: 0

Rejection Region

),(N n0

C1

0

Rejection Region

C2

H0: = 0 True

Testing HA1: 0

Rejection Region

C3L

H0: = 0 True

Testing HA1: 0

C3U

2.5%

5%

5%

2.5%

Rejection Regions for Different Alternative Hypotheses

Page 12: Statistical Test for Population Mean

One Sample Inf-12

H0: True

0

(1) (2)(3)

Rejection Region

C1

If the sample mean is at location (2) and H0 is actually true, we make the wrong decision.

This is called making a TYPE I error, and the probability of making this error is usually denoted by the Greek letter .

If

= P(Reject H0 when H0 is is the true condition)

nC

645.101 If then = 1/20=5/100 or .05

nzC

0

1then the Type I error is .

If the sample mean is at location (1) or (3) we make the correct decision.

Type I Error

Page 13: Statistical Test for Population Mean

One Sample Inf-13

HA1: True

1

Rejection Region

C10

(1) (2)(3)

= P(Do Not Reject H0 when HA is the true condition)

We will come back to the Type II error later.

If the sample mean is at location (1) or (3) we make the wrong decision.

If the sample mean is at location (2) we make the correct decision.

Type II Error

This is called making a TYPE II error, and the probability of making this type error is usually denoted by the Greek letter .

Page 14: Statistical Test for Population Mean

One Sample Inf-14

H0: True

HA1: True

01

Type I and II Errors

C1

Rejection Region

Type I Error Region

Type II Error Region

• We want to minimize the Type I error, just in case H0 is true, and we wish to minimize the Type II error just in case HA is true.

• Problem: A decrease in one causes an increase in the other.

• Also: We can never have a Type I or II error equal to zero!

Page 15: Statistical Test for Population Mean

One Sample Inf-15

1. Assume the data come from a population with unknown distribution

but which has mean () and standard deviation ().

2. For any sample of size n from this population we can compute a

sample mean, .

3. Sample means from repeated studies having samples of size n will

have the sampling distribution of following a normal distribution

with mean and a standard deviation of /n (the standard error of

the mean). This is the Central Limit Theorem.

4. If the Null Hypothesis is true and = 0, then we deduce that with

probability we will observe a sample mean greater than

0 + z /n. (For example, for = 0.05, z=1.645.)

The solution to our quandary is to set the Type I Error Rate to be small, and hope for a small Type II error also. The logic is as follows:

y

y

Setting the Type I Error Rate

Page 16: Statistical Test for Population Mean

One Sample Inf-16

Following this same logic, rejection rules for all three possible alternative hypotheses can be derived.

Reject Ho if:

For (1-)100% of repeated studies, if the true population mean is 0 as conjectured by H0, then the decision concluded from the statistical test will be correct. On the other hand, in 100% of studies, the wrong decision (a Type I error) will be made.

20

03A

00

2A

00

1A

z

n

yH

z

n

yH

z

n

yH

/:

:

:

Setting Rejection Regions for Given Type I Error

Note: It is just easier to work with a test statistic that is standardized. We only need the standard normal table to find critical values.

Page 17: Statistical Test for Population Mean

One Sample Inf-17

The value 0 < < 1 represents the risk we are willing to take of making the wrong decision.

But, what if I don’t wish to take any risk? Why not set = 0?

What if the true situation is expressed by the alternative hypothesis and not the null hypothesis?

01

Butthis!

)n

,(N~y 1

Suppose HA1 is really the true

situation. Then the samples come from the distribution described by the alternative hypothesis and the sampling distribution of the mean will have mean 1, not 0.

= 0.05

= 0.01

= 0.001

Risk

Page 18: Statistical Test for Population Mean

One Sample Inf-18

(at an Type I error probability)

z

n

y 0Pr

zn

y

00 ifHReject :Rule

Pretty clear cut when 1 much greater than 0

Do not reject Ho Reject HoC

01

The Rejection Rule

10y C z

n

or if

Page 19: Statistical Test for Population Mean

One Sample Inf-19

C

0 1

1Hzn

y A

0 |Pr

When H0 is true

00 Hz

n

y|Pr

A0 Hz

n

y|Pr

When HA is true

Error Probabilities

If HA is the true situation, then any sample whose

mean is larger than will lead to the correct decision (reject H0, accept HA).

y nz 0

Page 20: Statistical Test for Population Mean

One Sample Inf-20

Then any sample such that its sample mean is less than will lead to the wrong decision (do not reject H0, reject HA).

ynz 0

Do not reject HAReject HAC1

If HA is the true situation

H0 : True HA : True

Reject H0

Type I Error

Correct 1 -

Accept H0

Correct

1 -

Type II Error

True Situation

Decision

Page 21: Statistical Test for Population Mean

One Sample Inf-21

A0 Hz

n

y|Pr

00 Hz

n

y|Pr

1Hzn

y A

0 |Pr

Type I Error Probability

Type II Error Probability

Power of the test.

(Reject H0 when H0 true)

(Reject HA when HA true)

(Reject H0 when HA true)

Computing Error Probabilities

Page 22: Statistical Test for Population Mean

One Sample Inf-22

Sample Size: n = 50Sample Mean:

Sample Standarddeviation: s = 5.6

1.40y

H0: = 0 = 38

HA: > 38

What risk are we willing to take that we reject H0 when in fact H0 is true?

P(Type I Error) = = .05 Critical Value: z.05 = 1.645

zn

y

0

645165125065

38140..

.

.

Rejection Region

Conclusion: Reject H0

Example

Page 23: Statistical Test for Population Mean

One Sample Inf-23

To compute the Type II error for a hypothesis test, we need to have a specific alternative hypothesis stated, rather than a vague alternative

Vague

HA: > 0

HA: < 0

HA: 0

Specific

HA: = 1 > 0

HA: = 1 < 0

Note:

As the difference between 0 and 1 gets larger, the probability of committing a Type II error () decreases.

Significant Difference: = 0 - 1

Type II Error.

HA: = 5 < 10

HA: = 20 > 10HA: 10

Page 24: Statistical Test for Population Mean

One Sample Inf-24

H0: = 0

HA: = 1 > 0

nzZ

10Pr

H0: = 0

HA: = 1 < 0

nzZ

10Pr

H0: = 0

Ha: 0

= 1 0

nzZ

10

2Pr

0 1 critical difference

1 - = Power of the test

0 1

0 1

Computing the probability of a Type II Error ()

Page 25: Statistical Test for Population Mean

One Sample Inf-25

6451z

.05 error) I Type

65s140y

50n

.

Pr(

..

40:

38:

1

00

AH

H

n6451Z

506451Z

nzZ 10

.Pr

.PrPr

18940880Z5065

26451Z .).Pr()(

..Pr

Assuming s is actually equal to (usually what is done):

Example: Power

Page 26: Statistical Test for Population Mean

One Sample Inf-26

Power versus (fixed n and )

0 1Pr Z z Pr Z z n

n

Type II error

1-As gets larger, it is less likely that a Type II error will be made.

Page 27: Statistical Test for Population Mean

One Sample Inf-27

Power versus n(fixed and )

0 1Pr Z z Pr Z z n

n

Type II error

1-As n gets larger, it is less likely that a Type II error will be made.

n What happens for larger ?

Page 28: Statistical Test for Population Mean

One Sample Inf-28

n power1 50 .755 .2452 50 .286 .7144 50 .001 .999

n power1 25 .857 .1432 25 .565 .4354 25 .054 .946

0 1Pr Z z Pr Z 1.645 n

n

Power vs. Sample Size

Power = 1-

Page 29: Statistical Test for Population Mean

One Sample Inf-29

Pr(Type II Error)

1-

0

0 large

1

0

0 large

Power

n=10

n=50

Power Curve See Table 4, Ott and Longnecker

Page 30: Statistical Test for Population Mean

One Sample Inf-30

0 1 0 1Pr Z z Pr Z z n

n

Pr Z z n

1) For fixed and n,

decreases (power increases) as increases.

2) For fixed and ,

decreases (power increases) as n increases.

3) For fixed and n,

decreases (power increases) as decreases.

Summary

Page 31: Statistical Test for Population Mean

One Sample Inf-31

1 <

Decreasing decreases the spread in the sampling dist of

Note: z changes.

Same thing happens if you increase n.

Same thing happens if is increased.

y

N(,n)

N(,n)

Increasing Precision for fixed increases Power

Page 32: Statistical Test for Population Mean

One Sample Inf-32

1) Specify the critical difference, (assume is known).

2) Choose P(Type I error) = and Pr(Type II error) = based on traditional and/or personal levels of risk.

3) One-sided tests:

4) Two-sided tests:

Example: One-sided test, = 5.6, and we wish to show a difference of = .5 as significant (i.e. reject H0: =

0 for HA: = 1= 0 + ) with = .05 and = .2.

778~7.77784.065.15.

6.5 2

2

2

n

Sample Size Determination

22/2

2

)(

zzn

22

2

)(

zzn