biostatistics iii

102
Descriptive Descriptive Methods for Methods for Categorical Data Categorical Data Mahmoud Alhussmi, D.Sc., PhD

Upload: -

Post on 20-Jun-2015

160 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Biostatistics iii

Descriptive Methods for Descriptive Methods for Categorical DataCategorical Data

Mahmoud Alhussmi, D.Sc., PhD

Page 2: Biostatistics iii

April 13, 2023 2

TopicsTopics

• ProportionsProportions

• RatesRates– Change ratesChange rates– Measures of morbidity and mortalityMeasures of morbidity and mortality– Standardization of ratesStandardization of rates

• RatiosRatios– Relative riskRelative risk– Odds RatioOdds Ratio

Page 3: Biostatistics iii

April 13, 2023 3

Categorical DataCategorical Data

Data that can be classified as belonging to a Data that can be classified as belonging to a distinct number of categories.distinct number of categories.

– BinaryBinary – data can be classified into one of 2 – data can be classified into one of 2 possible categories (yes/no, positive/negative)possible categories (yes/no, positive/negative)

– OrdinalOrdinal – data that can be classified into – data that can be classified into categories that have a natural ordering (i.e.. categories that have a natural ordering (i.e.. Levels of pain: none, moderate, intense)Levels of pain: none, moderate, intense)

– NominalNominal- data can be classified into >2 - data can be classified into >2 categories (i.e.. Race: Arab, African, and categories (i.e.. Race: Arab, African, and other) other)

Page 4: Biostatistics iii

April 13, 2023 4

Data examplesData examples

• What type of data would result from these What type of data would result from these questions?questions?– How old are you? ____________How old are you? ____________– How old are you?How old are you?

• A. under 18A. under 18• B. 19-35B. 19-35• C. 36-49C. 36-49• D. over 50D. over 50

Page 5: Biostatistics iii

April 13, 2023 5

ProportionsProportions

• Numbers by themselves may be misleading: they are on Numbers by themselves may be misleading: they are on different scales and need to be reduced to a standard different scales and need to be reduced to a standard basis in order to compare them.basis in order to compare them.

• We most frequently use proportions: that is, the fraction We most frequently use proportions: that is, the fraction of items that satisfy some property, such as having a of items that satisfy some property, such as having a disease or being exposed to a dangerous chemical.disease or being exposed to a dangerous chemical.

• "Proportions" are the same thing as fractions or "Proportions" are the same thing as fractions or percentages. In every case you need to know what you percentages. In every case you need to know what you are taking a proportion of: that is, what is the are taking a proportion of: that is, what is the DENOMINATOR in the proportion.DENOMINATOR in the proportion.

n

