19
MEASUREMENTS OF ERRORS IN ST A TIS TIC S PREPARED BY: VAIDEHI ULAGANA THAN (GS 24538) MSc NUTRITIONAL SCIENCES DEPARTMENT OF NUTRITION AND DIETETICS FACULTY OF MEDICINE AND HEALTH SCIENCES, UPM ADV ANCED BIOST A TISTICS (BGY 5404) DR SHAMARINA SHOHAIMI DEPARTMENT OF BIOLOGY , FACULTY OF SCIENCE, UPM

Measurements of Errors in Statistics_vaidehi Ulaganathan

Embed Size (px)

Citation preview

Page 1: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 1/19

MEASUREMENTS OF ERRORS

IN STATISTICS

PREPARED BY:

VAIDEHI ULAGANATHAN (GS 24538)

MSc NUTRITIONAL SCIENCES

DEPARTMENT OF NUTRITION AND DIETETICS

FACULTY OF MEDICINE AND HEALTH SCIENCES, UPM

ADVANCED BIOSTATISTICS (BGY 5404)DR SHAMARINA SHOHAIMI

DEPARTMENT OF BIOLOGY, FACULTY OF SCIENCE, UPM

Page 2: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 2/19

Type I and Type II Error

Page 3: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 3/19

Definition

Type I Error Type I Error

Also known as an- "error of the first kindµ

- error - "false positive": the error of rejecting

a null hypothesis when it is actuallytrue.

occurs when we are observing a

difference when in truth there is none,thus indicating a test of poor specificity.

can be viewed as the error of excessive credulity

"A Positive Assumption is False

Also known as an- "error of the second kind´

- error -"false negative": the error of failing to

reject a null hypothesis when in factwe should have rejected the nullhypothesis.

Error of failing to observe a differencewhen in truth there is one, thusindicating a test of poor sensitivity.

Can be viewed as the error of excessive

skepticism

"A Negative Assumption is False

Page 4: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 4/19

Page 5: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 5/19

Fundamental Outcomes in Hypothesis Tests

As we all (hopefully) remember, results of 

hypothesis tests fall into one of four scenarios:

H0 is true H0 is false

We reject H0

We don·t rejectH0

Type I Error  OK

OK Type II Error 

Page 6: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 6/19

Jury Trial Hypothesis Test

Defendant isInnocent

 Jury Trial vs. Hypothesis Test

Assumption

Standard of Proof 

Evidence

Decision

Beyond areasonable doubt

Null hypothesisis true

Facts presentedat trial

Fail to reject assumption(not guilty)or reject (guilty)

Determined byE

Summarystatistics

Fail to reject H0or Reject H0 in favor of Ha

Page 7: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 7/19

Ty e I err r: ± tati t at t e evi e ce i icates

t e ater is safe e , i fact, it i

safe. ± The atchdog gr oup ill have

pote tially i itiated a clean-up  her none as required ( M asted).

Type II err or: ± tating that there is no evidence tha

the ater is unsafe hen, in f act, it iunsafe.

 ±

The opportunity to note (and repair)potential health risk ill e issed.

Scenario # 1

A particular compound is nothazardous in drinking water if it

is present at a rate of no morethan 25ppm. A watchdog groupbelieves that a certain water  source does not meet thisstandard.

 ± : mean amount of the compound(in ppm)H0: < 25Ha: > 25

 ± The watchdog group decided to

gather data and formally conductthis test.

Page 8: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 8/19

Scenario # 2

A lobbying group has a been advocating a particular ballot proposal. One week before theelection, they are considering moving some of their advertising efforts to other issues. If theproposal has a support level of at least 55%, they will feel it·s ´safeµ and move money to other 

campaigns. ± p: proportion of people who support the proposal

H0: p > .55

Ha: p < .55

 ± The lobbying group decided to gather data and formally conduct this test.Type I error:

Stating that the evidence indicates the supportlevel is less than 55% (and the proposal may bein jeopardy of failing) when that is not the case.

The lobbying group will have kept advertisingdollars aimed at this proposal when they couldhave been spent elsewhere.

Type II error:

Stating that the proposal appears to have a³safe´ level of support when that is not the case.

The lobbying group would shift funds away fromsupporting this proposal even though it may stillbe in need of that support.

