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
2 of the 2 questions in our bank on this topic. Choose an answer to see why every option is right or wrong.
Confidence limits define the:
Answer: Range likely to contain the true mean
Confidence limits are the upper and lower bounds of a confidence interval, such as 95%, within which the true population parameter is expected to lie. They are calculated from the sample mean and standard error.
Confidence limits
- 95% CI = mean ± 1.96 SE
- Limits bound the true population mean
- Wider with small samples
Remember Confidence limits bound the range in which the true population value likely lies.
Why the other options are wrong
- Spread of data around the mean That describes the standard deviation.
- Difference between mean and median That describes skewness, not an estimate of the population mean.
- Probability of a type I error That is the significance level alpha.
- Range of all sample values That is the range of the data, not an estimate of the population parameter.
A random sample of 100 healthy adult men has a mean haemoglobin of 14.0 g/dL with a standard deviation of 2.0 g/dL. Within which range does the population mean lie with 95% confidence?
Answer: 13.6 to 14.4 g/dL
The standard error of the mean is SD divided by the square root of n: 2.0 / 10 = 0.2 g/dL. The 95% confidence limits are the sample mean plus or minus about two standard errors: 14.0 plus or minus 0.4, so 13.6 to 14.4 g/dL. The standard deviation describes the spread of individual values; the standard error describes how precisely the sample mean estimates the population mean.
Confidence limits
- SE = SD / square root of n
- 95% limits = mean plus or minus 2 SE
- SD: spread of individual values
- SE: precision of the sample mean
Remember 95% confidence limits: mean plus or minus 2 standard errors.
Why the other options are wrong
- 10.0 to 18.0 g/dL Mean plus or minus 2 SD: the range of about 95% of individual values, not of the mean.
- 12.0 to 16.0 g/dL Mean plus or minus 1 SD: the range of about 68% of individual values.
- 13.8 to 14.2 g/dL Mean plus or minus 1 SE: only about 68% confidence.
- 13.96 to 14.04 g/dL Divides SD by n (100) instead of by the square root of n (10).
Where this sits in the CPSP syllabus
- Paper 1: Biostatistics, Probability, estimation and confidence intervals