Part 6 · Module 1
Estimating One Population Mean
Learn how to estimate a population mean using a sample mean, standard error and confidence interval, with reproducible R code and output.
Learning outcomes
After completing this lecture, you should be able to:
- Define the population mean, sample mean, standard error and confidence interval for one numerical outcome.
- Calculate a sample mean, standard deviation, standard error and t-based 95% confidence interval.
- Identify the assumptions required when estimating one population mean.
- Use reproducible base-R code to estimate and present one population mean.
- Interpret the confidence interval without confusing participant variability with estimator precision.
- Report the estimate, uncertainty, units, denominator and missing observations appropriately.
Overview
A sample mean is commonly used to estimate the mean of a numerical outcome in a target population.
Examples include:
- mean systolic blood pressure among adults receiving hypertension care;
- mean haemoglobin concentration among pregnant women attending a clinic;
- mean birth weight among eligible live births;
- mean hospital cost per admission; and
- mean patient-reported outcome score after treatment.
The point estimate alone is incomplete. Researchers should also report a measure of participant variability and a confidence interval for the population mean.
This lecture focuses on estimating one population mean from one independent sample. It uses a t-based confidence interval because the population standard deviation is unknown and must be estimated from the sample. Confidence intervals should be prioritised over isolated significance tests when the objective is estimation [1].
Why this matters
Suppose a sample has mean systolic blood pressure of 136.4 mmHg.
The number does not show:
- how variable participant measurements are;
- how precisely the population mean has been estimated;
- how many participants contributed;
- whether observations were selected appropriately;
- whether important values are missing; or
- whether the sample represents the intended population.
The standard deviation and standard error answer different questions [2]:
- standard deviation: how much do participant measurements vary?
- standard error: how much would the estimated mean vary across repeated samples under the design?
The confidence interval combines the estimate with its standard error to show a range of population means reasonably compatible with the observed data and statistical assumptions.
When to use this method
Use estimation of one population mean when:
- one numerical outcome is observed;
- the research objective concerns the arithmetic population mean;
- one independent analytical unit contributes one value;
- the sampling process supports inference to a defined population; and
- a confidence interval for the mean is required.
The method is not appropriate merely because a variable is numerical.
Another quantity may be preferable when:
- the median is the estimand;
- the outcome is ordinal rather than genuinely numerical;
- the distribution has a clinically important mixture of subpopulations;
- several measurements belong to the same participant;
- sampling weights or clusters must be represented;
- the outcome is censored; or
- the scientific objective concerns a proportion, rate or other parameter.
Research question and variables
The research question is:
What is the mean systolic blood pressure among eligible adults attending the hypertension follow-up service during the defined month?
The statistical parameter is the population mean:
where is systolic blood pressure in the target population.
The sample estimate is:
The analysis contains:
- one outcome: systolic blood pressure;
- one independent sample;
- no comparison group;
- no null reference value;
- one value per participant.
Because the objective is estimation, a hypothesis-test p-value is not required.
Data structure
One row should represent one participant.
Simulated systolic-blood-pressure sample
simulated dataTable 1. First eight participant records
| participant_id | sbp_mmHg |
|---|---|
| H001 | 135 |
| H002 | 129 |
| H003 | 144 |
| H004 | 142 |
| H005 | 142 |
| H006 | 143 |
| H007 | 126 |
| H008 | 126 |
Note: The complete simulated dataset contains 40 independent participants. Systolic blood pressure is measured in mmHg.
The analysis dataset should also preserve:
- eligibility status;
- measurement date;
- missing-value status;
- measurement protocol;
- and any sampling-design variables.
The numerical vector alone is sufficient for the worked calculation, but not for full study governance.
Statistical assumptions
Independence
The simple formula assumes independent observations.
Forty blood-pressure readings from 40 participants provide different information from 40 readings taken from one participant. Repeated measurements require a method that represents within-participant correlation.
Distributional shape
The exact one-sample t interval is derived under a normal population model when the population variance is unknown [3].
The method is often reasonably robust to moderate non-normality, particularly as sample size increases and no observation dominates the mean. However, severe skewness, heavy tails or influential values can affect coverage and interpretation [4].
A histogram, dot plot and quantile–quantile plot are more informative than relying solely on a formal normality-test p-value.
Sampling and bias
A mathematically correct confidence interval does not correct:
- convenience sampling;
- systematic nonresponse;
- measurement bias;
- incorrect eligibility;
- or poor population coverage.
A narrow interval around a biased estimate remains misleading.
How the method works
Sample mean
Sample standard deviation
Standard error of the mean
Confidence interval
When the population standard deviation is unknown, the two-sided t-based confidence interval is:
For a 95% interval, .
Worked example
Reproducible R analysis
The following base-R code creates the complete simulated dataset, calculates the estimate and produces a cleaned output table. R is an open statistical-computing environment; the functions used here are part of base R and the standard stats package [5].
bp <- data.frame(
participant_id = sprintf("H%03d", 1:40),
sbp_mmHg = c(
135, 129, 144, 142, 142, 143, 126, 126, 125, 120,
152, 144, 132, 140, 141, 132, 131, 125, 145, 133,
118, 145, 154, 128, 120, 153, 144, 144, 142, 141,
133, 120, 152, 124, 151, 126, 145, 126, 122, 159
)
)
n <- sum(!is.na(bp$sbp_mmHg))
mean_sbp <- mean(bp$sbp_mmHg, na.rm = TRUE)
sd_sbp <- sd(bp$sbp_mmHg, na.rm = TRUE)
se_sbp <- sd_sbp / sqrt(n)
t_critical <- qt(0.975, df = n - 1)
ci_sbp <- mean_sbp + c(-1, 1) * t_critical * se_sbp
result <- data.frame(
n = n,
mean_mmHg = round(mean_sbp, 2),
sd_mmHg = round(sd_sbp, 2),
se_mmHg = round(se_sbp, 2),
ci_lower = round(ci_sbp[1], 2),
ci_upper = round(ci_sbp[2], 2)
)
print(result, row.names = FALSE)
# Reproducibility checks
R output
n mean_mmHg sd_mmHg se_mmHg ci_lower ci_upper
40 136.35 11.16 1.76 132.78 139.92
The explicit data vector allows readers to regenerate the analysis and independently verify the displayed values.
R code for distribution checks
par(mfrow = c(1, 2))
hist(
bp$sbp_mmHg,
main = "Systolic blood pressure",
xlab = "Systolic blood pressure (mmHg)"
)
qqnorm(
bp$sbp_mmHg,
main = "Normal Q-Q plot"
)
qqline(bp$sbp_mmHg)
par(mfrow = c(1, 1))
The plots should be interpreted together with the clinical context and data-cleaning record. They should not be reduced to a single automatic pass-or-fail decision.
Interpreting the output
The interval does not mean that 95% of participants have systolic blood pressure between 132.8 and 139.9 mmHg.
It also does not mean that this particular interval has a 95% probability of containing the fixed population mean. The 95% level describes the long-run performance of the interval procedure.
Presenting the results
Table 2. Estimated mean systolic blood pressure
Observed n | Mean (SD), mmHg | SE, mmHg | 95% CI for population mean, mmHg |
|---|---|---|---|
| 40 | 136.4 (11.2) | 1.8 | 132.8 to 139.9 |
Note: CI = confidence interval; SD = standard deviation; SE = standard error. All values are simulated.
The SD and CI should not be displayed as though they are interchangeable.
The table should also state the number missing if any values were unavailable.
Suggested reporting
What changes under a complex sampling design? MMed extension
The simple formula assumes an independent simple random sample.
A stratified, clustered or unequally weighted survey may require design-based estimation. The point estimate may become a weighted mean, and the standard error must reflect:
- sampling weights;
- strata;
- clusters;
- finite-population information;
- and the target population.
Using the simple formula after cluster sampling can understate uncertainty because participants within the same cluster may be correlated.
Common mistakes
Knowledge check
What population quantity is estimated in this lecture?
Answer and reasoning
The arithmetic mean systolic blood pressure among the defined clinic population. The sample mean is the point estimate of that population parameter.
What is the difference between the SD of 11.2 mmHg and the SE of 1.8 mmHg?
Answer and reasoning
The SD describes variation among participant blood-pressure measurements. The SE describes estimated sample-to-sample variation of the sample mean under the design.
Does the 95% CI of 132.8 to 139.9 mmHg contain 95% of participant measurements?
Answer and reasoning
No. It is an interval for the population mean. A reference interval or prediction interval would address individual observations and would be much wider.
Why is no p-value required for the primary objective?
Answer and reasoning
The objective is to estimate one population mean, not to test it against a prespecified null value. The mean and confidence interval answer the stated question directly.
Can this simple interval be used unchanged for 40 measurements taken from ten participants?
Answer and reasoning
No. Measurements within participants are correlated. A repeated-measurement or participant-level analysis is required to represent the dependence and define the estimand.
Key take-home messages
References
- Gardner MJ, Altman DG. Confidence intervals rather than P values: estimation rather than hypothesis testing. Br Med J (Clin Res Ed). 1986;292(6522):746–750. https://doi.org/10.1136/bmj.292.6522.746
- Altman DG, Bland JM. Standard deviations and standard errors. BMJ. 2005;331(7521):903. https://doi.org/10.1136/bmj.331.7521.903
- Student. The probable error of a mean. Biometrika. 1908;6(1):1–25. https://doi.org/10.1093/biomet/6.1.1
- Lumley T, Diehr P, Emerson S, Chen L. The importance of the normality assumption in large public health data sets. Annu Rev Public Health. 2002;23:151–169. https://doi.org/10.1146/annurev.publhealth.23.100901.140546
- R Core Team. R: a language and environment for statistical computing. Version 4.6.1. Vienna: R Foundation for Statistical Computing; 2026. https://www.R-project.org/
These notes support learning and research planning and do not replace statistical consultation for a specific study.