Confidence intervals
Probability, Standard Error and Confidence Intervals in Biostatistics
Addition and multiplication rules of probability, genetic risk calculations, standard error, and how to calculate and interpret a 95% confidence interval. Includes worked examples on blood groups, carrier frequency, CI width and significance for FCPS Part 1.
Probability basics
- Probability runs from 0 (impossible) to 1 (certain); it may be written as a fraction, decimal or percentage.
- The probabilities of all possible outcomes add up to 1, so P(not A) = 1 − P(A).
- Odds = p ÷ (1 − p); probability = odds ÷ (1 + odds). A probability of 0.2 equals odds of 0.25 (1 to 4).
The addition rule: "or"
- For mutually exclusive events (cannot happen together): P(A or B) = P(A) + P(B).
- Blood groups are mutually exclusive: if 40% of people are group O and 45% group A, the chance that a random person is O or A = 0.40 + 0.45 = 0.85.
- For events that can happen together, subtract the overlap: P(A or B) = P(A) + P(B) − P(A and B). If 30% smoke and 20% are diabetic, and 6% are both, P(smoker or diabetic) = 0.30 + 0.20 − 0.06 = 0.44.
Exam trap Before adding, check whether the events can occur together; if they can, subtract the overlap.
The multiplication rule: "and"
- For independent events (one does not affect the other): P(A and B) = P(A) × P(B).
- Two children both boys = 0.5 × 0.5 = 0.25; three girls in a row = 0.5³ = 0.125.
- Conditional probability: P(A given B) = P(A and B) ÷ P(B). Bayes' theorem turns pre-test probability into post-test probability and underlies predictive values.
Remember "Or" means add (if exclusive); "and" means multiply (if independent).
Probability in genetics
| Situation | Risk for each child |
|---|---|
| Autosomal dominant, one heterozygous parent (Marfan, Aa × aa) | 1 in 2 (50%) affected |
| Autosomal recessive, both parents carriers (cystic fibrosis, Aa × Aa) | 1 in 4 affected, 1 in 2 carriers, 1 in 4 unaffected non-carriers |
| Unaffected sibling of an AR-affected child | 2 in 3 chance of being a carrier |
| X-linked recessive, carrier mother and normal father | Half of sons affected; half of daughters carriers |
- Each pregnancy is independent: having one affected child does not change the risk for the next. Two carrier parents have a 1/4 × 1/4 = 1/16 chance that two children are both affected.
- Carrier frequency from disease frequency (Hardy–Weinberg): if an autosomal recessive disease affects 1 in 10,000, q² = 1/10,000, so q = 1/100, and carrier frequency 2pq is about 2q = 1 in 50. For CF at 1 in 2,500, q = 1/50 and carriers are about 1 in 25.
Estimation
- A point estimate is the single best value from the sample (mean, proportion, RR). An interval estimate (the confidence interval) gives a range around it showing how precise it is.
- Sample statistics estimate population parameters; they vary from sample to sample by chance.
Standard error
- Standard error of the mean (SE) = SD ÷ √n. It is the SD of the means you would get if you repeated the sampling many times, so it measures the precision of the sample mean.
- SD describes the scatter of individuals; SE describes the uncertainty in the estimate. A study of 10,000 people has the same SD as one of 100 but a much smaller SE.
- SE of a proportion = √[p(1 − p) ÷ n].
- SE falls with the square root of n: quadrupling the sample halves the SE.
- The main use of the SE is to calculate confidence intervals (and test statistics).
- Central limit theorem: means of large samples (over about 30) are approximately normally distributed even when the data are not, which is why ±1.96 SE works.
Confidence intervals
- 95% CI = estimate ± 1.96 × SE; 99% CI = estimate ± 2.58 × SE; 90% CI = estimate ± 1.645 × SE.
- Meaning: if the study were repeated many times, 95% of the intervals calculated would contain the true population value. Informally, we are 95% confident the true value lies inside.
- A CI is narrower with a larger sample, less variability and a lower confidence level (a 90% CI is narrower than a 99% CI).
- The CI shows both statistical significance and clinical importance: its position shows the size of the effect and its width shows precision, which a p value alone cannot.
| Estimate type | No-effect value | Significant at 5% if 95% CI |
|---|---|---|
| Difference (means, proportions, ARR) | 0 | Excludes 0 |
| Ratio (RR, OR, HR) | 1 | Excludes 1 |
- Non-overlapping CIs for two groups imply a significant difference; overlapping CIs do not by themselves prove there is none, and a formal test is needed.
Worked examples
- Mean BP: sample mean 130 mmHg, SD 20, n = 100. SE = 20 ÷ 10 = 2; 95% CI = 130 ± 1.96 × 2 = 130 ± 3.9, so about 126 to 134 mmHg. With n = 400, SE = 1 and the CI narrows to about 128 to 132.
- Prevalence: 20% in a sample of 400. SE = √(0.2 × 0.8 ÷ 400) = 0.02; 95% CI = 20% ± 3.9%, about 16% to 24%.
- Ratios: RR 1.5 (95% CI 0.9 to 2.4) is not significant because it includes 1; RR 1.5 (1.1 to 2.0) is significant.
- Differences: mean fall in BP 5 mmHg (95% CI −1 to 11) is not significant because it includes 0.
Exam trap A confidence interval is about the population value, not about where 95% of individual patients lie; that is mean ± 1.96 SD.
Degrees of freedom
- The number of values free to vary once a statistic is fixed: n − 1 for a single sample SD or one-sample t-test; (rows − 1) × (columns − 1) for chi-squared, so a 2 × 2 table has 1 degree of freedom.
How FCPS asks about this
- Probability of group O or group A when 40% are O and 45% are A: 0.85 (mutually exclusive, so add).
- Two independent events together: multiply the probabilities.
- Both parents CF carriers: each child has a 1 in 4 chance of being affected.
- Autosomal recessive disease at 1 in 10,000: carrier frequency about 1 in 50.
- Primary use of the standard error of the mean: calculating confidence intervals; SE = SD ÷ √n.
- 95% CI from mean 130, SD 20, n 100: about 126 to 134.
- RR with 95% CI including 1: not statistically significant.
Test yourself on this topic
5 of the 8 questions in our bank on this topic. Choose an answer to see why every option is right or wrong.
A paper reports birthweights as 'mean 3.1 kg (SD 0.5 kg)' and the precision of the mean as 'SE 0.05 kg'. What does the standard deviation describe, as opposed to the standard error?
Answer: Spread of individual values
SD describes how spread out individual observations are; it does not shrink much as the sample grows. SE (= SD ÷ √n) describes how much sample means would vary if the study were repeated, i.e. precision of the estimate; it shrinks as n increases (here SD 0.5 ÷ √100 = 0.05, so n = 100). SE is used to construct confidence intervals (mean ± 1.96 SE for 95%). Use SD to describe data and SE or CI to describe the estimate.
SD vs SE
- SD: spread of individuals
- SE = SD ÷ √n: precision of mean
- 95% CI = mean ± 1.96 SE
Remember SD describes people; SE describes the estimate.
Why the other options are wrong
- Precision of the sample mean That is the standard error.
- Difference between two means That is the effect size.
- Probability the result is chance That is the p value.
- Reference range width ÷ 4 Not the definition.
A trial reports a relative risk of 0.8 with a 95% confidence interval of 0.6 to 1.1. What can be concluded?
Answer: Not significant: CI includes 1
A 95% confidence interval gives the range likely to contain the true value. For ratios (RR, OR), an interval that includes 1 means no significant difference at the 5% level. For differences in means, the 'no effect' value is 0. Narrower intervals come from larger samples.
Confidence intervals
- Ratio CI includes 1 → not significant
- Difference CI includes 0 → not significant
- 95% CI ≈ mean ± 1.96 SE
Remember Crosses the line of no effect = no proof.
Why the other options are wrong
- Treatment definitely cuts risk by 20% The interval includes no effect.
- Significant at p < 0.01 Not significant even at 0.05.
- Treatment increases risk Point estimate suggests a reduction, not an increase.
- Sample size was too large Not shown.
The probability that a baby is a boy is 0.5, and the probability of blood group O is 0.4, independently. What is the probability that a baby is a boy with blood group O?
Answer: 0.2
For independent events, the probability that both occur is the product of their probabilities (multiplication rule): 0.5 × 0.4 = 0.2. The addition rule is used for 'either/or': for mutually exclusive events, P(A or B) = P(A) + P(B). For events that can occur together, P(A or B) = P(A) + P(B) − P(A and B). Adding 0.5 and 0.4 would answer a different question.
Probability rules
- Both (independent): multiply
- Either (mutually exclusive): add
- Either (overlapping): add − both
- Probabilities lie between 0 and 1
Remember And means multiply; or means add.
Exam trap Multiply only when events are independent.
Why the other options are wrong
- 0.9 This adds the probabilities.
- 0.1 This subtracts them.
- 0.45 This averages them.
- 0.5 This ignores blood group.
A study of 400 term babies in Multan reports a mean birth weight of 2.9 kg with a 95% confidence interval of 2.85 to 2.95 kg. What does this confidence interval mean?
Answer: The range likely to contain the true mean
A 95% confidence interval is a range calculated from the sample within which the true population mean is expected to lie; if the study were repeated many times, 95% of such intervals would contain the true mean. It reflects the precision of the estimate, is based on the standard error and narrows as sample size grows. It does not describe the spread of individual birth weights, which is given by the standard deviation.
95% confidence interval
- Likely range of the true population value
- Based on the standard error
- Narrows with larger samples
- Not the spread of individuals
Remember CI is about the mean, SD is about the people.
Exam trap A narrow confidence interval shows precision, not that the result is free of bias.
Why the other options are wrong
- The range of 95% of birth weights That is described by mean ± 1.96 SD of individual values.
- The range of normal birth weights A clinical reference range, not this.
- The probability the study is correct Not what a confidence interval means.
- The weights of 95% of the sample Describes spread of individuals, not precision of the mean.
A couple have two sons and hope their next two babies will both be girls. Assuming each birth is independent and the chance of a girl is 0.5, what is the probability that both of their next two babies are girls?
Answer: 0.25
For independent events, the probability that both occur is the product of their separate probabilities (the multiplication rule): 0.5 × 0.5 = 0.25. The previous two sons do not change the probability for later births, because each birth is independent. The probability of at least one girl in the next two births is 1 − 0.25 = 0.75.
Multiplication rule
- Independent events: multiply
- 0.5 × 0.5 = 0.25
- Past births do not change the odds
- 'At least one' = 1 − none
Remember And means multiply; or means add (for exclusive events).
Exam trap Believing a girl is 'due' after two boys is the gambler's fallacy.
Why the other options are wrong
- 0.5 The probability for a single birth.
- 0.125 The probability for three births in a row.
- 0.75 The probability of at least one girl.
- 1.0 Certainty; not possible here.
Where this sits in the CPSP syllabus
- Paper 1: Biostatistics, Probability, estimation and confidence intervals