Page 9: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 9/19

EXA PLE 1Test at the 5% level,

whether the sample valueof 72 comes from a normaldistribution with a mean of 55 and a variance of 144.

The diagram shows the uestionvisually:

A type I error is falsely rejecting the

null, so this is simple 5% or 0.05.

Computing Probability of Type I Error

What is the probabilityof a type I error 

Page 10: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 10/19

EXA PLE 2A normal random variable X is described asX~N(80,120). However, it is thought that X has a

lower mean and so a sample of size 30 is takenand the following hypotheses are put forward:

It is decided that if the sample mean value isless than 76.5 then the null hypothesis will berejected.

z values are found.

This a sample so we have to use thestandard error:

0-1.75

The area is found using tables or a G :

p=0.04

Computing Probability of Type I Error

The diagram shows the uestion visually:

What is the probabilityof a type I error 

Page 11: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 11/19

EXA PLE 3: BINO IAL

A die is suspected of being biased towardsthe six. To test this the die is rolled 60 timesand two hypotheses are put forward:

It is decided to reject the null hypothesis if 

there are 16 or more sixes in the 60 rolls of the die.

0 1.91

The area is found using calculator or DC:p=0.028

X~N(10,8.333)

The continuity correction: In this example wehave discrete data (whole numbers), so weemploy the continuity correction. We started our critical region not at 16 but at 15.5.

Computing Probability of Type I Error

What is the probability

of a type I error 

Page 12: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 12/19

Computing Probability of Type II Error

Begin with the usual picture(assuming Ha: > 0)

0 zE

Type II error probabilities

depend on: E

Sample size Population variance

Difference betweenactual andhypothesized means

Page 13: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 13/19

If the rule is, reject H0

if z = (x-0)/(/¥n) > zE,

then an e uivalent rule is

reject when

x > 0 + zE

(/¥n)

0 0 + zE

(/¥n)

Computing Probability of Type II Error

Page 14: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 14/19

0 + zE (/¥n)t

Computing Probability of Type II Error

The type II error probability () isthe blue area, where t is the truepopulation mean.

So to find , we need to find thearea to the left of 

0 + zE (/¥n)Standardize:

[0 + zE

(/¥n)] ² t

/¥n

Simplify and we get:

= P(z < (0 ² t)/(/¥n) + zE

)

Page 15: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 15/19

A tire manufacturer claims that its tires last 35000 miles, on average.A consumer group wishes to test this, believing it is actually less.

The group plans to assess lifetime of tires on a sample of 35 carsand test these assumptions at E = 0.05. If the standard deviation of tire life is 4000 miles, what is the probability of a type II error if theactual mean lifetime of the tires is 32000 miles?

A few things change: =1-P(z < (0 ² t)/(/¥n) - z

E))

= 1-P(z < (35000 ² 32000)/(4000/¥ 35) -1.645)

= 1-P(z < 2.79) = 1-0.9974=0.0026

EXAMPLE

Page 16: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 16/19

The z-score changes: =1-P(z < (

0

 ² t

)/(/¥n) - zE

))

= 1-P(z < (35000 ² 32000)/(4000/¥ 35) -3.090)

= 1-P(z < 1.35) = 1-0.9115=0.0885

A more stringent E (lower P(type I error))

increases the type II error rate

³all else being e ual.

IF E = 0.001

Page 17: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 17/19

Power = P(reject null | null is false)

= P(type II error)= P(don·t reject null | null is

false)

Power = 1 -

POWER

Page 18: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 18/19

Statistical error:The difference between a computed, estimated, or  

measured value and the true, specified, or theoreticallycorrect value that is caused by random, and inherentlyunpredictable fluctuations in the measurement apparatus or the system being studied.

Systematic error:The difference between a computed, estimated, or  measured value and the true, specified, or theoretically

correct value that is caused by non-random fluctuationsfrom an unknown source and which once identified can

Statistical Error Vs. Systematic Error

Page 19: Measurements of Errors in Statistics_vaidehi Ulaganathan

8/8/2019 Measurements of Errors in Statistics_vaidehi Ulaganathan

http://slidepdf.com/reader/full/measurements-of-errors-in-statisticsvaidehi-ulaganathan 19/19