xp )100()100(

n

xpercent

Page 6: Biostatistics iii

April 13, 2023 6

Proportions and ProbabilitiesProportions and Probabilities

• We often interpret proportions as We often interpret proportions as probabilities. If the probabilities. If the proportionproportion with a with a disease is 1/10 then we also say that thedisease is 1/10 then we also say that the probabilityprobability of getting the disease is 1/10, or of getting the disease is 1/10, or 1 in 10. 1 in 10.

• Proportions are usually quoted for Proportions are usually quoted for samplessamples - - probabilities are almost always quoted for probabilities are almost always quoted for populations.populations.

  

Page 7: Biostatistics iii

April 13, 2023 7

Workers ExampleWorkers Example

• For the cases:For the cases:– Proportion of exposure=84/397=0.212 or 21.2%Proportion of exposure=84/397=0.212 or 21.2%

• For the controls: For the controls: – Proportion of exposure=45/315=0.143 or 14.3%Proportion of exposure=45/315=0.143 or 14.3%

SmokingSmokingWorkersWorkersCasesCasesControlsControls

NoNoYesYes11113535

NoNo5050203203

YesYesYesYes 84844545

NoNo313313270270

Page 8: Biostatistics iii

April 13, 2023 8

PrevalencePrevalence

Disease Prevalence = the proportion of people with a given Disease Prevalence = the proportion of people with a given disease at a given time.disease at a given time.

disease prevalence =disease prevalence =

Prevalence is usually quoted as per 100,000 Prevalence is usually quoted as per 100,000 people so the above proportion should be people so the above proportion should be multiplied by 100,000.multiplied by 100,000.

Number of diseased persons at a given time

Total number of persons examined at that time

Page 9: Biostatistics iii

InterpretationInterpretation

April 13, 2023 9

Total

newoldCasesevalence

)(Pr

Problem of exposure, consequentlyNot comparable measurementOld = duration of the diseaseNew = speed of the disease

At time t

Page 10: Biostatistics iii

April 13, 2023 10

Screening TestsScreening Tests

• Through screening tests people are Through screening tests people are classified as healthy or as falling into one classified as healthy or as falling into one or more disease categories.or more disease categories.

• These tests are not 100% accurate and These tests are not 100% accurate and therefore misclassification is unavoidable.therefore misclassification is unavoidable.

• There are 2 proportions that are used to There are 2 proportions that are used to evaluate these types of diagnostic evaluate these types of diagnostic procedures. procedures.

Page 11: Biostatistics iii

April 13, 2023 11

Screening TestsScreening Tests

General Population

Diseased

Positive Test Results

Page 12: Biostatistics iii

April 13, 2023 12

Sensitivity and SpecificitySensitivity and Specificity

• Sensitivity and specificity are terms used to Sensitivity and specificity are terms used to describe the effectiveness of screening tests. They describe the effectiveness of screening tests. They describe how good a test is in two ways - finding describe how good a test is in two ways - finding false positives and finding false negativesfalse positives and finding false negatives

• SensitivitySensitivity is the Proportion of diseased who is the Proportion of diseased who screen positive for the disease screen positive for the disease

• SpecificitySpecificity is the Proportion of healthy who screen is the Proportion of healthy who screen healthyhealthy

Page 13: Biostatistics iii

Sensitivity and SpecificitySensitivity and Specificity

Condition Present Condition Absent

……………………………………………………………………………………………

Test Positive True Positive (TP) False Positive (FP)

Test Negative False Negative (FN) True Negative (TN)

…………………………………………………………………………………………… Test Sensitivity (Sn) is defined as the probability that the test is positive

when given to a group of patients who have the disease. Sn= (TP/(TP+FN))x100. It can be viewed as, 1-the false negative rate.

The Specificity (Sp) of a screening test is defined as the probability that the test will be negative among patients who do not have the disease. Sp = (TN/(TN+FP))X100. It can be understood as 1-the false positive rate.

Page 14: Biostatistics iii

Positive & Negative Predictive Values

• The positive predictive value (PPV) of a test is the probability that a patient who tested positive for the disease actually has the disease. PPV = (TP/(TP+FP))X 100.

• The negative predictive value (NPV) of a test is the probability that a patent who tested negative for a disease will not have the disease. NPV = (TN/(TN+FN))X100.

Page 15: Biostatistics iii

The Efficiency

• The efficiency (EFF) of a test is the probability that the test result and the diagnosis agree.

• It is calculated as:

EFF = ((TP+TN)/(TP+TN+FP+FN)) X 100

Page 16: Biostatistics iii

April 13, 2023 16

ExampleExample• A cytological test was undertaken to screen A cytological test was undertaken to screen

women for cervical cancer.women for cervical cancer.

• Sensitivity =?Sensitivity =?

• Specificity = Specificity = ??

Test PositiveTest PositiveTest NegativeTest NegativeTotalTotal

Actually PositiveActually Positive154154) ) TPTP((225225) ) FPFP((379379

Actually NegativeActually Negative362362) ) FNFN((

516516) ) TP+FNTP+FN((

23,36223,362) ) TNTN((

2358723587))FP+TNFP+TN((

23,72423,724

Page 17: Biostatistics iii

April 13, 2023 17

Displaying ProportionsDisplaying Proportions

• Types of charts that can be used:Types of charts that can be used:– HistogramHistogram– Pie ChartPie Chart– Line GraphLine Graph

• BEWARE of the type of display you use – BEWARE of the type of display you use – some charts are better at displaying some charts are better at displaying certain types of data than others.certain types of data than others.

Page 18: Biostatistics iii

April 13, 2023 18

Displaying ProportionsDisplaying Proportions

Percent of Children Living in Crack/cocaine Households

0%

10%

20%

30%

40%

50%

60%

70%

80%

Black White AmericanIndian

Other

Percent of Children Living inCrack/cocaine Households

AfricanAfrican70%70%

ArabArab18%18%

MixedMixed8%8%

OtherOther4%4%

Distribution of Race in Sudan

0

10

20

30

40

50

60

70

80

African Arab foreigners others

Page 19: Biostatistics iii

April 13, 2023 19

Displaying ProportionsDisplaying ProportionsDistribution of Race in Sudan

0 20 40 60 80

African

Arab

foreigners

others

Distribution of Race in Sudan

African

Arab

foreigners

others

Page 20: Biostatistics iii

April 13, 2023 20

Displaying ProportionsDisplaying ProportionsCause of DeathCause of Death##of Deathsof DeathsProportion of DeathsProportion of Deaths

Heart DiseaseHeart Disease12,27812,2780.380.38

CancerCancer6,4486,4480.200.20

Cerebrovascular DiseaseCerebrovascular Disease3,9583,9580.120.12

AccidentsAccidents1,8141,8140.060.06

OtherOther8,0888,0880.250.25

Causes of Death

Heart Disease

Cancer

Cerebrovascular disease

Accidents

Other

Page 21: Biostatistics iii

April 13, 2023 21

RatesRates

• The term The term rate rate is often used interchangeably is often used interchangeably with the term proportion although with the term proportion although sometimes it refers to a quantity of a very sometimes it refers to a quantity of a very different nature.different nature.

• Types of rates we will cover:Types of rates we will cover:– Incidence rateIncidence rate– Change ratesChange rates– Death rateDeath rate– Follow-up death rate Follow-up death rate

Page 22: Biostatistics iii

April 13, 2023 22

Calculation of Incidence Calculation of Incidence RateRate

Page 23: Biostatistics iii

April 13, 2023 23

DefinitionDefinition

The incidence rate is the production of new cases in a population. It measure the number of cases per unit of time, i.e. It measure the average of the speed of the apparition of new cases in given population.

There are three measures of incidence:

1. Incidence rate (=news cases/time of participation)

2. Instantaneous incidence

3. Accumulate incidence

Page 24: Biostatistics iii

April 13, 2023 24

In incidence study we are interested on the occurrence of event (disease) over the time,. Such study deals with follow up of each subject and the moment (ti) that each event (disease) occurs.The problem of incidence data is that the existence of observation incomplete, subjects are still not affected at the moment of analysis.

Page 25: Biostatistics iii

April 13, 2023 25

To study incidence rate we should know for each subject the following information:

Date of origin

Is the date that an individual enter in the study.

Date of last information

Is the recent date that we receive information about the status of the subject. If the subject is affected, so the date of last information is date of getting the disease.

Page 26: Biostatistics iii

April 13, 2023 26

Duration of follow up

Is the delay between the date of origin and the date of last information

Date of point

Is the date that we decide to stop collecting information about subjects.

Loss of view

A subject that we do not know his status at the date of point is called loss of view.

Page 27: Biostatistics iii

April 13, 2023 27

Time of participation ti

Time of participation for loss of view

t1, t2, t3, ….,

time 0

Date of last information

Date of point

Time of participation for affected subject

?

Time of participation

Time not consider

Time of participation for loss of view

Page 28: Biostatistics iii

April 13, 2023 28

ExampleThe following example follow 30 individuals between 1982 to 1988 for the disease D.

# #of individualof individualDate of originDate of originDate of diseaseDate of diseaseDate of last Date of last informationinformation

Time of Time of participationparticipation

1111-8211-821-841-8412-8812-881414

2211-8211-8210-8710-8712-8812-885959

336-826-822-862-866-876-874444

4411-8211-8211-8611-8612-8812-883636

5511-8211-823-853-8512-8812-882828

6611-8211-821-881-8812-8812-886262

776-836-833-843-846-856-8599

881-831-8312-8612-8612-8712-874747

991-841-841-871-8712-8812-883636

101011-8211-8210-8510-8512-8812-883535

111112-8212-828-868-8612-8812-884444

12121-831-836-836-837-857-8555

13136-836-8311-8711-877-887-885353

141411-8211-828-848-842-872-872121

Page 29: Biostatistics iii

April 13, 2023 29

15151-831-833-863-8612-8812-883838

16166-836-835-875-8712-8812-884747

17175-835-831-841-8412-8812-8888

181811-8311-836-886-8812-8812-885555

19196-836-835-865-8612-8712-873535

20203-833-832-882-8812-8812-885959

21214-834-8312-8812-886868

222211-8211-8211-8511-853636

23231-831-8312-8812-887171

24246-836-8312-8812-886666

252511-8211-8211-8611-864848

26266-826-8212-8812-887878

272712-8312-8312-8812-886060

282811-8211-8212-8812-887373

29296-846-8412-8812-885454

30301-831-831-841-841212

Time of participation = 3001

Number of cases = 20

Rate of incidence = 20/3001 = 0.015

Or 1.5 case per 100 individuals.

Page 30: Biostatistics iii

April 13, 2023 30

Sometimes it is difficult to know the exact date of origin of the case or even the duration of follow up, and this is always take place when the population under study is open . In this case what we know very well :1.Number of new cases, but not the time exact of participation = m2.Total number of population from the begin to end of the study = NThe calculation using the same method as before will be impossible, because many information was missed. The assumption over which we are going to build our hypothesis is that all the cases enter or quiet the study are distributed uniformly during the period of follow up, i.e. the date of follow up for each of these subject will be the half average of the period of the follow up of the study.The calculation will be as follow: Item Number time of participationNot diseases N N*ΔtEnter along the study Ne Ne*Δt/2Quiet along the study Ns Ns*Δt/2Disease m m*Δt/2

2)2(t

mNNN

mIR

se

Page 31: Biostatistics iii

April 13, 2023 31

Change RatesChange Rates

• These types of rates are used to describe These types of rates are used to describe changes after a certain period of time.changes after a certain period of time.

• Example: A total of 35,238 new AIDS cases Example: A total of 35,238 new AIDS cases were reported in 1989 compared to 32,196 were reported in 1989 compared to 32,196 reported during 1988.reported during 1988.– The change rate for new AIDS cases:The change rate for new AIDS cases:

100 Xvalue old

value old-valuenew (%) rate change

%4.910019632

1963223835

,

,,

Page 32: Biostatistics iii

April 13, 2023 32

Measures of Morbidity and MortalityMeasures of Morbidity and Mortality

years-person total

deaths ofnumber ratedeath up-follow

year) a (ie. timeof period defined for the

followed wererisk whoat people of #

year) a (ie. timeof period defined aover

disease thedeveloped that people of #

rate incidence

yearon that population the

yearcalendar ain deaths #ratedeath crude

Page 33: Biostatistics iii

April 13, 2023 33

Crude Death RateCrude Death Rate

• Example: The 1980 population in Example: The 1980 population in California was 23,000,000 (as estimated California was 23,000,000 (as estimated on 1 July) and there were 190,237 deaths on 1 July) and there were 190,237 deaths during that year.during that year.

– Crude death rate Crude death rate =(190,237/23,000,000)*1,000=(190,237/23,000,000)*1,000

= 8.3 deaths per 1,000 per year= 8.3 deaths per 1,000 per year

Page 34: Biostatistics iii

April 13, 2023 34

Displaying Proportions over TimeDisplaying Proportions over Time

Female Death Rates (1984-1987)

780

785

790

795

800

805

810

815

1984 1985 1986 1987

Death Rate per 100,000

Death Rate per Death Rate per 100,000100,000

19841984793793

19851985807807

19861986809809

19871987813813

Page 35: Biostatistics iii

April 13, 2023 35

Standardization of RatesStandardization of Rates

• Crude rates are used to describe a population but Crude rates are used to describe a population but comparisons of crude rates are often invalid because comparisons of crude rates are often invalid because the populations may be different w.r.t important the populations may be different w.r.t important characteristics (ie. age, gender, race).characteristics (ie. age, gender, race).

• To account for these differences adjusted rates are To account for these differences adjusted rates are used in the comparison.used in the comparison.

X100,000population standard in #

expected deaths #rate adjusted

Page 36: Biostatistics iii

April 13, 2023 36

Group AGroup AGroup BGroup B

Age groupAge groupno. no.

deathsdeathspersonspersonsdeaths/deaths/100000100000

no. no. deathsdeathspersonspersons

deaths/deaths/100000100000

0-40-416216240,00040,000405.0405.02,0492,049546,000546,000375.3375.3

5-195-19107107128,000128,00083.683.61,1951,1951,982,0001,982,00060.360.3

20-4420-44449449172,000172,000261.0261.05,0975,0972,676,0002,676,000190.5190.5

45-6445-6445145158,00058,000777.6777.619,90419,9041,807,0001,807,0001101.51101.5

6565++4444449,0009,0004933.34933.363,50563,5051,444,0001,444,0004397.94397.9

TotalsTotals16131613407000407000396.3396.39175091750845500084550001085.21085.2

Page 37: Biostatistics iii

April 13, 2023 37

Using the X population for 1970 as a standard we getUsing the X population for 1970 as a standard we get::

Group AGroup AGroup BGroup B

Age Age groupgroupStandardStandard

Age spec. Age spec. raterate

Exp Exp deathsdeaths

Age spec. Age spec. raterate

Exp Exp deathsdeaths

0-40-484,41684,416405.0405.0342342375.3375.3317317

5-195-19294,353294,35383.683.624624660.360.3177177

20-4420-44316,744316,744261.0261.0827827190.5190.5603603

45-6445-64205,745205,745777.6777.6160016001101.51101.522662266

6565++98,74298,7424933.34933.3487148714397.94397.943434343

TotalsTotals1,000,0001,000,0007886788677067706

Expected deaths for Group A for age group 65+ = Expected deaths for Group A for age group 65+ = (98,742)(4933.3)/100,000 = 4871(98,742)(4933.3)/100,000 = 4871

Age adjusted rate for Age adjusted rate for Group AGroup A = = 788.6788.6)=)=7886/1,000,0007886/1,000,000*(*(100,000100,000

Age adjusted rate for Age adjusted rate for Group BGroup B = = 770.6770.6)=)=7706/1,000,0007706/1,000,000*(*(100,000100,000

Page 38: Biostatistics iii

April 13, 2023 38

Relative RiskRelative Risk

• Relative risks Relative risks are the ratio of risks for two different are the ratio of risks for two different populations (ratio=a/b). populations (ratio=a/b).

• If the risk (or proportion) of having the outcome is 1/10 If the risk (or proportion) of having the outcome is 1/10 in one population and 2/10 in a second population, then in one population and 2/10 in a second population, then the relative risk is: (2/10) / (1/10) = 2.0the relative risk is: (2/10) / (1/10) = 2.0

• A relative risk >1 indicates increased risk for the group A relative risk >1 indicates increased risk for the group in the numerator and a relative risk <1 indicates in the numerator and a relative risk <1 indicates decreased risk for the group in the numerator.decreased risk for the group in the numerator.

2 group in incidence disease

1 group in incidence diseaseRisk Relative

Page 39: Biostatistics iii

April 13, 2023 39

Odd’s Ratio and Relative RiskOdd’s Ratio and Relative Risk

• Odds ratiosOdds ratios are better to use in case- are better to use in case-control studies (cases and controls are control studies (cases and controls are selected and level of exposure is selected and level of exposure is determined retrospectively)determined retrospectively)

• Relative risksRelative risks are better for cohort studies are better for cohort studies (exposed and unexposed subjects are (exposed and unexposed subjects are chosen and are followed to determine chosen and are followed to determine disease status - prospective)disease status - prospective)

Page 40: Biostatistics iii

April 13, 2023 40

Odd’s Ratio and Relative RiskOdd’s Ratio and Relative Risk

• When we have a two-way classification of When we have a two-way classification of exposure and disease we can approximate the exposure and disease we can approximate the relative risk by the odds ratiorelative risk by the odds ratio

• Relative Risk=Relative Risk=A/(A+B) divided by C/(C+D)A/(A+B) divided by C/(C+D)• Odd’s Ratio= Odd’s Ratio= A/B divided by C/D = AD/BCA/B divided by C/D = AD/BC

ExposureExposure

DiseaseDisease

YesYesNoNo

YesYesAABBA+BA+B

NoNoCCDDC+DC+D

Page 41: Biostatistics iii

April 13, 2023 41

Relationship Between the Two Relationship Between the Two MeasuresMeasures

DCBA

C*B

D*ARR

:by edapproximat becan risk relative theTherefore

B BA

D DC

: thennegative, disease as classified those tocompared small is

positive disease as classified subjects ofnumber theif

B)C(A

D)A(C

DC

C

BA

ARR

Page 42: Biostatistics iii

April 13, 2023 42

Case Control Study ExampleCase Control Study Example• Disease: Pancreatic CancerDisease: Pancreatic Cancer

• Exposure: Cigarette SmokingExposure: Cigarette Smoking

ExposureExposure

DiseaseDisease

YesYesNoNo

YesYes38388181119119

NoNo2256565858

Page 43: Biostatistics iii

April 13, 2023 43

Example ContinuedExample Continued

• Relative risk for exposed vs. non-exposedRelative risk for exposed vs. non-exposed– Numerator- proportion of exposed people that Numerator- proportion of exposed people that

have the diseasehave the disease– Denominator-proportion of non-exposed that Denominator-proportion of non-exposed that

have the diseasehave the disease

– Relative Risk= Relative Risk= (38/119)/(2/58)=9.26(38/119)/(2/58)=9.26

Page 44: Biostatistics iii

April 13, 2023 44

Example ContinuedExample Continued

• Odd’s Ratio for exposed vs. non-exposedOdd’s Ratio for exposed vs. non-exposed– Numerator- ratio of diseased vs. non-Numerator- ratio of diseased vs. non-

diseased in the exposed groupdiseased in the exposed group– Denominator- ratio of diseased vs. non-Denominator- ratio of diseased vs. non-

diseased in the non-exposed groupdiseased in the non-exposed group

– Odd’s Ratio= Odd’s Ratio= (38/81)/(2/56)=(38*56)/(2*81) (38/81)/(2/56)=(38*56)/(2*81) =13.14=13.14

Page 45: Biostatistics iii

April 13, 2023 45

Relative RiskRelative Risk

• Relative risk – the chance that a member of a group Relative risk – the chance that a member of a group receiving some exposure will develop a disease relative to receiving some exposure will develop a disease relative to the chance that a member of an unexposed group will the chance that a member of an unexposed group will develop the same disease.develop the same disease.

• Recall: a RR of 1.0 indicates that the probabilities of Recall: a RR of 1.0 indicates that the probabilities of disease in the exposed and unexposed groups are disease in the exposed and unexposed groups are identical – an association between exposure and disease identical – an association between exposure and disease does not exist.does not exist.

unexposed) |P(disease

exposed)|P(diseaseRR

Page 46: Biostatistics iii

April 13, 2023 46

Relative RiskRelative Risk

• When we have a two-way classification of When we have a two-way classification of exposure and disease we can calculate exposure and disease we can calculate the relative risk the relative risk

ExposureExposure

DiseaseDisease

YesYesNoNo

YesYesAABBA+BA+B

NoNoCCDDC+DC+D

Page 47: Biostatistics iii

April 13, 2023 47

Case Control Study ExampleCase Control Study Example• Disease: Pancreatic CancerDisease: Pancreatic Cancer

• Exposure: Cigarette SmokingExposure: Cigarette Smoking

ExposureExposure

DiseaseDisease

YesYesNoNo

YesYes38388181119119

NoNo2256565858

Page 48: Biostatistics iii

Data Interpretation • Consideration:

1. Accuracy1. critical view of the data

2. investigating evidence of the results

3. consider other studies’ results

4. peripheral data analysis

5. conduct power analysis: type I & type II

Correct Type-II

Type -ICorrect

True

False

True False

Page 49: Biostatistics iii

Types of Errors

If You……When the Null Hypothesis is…

Then You Have…….

Reject the null hypothesis

True (there really

are no difference) Made a Type I Error

Reject the null hypothesis

False (there really

are difference) ☻

Accept the null hypothesis

False (there really are difference)

Made Type II Error

Accept the null hypothesis

True (there really are no difference)

Page 50: Biostatistics iii

• alpha : the level of significance used for establishing type-I error

• β : the probability of type-II error

• 1 – β : is the probability of obtaining

significance results ( power)

• Effect size: how much we can say that the intervention made a significance difference

Page 51: Biostatistics iii

2. Meaning of the results - translation of the results and make it

understandable3. Importance: - translation of the significant findings into

practical findings 4. Generalizability: - how can we make the findings useful for all

the population 5. Implication: - what have we learned related to what has

been used during study

Page 52: Biostatistics iii

POWER--Uses and Misuses

• Sources– Cohen Statistical Power Analysis for the

Behavioral Sciences (gold standard for power)– Kraemer & Thieman How Many Subjects?

(also a good review)

Page 53: Biostatistics iii

Needed Parameters

• Alpha--chance of a Type I error

• Beta--chance of a Type II error

• Power = 1 - beta

• Effect size--difference between groups or amount of variance explained or how much relationship there is between the DV and the IVs

Page 54: Biostatistics iii

Remember this in English?

• Type I error is when you say there is a difference or relationship and there is not

• Type II error is when you say there is no difference or relationship and there really is

Page 55: Biostatistics iii

What Affects Power?

• Size of the difference in means or amount of variance explained (ES)

• alpha

• Unexplained variance

• N

Page 56: Biostatistics iii

Which is more important?

• Type I error more important if possibility of harm or lethal effect

• Type II error more important in relatively unexplored areas of research

• In some studies, Type I and Type II errors may be equally important

Page 57: Biostatistics iii

How to Increase Power1. Increase the n2. Decrease the unexplained variance--control by design or statistics

(e.g. ANCOVA)3. Increase alpha (controversial)4. Use a one tailed test (directional hypothesis)--puts the zone of

rejection all in one tail; same effect as increasing alpha5. Use parametric statistics as long as you meet the assumptions. If

not, parametric statistics are LESS powerful6. Decrease measurement error (decrease unexplained variance)--use

more reliable instruments, standardize measurement protocol, frequent calibration of physiologic instruments, improve inter-rater reliability

Page 58: Biostatistics iii

What is good power?

By tradition, “good” power is 80%

The correct answer is it depends on the nature of the phenomenon and which kind of error is most important in your study. This is a theoretical argument that you have to make.

Using convention (alpha = .05 and power = .80, beta = .20) you are saying that Type I error is _________ as serious as a Type II error

Page 59: Biostatistics iii

Effect Size

How large an effect do I expect exists in the population if the null is false?

OR

How much of a difference do I want to be able to detect?

The larger the effect, the fewer the cases needed to see it. (The difference is so big you can trip on it.)

Page 60: Biostatistics iii

The World According to PowerKraemer & Thiemann

• The more stringent the significance level, the greater the necessary sample size. More subjects are needed for a 1% level than a 5% level

• Two tailed tests require larger sample sizes than one tailed tests. Assessing two directions at the same time requires a greater investment.

• The smaller the effect size, the larger the necessary sample size. Subtle effects require greater efforts.

• The larger the power required, the larger the necessary sample size. Greater protection from failure requires greater effort.

• The smaller the sample size, the smaller the power, ie the greater the chance of failure

Page 61: Biostatistics iii

The World According to PowerKraemer & Thiemann

• If one proposed to go with a sample size of 20 or fewer, you have to be willing to have a high risk of failure or a huge effect size

• To achieve 99% power for a effect size of .01, you need > 150,000 subjects

Page 62: Biostatistics iii

Test Yourself

Keeping the other parameters the same:

• As ES decreases, needed n ____

• As alpha decreases, needed n ____

• Higher power requires _____ n

Page 63: Biostatistics iii

Power for each test

• You do a power analysis for each statistic you are going to use.

• Choose the sample size based on the highest number of subjects from the power analysis.

• Use the most conservative power analysis--guarantees you the most subjects

Page 64: Biostatistics iii

What about multiple time points?

• More time points requires fewer subjects since more is known about the subjects from prior time points as compared to a cross sectional study

• In other words, less variance is unexplained since you have baseline information

• How many fewer? It depends

Page 65: Biostatistics iii

Power analysis and secondary analysis

If you have a set sample size, your power analysis then works backward. You set the n, alpha and ES and determine the power given the first three parameters.

Page 66: Biostatistics iii

Determining ES

If you want to determine effect size from a completed study, you have the n, alpha and power and can work backwards to determine the ES.

Especially important in relatively unexplored areas

Page 67: Biostatistics iii

Power and MR

• ES is the amount of explained variance expected since there may not be group differences, based on past research

• Increasing the number of independent variables _______ sample size needed to achieve adequate power.

Page 68: Biostatistics iii

Sampling Distribution

• A sample statistic is often unequal to the value of the corresponding population parameter because of sampling error.

• Sampling error reflects the tendency for statistics to fluctuate from one sample to another.

• The amount of sampling error is the difference between the obtained sample value and the population parameter.

• Inferential statistics allow researchers to estimate how close to the population value the calculated statistics is likely to be.

• The concept of sampling, which are actually probability distributions, is central to estimates of sampling error.

Page 69: Biostatistics iii

Characteristics of Sampling Distribution

• Sampling error= sample mean-population mean.• Every sample size has a different sampling distribution of

the mean.• Sampling distributions are theoretical, because in

practice, no one draws an infinite number of samples from a population.

• Their characteristics can be modeled mathematically and have determined by a formulation known as the central limit theorem.

• This theorem stipulates that the mean of the sampling distribution is identical to the population mean.

• The average sampling error-the mean of the (mean-μ)s-would always equal zero.

Page 70: Biostatistics iii

Standard Error of the Mean

• The standard deviation of a sampling distribution of the mean has a special name: the standard error of the mean (SEM).

• The smaller the SEM, the more accurate are the sample means as estimates of the population value.

Page 71: Biostatistics iii

• Estimation

• Hypothesis Testing

Both activities use sample statistics (for example, X[ ) to make inferences about a population parameter (μ).

 

71

Page 72: Biostatistics iii

• Why don’t we just use a single number (a point estimate) like, say, X[ to estimate a population parameter, μ?

• The problem with using a single point (or value) is that it will very probably be wrong. In fact, with a continuous random variable, the probability that the variable is equal to a particular value is zero. So, P(X[ =μ) = 0.

• This is why we use an interval estimator. • We can examine the probability that the

interval includes the population parameter.

72

Page 73: Biostatistics iii

Types of Statistical Inference

• Parameter estimation:– It is used to estimate a population value, such as a

mean, relative risk index or a mean difference between two groups.

– Estimation can take two forms:• Point estimation: involves calculating a single statistic to

estimate the parameter. E.g. mean and median. – Disadvantages: they offer no context for interpreting their

accuracy and a point estimate gives no information regarding the probability that it is correct or close to the population value.

• Interval estimation: is to estimate a range of values that has a high probability of containing the population value .

Page 74: Biostatistics iii

• How wide should the interval be? That depends upon how much confidence you want in the estimate.

• For instance, say you wanted a confidence interval estimator for the mean income of a college graduate:

 • The wider the interval, the greater the confidence you

will have in it as containing the true population parameter μ.

74

You might haveThat the mean income is between

100% confidence

$0 and∞$

95% confidence

$35,000 and $41,000

90% confidence

$36,000 and $40,000

80% confidence

$37,500 and $38,500

……0% confidence$38,000) a point estimate(

Page 75: Biostatistics iii

Interval Estimation

• For example, it is more likely the population height mean lies between 165-175cm.

• Interval estimation involves constructing a confidence interval (CI) around the point estimate.

• The upper and lower limits of the CI are called confidence limits.

• A CI around a sample mean communicates a range of values for the population value, and the probability of being right. That is, the estimate is made with a certain degree of confidence of capturing the parameter.

Page 76: Biostatistics iii

Confidence Intervals around a Mean

• 95% CI = (mean + (1.96 x SEM)• This statement indicates that we can be 95% confident that the

population mean lies between the confident limits , and that these limits are equal to 1.96 times the true standard error, above and below the sample mean.

• E.g. if the mean = 61 inches, and SEM = 1, What is 95% CI.– Solution: 95% CI = (61 + (1.96 X 1))

95% CI = (61 + 1.96)95% CI = 59.04 < μ < 62.96

• E.g. if the mean = 61 inches, and SEM = 1, What is 99% CI.– Solution: 99% CI = (61 + (2.58 X 1))

99% CI = (61 + 2.58)99% CI = 58.42 < μ < 63.58

Page 77: Biostatistics iii

Confidence Intervals and the t distribution

• When sample size is small then we cannot use confidence intervals around the mean, instead, we measure confidence intervals by the t-distribution.

• t-distribution is similar to a normal distribution in a standard form.

• The exact shape of the t-distribution is influenced by the number cases in the sample.

• Statisticians have developed tables for the area under the t-distribution for different sample size and probability levels.

• To use this table, we must enter at the appropriate row based on the number of degrees of freedom.

Page 78: Biostatistics iii

Confidence Intervals and the t distribution

• 95% CI = (mean + (t x SEM) – Where mean = the sample mean

T = tables t value at 95% CI for df = N-1SEM = the calculated SEM for the sample data

• E.g. SEM = 1, mean = 61, N = 25, df = 25-1, t for the 95% CI with 24 df is 2.06– Solution:

95% CI = (61 + (2.06 X 1))95% CI = (61 + 2.06)95% CI = 58.95 < μ < 63.06

To compute CIs around a mean with SPSS:Analyze------descriptive stat----explore then click on the statistics

pushbutton.

Page 79: Biostatistics iii

Types of Statistical Inference

• Hypothesis testing:– Hypothesis testing is a second approach to inferential statistics.– Hypothesis testing involves using sampling distributions and the

laws of probability to make an objective decision about whether to accept or reject the null hypothesis.

– The sample may deviate from the defined population’s true nature by certain amount.

– This deviation is called sampling error.– Drawing the wrong conclusion is called an error of inference.– There are two types of errors of inference defined in terms of the

null hypothesis:• Type I error• Type II error

Page 80: Biostatistics iii

• Testing a Claim: Companies often make claims about products. For example, a frozen yogurt company may claim that its product has no more than 90 calories per cup. This claim is about a parameter – i.e., the population mean number of calories per cup (μ).

• The claim is tested is by taking a sample - say, 100 cups - and determining the sample mean. If the sample mean is 90 calories or less we have no evidence that the company has lied. Even if the sample mean is greater than 90 calories, it is possible the company is still telling the truth (sampling error). However, at some point – perhaps, say, a sample average of 500 calories per cup – it will be clear that the company has not been completely truthful about its product.

80

Page 81: Biostatistics iii

• A hypothesis is made about the value of a parameter, but the only facts available to estimate the true parameter are those provided by the sample. If the statistic differs (and of course it will) from the hypothesis stated about the parameter, a decision must be made as to whether or not this difference is significant. If it is, the hypothesis is rejected. If not, it cannot be rejected.

• H0: The null hypothesis. This contains the hypothesized parameter value which will be compared with the sample value.

• H1: The alternative hypothesis. This will be “accepted” only if H0 is rejected.

Technically speaking, we never accept H0 What we actually say is that we do not have the evidence to reject it.

81

Page 82: Biostatistics iii

• Two types of errors may occur: α (alpha) and β (beta). The α error is often referred to as a Type I error and β error as a Type II error.– You are guilty of an alpha error if you reject H0 when it

really is true.

– You commit a beta error if you “accept” H0 when it is false.

82

Page 83: Biostatistics iii

• This alpha error is related to the (1- α) we just learned about when constructing confidence intervals. We will soon see that an error of .05 in testing a hypothesis (two-tail test) is equivalent to a confidence of 95% in constructing a two-sided interval estimator.

83

-Z/2 Z/2

/2 /2

Page 84: Biostatistics iii

TRADEOFF!

•There is a tradeoff between the alpha and beta errors. We cannot simply reduce both types of error. As one goes down, the other rises.•As we lower the error, the β error goes up: reducing the error of rejecting H0 (the error of rejection) increases the error of “Accepting” H0 when it is false (the error of acceptance).

•This is similar (in fact exactly the same) to the problem we had earlier with confidence intervals. Ideally, we would love a very narrow interval, with a lot of confidence. But, practically, we can never have both: there is a tradeoff.

84

Page 85: Biostatistics iii

• Our legal system understands this tradeoff very well. – If we make it extremely difficult to convict criminals

because we do not want to incarcerate any innocent people we will probably have a legal system in which no one gets convicted.

– On the other hand, if we make it very easy to convict, then we will have a legal system in which many innocent people end up behind bars.

– This is why our legal system does not require a guilty verdict to be “beyond a shadow of a doubt” (i.e., complete certainty) but “beyond reasonable doubt.”

85

Page 86: Biostatistics iii

• Quality Control.– A company purchases chips for its smart phones, in

batches of 50,000. The company is willing to live with a few defects per 50,000 chips. How many defects?

– If the firm randomly samples 100 chips from each batch of 50,000 and rejects the entire shipment if there are ANY defects, it may end up rejecting too many shipments (error of rejection). If the firm is too liberal in what it accepts and assumes everything is “sampling error,” it is likely to make the error of acceptance.

– This is why government and industry generally work with an alpha error of .05

86

Page 87: Biostatistics iii

 

1.Formulate H0 and H1. H0 is the null hypothesis, a hypothesis about the value of a parameter, and H1 is an alternative hypothesis.

– e.g., H0: µ=12.7 years; H1: µ≠12.7 years

2.Specify the level of significance (α) to be used. This level of significance tells you the probability of rejecting H0 when it is, in fact, true. (Normally, significance level of 0.05 or 0.01 are used)

3.Select the test statistic: e.g., Z, t, F, etc. So far, we have been using the Z distribution. We will be learning about the t-distribution (used for small samples) later on.

4.Establish the critical value or values of the test statistic needed to reject H0. DRAW A PICTURE!

5.Determine the actual value (computed value) of the test statistic.

6.Make a decision: Reject H0 or Do Not Reject H0.

87

Page 88: Biostatistics iii

 

•When we Formulate H0 and H1, we have to decide whether to use a one-tail or two-tail test. •With a “two-tail” hypothesis test, α is split into two and put in both tails. H1 then includes two possibilities: μ = # OR μ ≠ #. This is why the region of rejection is divided into two tails. Note that the region of rejection always corresponds to H1.

• With a “one-tail” hypothesis test, the α is entirely in one of the tails.

Hypothesis Testing 88

Page 89: Biostatistics iii

•For example, if the company claims that a certain product has exactly 1 mg of aspirin, that would result in a two-tail test. Note words like “exactly” suggest two tail tests. There are problems with too much aspirin and too little aspirin in a drug.•On the other hand, if a firm claims that a box of its raisin bran cereal contains at least 100 raisins, a one-tail test has to be used. If the sample mean is more than 100, everything is ok. The problems arise only if the sample mean is less than 100. The question will be whether we are looking at sampling error or perhaps the company is lying and the true (population) mean is less than 100 raisins.

89

Page 90: Biostatistics iii

•A company claims that its soda vending machines deliver exactly 8 ounces of soda. Clearly, You do not want the vending machines to deliver too much or too little soda. How would you formulate this?

Answer: H0: µ = 8 ouncesH1: µ ≠ 8 ounces

If you are testing at α=.01, The .01 is split into two: .005 in the left tail and .005 in the right tail The critical values are ±2.575

90

-2.575 2.575

.005 .005

Page 91: Biostatistics iii

•A company claims that its bolts have a circumference of exactly 12.50 inches. (If the bolts are too wide or narrow, they will not fit properly):

Answer: H0: µ = 12.50 inchesH1: µ ≠ 12.50 inches

•A company claims that a slice of its bread has exactly 2 grams of fiber. Formulate this:

Answer: H0: µ = 2 gramsH1: µ ≠ 2 grams

91

Page 92: Biostatistics iii

 

•A company claims that its batteries have an average life of at least 500 hours. How would you formulate this?

Answer: H0: µ 500 hours≧H1: µ < 500 hours

If you are testing at an α = .05, The entire .05 is in the left tail (hint: H1 points to where the rejection region should be.) The critical value is -1.645.

92

Page 93: Biostatistics iii

 A company claims that its overpriced, bottled spring water has no more than 1 mcg of benzene (poison). How would you formulate this:

Answer: H0: µ 1 mcg. benzene≦H1: µ > 1 mcg. benzene

If you are testing at an α = .05, The entire .05 is in the right tail (hint: H1 points to where the rejection region should be.) The critical value is +1.645.

93

.05

1.645

Page 94: Biostatistics iii

A pharmaceutical company claims that each of its pills contains exactly 20.00 milligrams of Cumidin (a blood thinner). You sample 64 pills and find that the sample mean X[ =20.50 mg and s = .80 mg. Should the company’s claim be rejected? Test at α = 0.05. •Formulate the hypotheses

H0: µ =20.00 mg H1: µ 20.00 mg

•Choose the test statistic and find the critical values; draw region of rejection

Test statistic: Z

At α = 0.05, the critical values are ±1.96.

•Use the data to get the calculated value of the test statistic

Z = = = 5 [ .80/√.64 = .10 This is the standard error of the mean. ] 

•Come to a Conclusion: Reject H0 or Do Not Reject H0

The computed Z value of 5 is deep in the region of rejection. Thus, Reject H0 at p < .05

94

Page 95: Biostatistics iii

• Suppose we took the above data, ignored the hypothesis, and constructed a 95% confidence interval estimator.

20.50 1.96(.10)

95%, CIE: 20.304 mg 20.696 mg• We note that 20.00 mg is not in this interval. • As you can see, hypothesis testing and CIE are virtually the same

exercise; they are merely two sides of the same coin. Both rely on the sample evidence.

• If a claim is made about a parameter, do a hypothesis test. If no claim is made and a company wants to use sample evidence to estimate a parameter (perhaps to determine what claims may be made in the future about a parameter), construct a confidence interval estimator.

95

Page 96: Biostatistics iii

• A company claims that its LED bulbs will last at least 8,000 hours. You sample 100 bulbs and find that X[ =7,800 hours and s=800 hours. Should the company’s claim be rejected? Test at α = 0.05. 

• H0: µ 8,000 hours≧H1: µ < 8,000 hours

• Z = 7,800 – 8,000 / (800/√100) = -200/80 = -2.50 • [800/√100 = 80, the standard error of the mean]

• The computed Z value of -2.50 is in the region of rejection. Thus, reject H0 at p < .05– Note: When testing a hypothesis, we often have to perform a one-tail test if the claim

requires it. However, we will always use only two-sided confidence interval estimators when using sample statistics to estimate population parameters.

96

5%

-1.645

Page 97: Biostatistics iii

• In estimating µ based on sample statistics, how large a sample do we need for the level of precision we want? –To determine the sample size we need, we must

know the (1) desired precision and (2) σ.

• e, the half-width of the confidence interval estimator is the precision with which we are estimating. e is also called sampling error.

97

ecisione

nZX

Pr

/

Page 98: Biostatistics iii

…continued

We use e to solve for n:

If then

and so

98

n

Ze

e

Zn

2

22

e

Zn

Page 99: Biostatistics iii

99

2

22

10

2096.1n

Page 100: Biostatistics iii

• Similarly, taking e (precision) from formula for the half-width of a confidence interval estimator for P:

• Q: If we are trying to estimate the population proportion, P, what do we use for P in this formula?

100

2

2 )1(

e

PPZ

Page 101: Biostatistics iii

Suppose a pollster wants a maximum error of e = .01 with 95% confidence. We assume that variance is the highest possible, so we use P=.5. This is the way we ensure that sampling error will be within ±.01 of the true population Proportion.Then,n = = 9,604

That is a VERY large sample.

101

2

2

01.

)5.1(5.96.1

Page 102: Biostatistics iii

…continued

Let’s try that again with e = .03.

 

n = = 1,067

This is the sample size that most pollsters work with.

102

2

2

03.

)5.1(5.96.1