Download - Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Transcript
Page 1: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Sample size calculation

Dr Sa’ed H. Zyoud

Page 2: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Testing hypothesis (Outcomes)Decision ErrorsTwo types of errors can result from a hypothesis test.

• Type I error. occurs when the researcher rejects a null hypothesis when it is true. The probability of committing a Type I error is called the significance level. This probability is also called alpha (α).

• Type II error. A Type II error occurs when the researcher fails to reject a null hypothesis that is false. The probability of not committing a Type II error is called the Power of the test. The probability of committing a Type II error is called Beta (β).

.

Page 3: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Factors that affect the sample size

1. Power of the study

- The power of a study is the probability of detecting a real difference. In other words, it is same as the probability of making a positive diagnosis when the disease is present.

- For a good study one should have to take at least 80% power.

- An increase in the sample size or a greater difference between the control and the test groups leads to an increase in the power of the test.

Page 4: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

2. Level of significance

- Level of significance is the probability of rejecting null hypothesis when it is true.

- This is the most important factor in determination of sample size.

- Therefore, the level of significance must be fixed before the testing of hypothesis, estimation and sample size calculation. In a standard situation, the probability can be taken as 0.05 or 0.01.

Page 5: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Estimating a proportion

Page 6: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

1. Raosoft sample size calculator

• An automated software program, (Raosoft sample size calculator: (http://www.raosoft.com/samplesize.html)

is used to calculate the required sample size for this study.

Page 7: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.
Page 8: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Raosoft sample size calculator

• The estimated sample size is …….. patients out of the ………. eligible patients registered in the public health care clinics.

Page 9: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Raosoft sample size calculator

• In order to minimize erroneous results and increase the study reliability, the target sample size will be increased 5% to 10%.

Page 10: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

2. Danial sample size formula

• The sample size formula (Daniel, 1999) is used, which is

• If your population more than 10.000

Where

• Z: statistic for a level of confidence. (For the level of confidence of 95%, which is conventional, Z value is 1.96).

• P: expected prevalence or proportion. (P is considered 0.5)

• d: precision. (d is considered 0.05 to produce good precision and smaller error of estimate)

Page 11: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

• A hospital administrator wishes to know what proportion of discharged patients is unhappy with the care received during hospitalization. If 95% Confidence interval is desired to estimate the proportion within 5%, how large a sample should be drawn?

• n = Z2 p(1-p)/d2 =(1.96)2(.5×.5)/(.05)2 =384.2 ≈385 patients

Page 12: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Adjusted sample for population less than 10.000

• n / (1+ (n/population)) = adjusted sample• Where

n= calculated sample size from Danial formula

Page 13: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

3. Pocock’s sample size formula

• Pocock’s sample size formula which is a common formula for comparing two proportions can be used.

• This equation provides a continuity corrected value intended to be used with Chi-square or Fischer’s exact tests (Pocock, 1983) .

Page 14: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Pocock’s sample size formula

• n = [P1 (1-P1) + P2 (1-P2)] ( Zα/2 + Z β) 2• (P1-P2)2

• Where:

• n: required sample size

• P1: estimated proportion of study outcome in the exposed group

• P2: estimated proportion of study outcome in the unexposed group

• α: level of statistical significance

• Zα/2: Represents the desired level of statistical significance (typically 1.96 for α = 0.05)

• Z β: Represents the desired power (typically 0.84 for 80% power)

• n for each group *2= total sample (i.e. for the 2 groups)

Page 15: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Typical values for significance level and power

Page 16: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

4. Altman’s nomogram (Altman 1980)n = total sample (i.e. for the 2 groups)

Page 17: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

• P = (P1 +P2)• 2• Where: • P: mean of the two proportions• P1: estimated proportion of study outcome in the

exposed group • P2: estimated proportion of study outcome in the

unexposed group • Standardised difference = (P1 – P2) • √ [P (1- P)]

Page 18: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Pocock’s sample size formula• This equation assumes that the comparison is to

be made across two equally sized groups.

• However, comparisons in observational studies are mainly made across two unequally sized groups.

• In this case, the sample size should be adjusted according to the actual ratio of the two groups in order to reflect the inequality (Whitley and Ball, 2002).

Page 19: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

• The adjusted sample size (nadjusted) depends on the following formula (Whitley and Ball 2002):

• • nadjusted = n × (k +1)2

4 k

where: • n: sample size = total sample (i.e. for the 2 groups)• k: actual ratio of the two groups

Page 20: Sample size calculation Dr Sa’ed H. Zyoud. Testing hypothesis (Outcomes) Decision Errors Two types of errors can result from a hypothesis test. Type I.

Estimating a mean

• n = Z2 σ2 / d2

Where “

• Z: statistic for a level of confidence. (For the level of confidence of 95%, which is conventional, Z value is 1.96).

• σ: estimated standard deviation from previous studies• d: precision. (d is considered 0.05 to produce good

precision and smaller error of estimate)