Statistics for Clinical Trials Explained with a Clinical Example – A Beginner’s Guide

Statistics for clinical trials explained with a hypothetical hypertension trial example

Every clinical trial depends on statistics, from the first sample size calculation to the final Results paragraph. Researchers use statistical methods to plan how many patients to recruit, to allocate treatments fairly, and to decide whether a new treatment truly works. However, many junior researchers see statistics only as the last step, after the data are collected. This is a common mistake, because most statistical errors in trials happen at the design stage. This beginner’s guide explains statistics for clinical trials step by step, using one hypothetical randomized controlled trial as a clinical example.

Free tool: calculate the sample size or power for your study with the StatisMed sample size calculator. It shows the exact R code and ready-to-use wording for your Methods section. Open the calculator →

What Are Statistics for Clinical Trials?

Statistics for clinical trials are the methods used to design a trial, analyze its data, and report its findings. They answer three questions: how many participants are needed, how treatments are assigned, and whether the observed difference between groups is larger than chance alone would produce. Clinical trial statistics can be grouped into three areas.

Design Statistics

Design statistics are applied before the first patient is enrolled. They include the sample size calculation, the randomization method, the choice of the primary endpoint, and the statistical analysis plan. These decisions cannot be corrected later.

Descriptive Statistics

Descriptive statistics summarize the participants and the outcomes. Means and standard deviations describe continuous variables, such as blood pressure, while counts and percentages describe categorical variables, such as sex or treatment response. The baseline table of every trial is a descriptive table.

Inferential Statistics

Inferential statistics compare the treatment groups and estimate the size of the treatment effect. They include hypothesis tests, confidence intervals, and effect measures such as the mean difference, risk ratio, and number needed to treat.

Importance of Statistics for Clinical Trials in Medical Research

Protecting Against Bias

Randomization and allocation concealment ensure that known and unknown prognostic factors are balanced between groups. Therefore, any difference in outcomes can be attributed to the treatment rather than to the characteristics of the patients (Kim & Shin, 2014).

Ensuring Adequate Power

A trial that is too small may miss a real treatment effect, while a trial that is too large exposes more patients than necessary to an experimental treatment. An adequate sample size gives the trial enough statistical power to detect a clinically important difference.

Supporting Regulatory and Clinical Decisions

Regulatory agencies, journal editors, and guideline panels rely on the statistical results of trials. Moreover, transparent reporting, as described in the CONSORT statement, allows readers to judge whether the conclusions are valid.

Applications of Statistical Methods in Clinical Trials

Early-Phase Trials

Phase I and II trials focus on safety and dose. Statistical methods help to choose the dose for later trials, estimate response rates with confidence intervals, and decide whether a treatment is promising enough to continue.

Confirmatory Phase III Trials

Phase III trials compare a new treatment with a standard treatment or placebo in a large sample. They require a prespecified primary endpoint, a formal sample size calculation, randomization, and an intention-to-treat analysis.

Post-Marketing and Long-Term Studies

After approval, phase IV studies monitor rare adverse events and long-term outcomes. These studies often use time-to-event methods, such as survival analysis, and more advanced statistical methods in clinical trials, such as mixed-effects models for repeated measures.

Key Assumptions in Clinical Trial Statistics

Before the analysis, check that the trial and its data meet the following assumptions:

  • Participants were randomly allocated, and the allocation sequence was concealed from the recruiting staff.
  • The primary endpoint, the hypotheses, and the significance level were defined in the protocol before the data were collected.
  • Observations are independent; each participant contributes one outcome per time point to one group only.
  • Continuous outcomes are approximately normally distributed in each group, or the sample is large enough for the t-test to be robust.
  • Categorical outcomes have expected frequencies of at least 5 in each cell of the contingency table.
  • Missing data are few, and a strategy for handling them was stated in advance.

How to Apply Statistics for Clinical Trials: A Clinical Example

Consider a hypothetical randomized controlled trial in adults with uncontrolled hypertension. The researchers compare a new antihypertensive drug with standard care. The primary outcome is the reduction in systolic blood pressure (SBP) after 12 weeks. The secondary outcome is blood pressure control, defined as SBP below 140 mmHg at 12 weeks. All the numbers below were calculated with Python.

Step 1: Define the Primary Endpoint and the Hypotheses

The null hypothesis (H0) states that the mean SBP reduction is the same in both groups. The alternative hypothesis (H1) states that the mean reductions differ. The test is two-sided, and the significance level is 0.05. One primary endpoint protects against false positive findings.

Step 2: Calculate the Sample Size

Based on previous studies, the researchers assume a standard deviation (SD) of 12 mmHg and consider a difference of 6 mmHg clinically important. With α = 0.05 and 80% power, the formula n = 2 × (1.96 + 0.84)² × SD² ÷ difference² gives 62.8, or 63 participants per group. To allow for 15% dropout, the number is divided by 0.85, which gives 74.1. Therefore, the trial recruits 75 participants per group, 150 in total.

Step 3: Randomize and Conceal the Allocation

Participants are allocated in a 1:1 ratio using permuted blocks of size 4, generated by a computer before the trial starts. Block randomization keeps the group sizes balanced during recruitment. In addition, the sequence is kept in sealed, opaque, numbered envelopes, so the staff who enroll patients cannot predict the next assignment.

Step 4: Describe the Baseline Characteristics

Table 1 summarizes the participants at baseline. Notably, the table has no p-values. Because the groups were randomized, any baseline difference is due to chance by definition, and the CONSORT statement advises against significance tests at baseline.

Table 1. Baseline characteristics of the participants (hypothetical data)
Characteristic New drug (n = 75) Standard care (n = 75)
Age, years, mean (SD) 56.4 (9.8) 57.1 (10.2)
Male sex, n (%) 40 (53.3%) 42 (56.0%)
Baseline SBP, mmHg, mean (SD) 152.6 (8.4) 153.1 (8.9)
Diabetes, n (%) 18 (24.0%) 20 (26.7%)

Step 5: Analyze the Primary Outcome by Intention to Treat

In the intention-to-treat (ITT) analysis, every participant is analyzed in the group to which they were randomized, whether or not they took the treatment as planned (Gupta, 2011). For simplicity, all 150 participants in this example attended the 12-week visit. The mean SBP reduction was 14.2 mmHg (SD 11.8) with the new drug and 8.1 mmHg (SD 12.4) with standard care.

An independent samples t-test compares the two means. The mean difference (MD) was 6.1 mmHg, with a standard error of 1.98. Therefore, t = 6.1 ÷ 1.98 = 3.09 with df = 148, and p = 0.002. The 95% confidence interval for the difference was 2.2 to 10.0 mmHg. Moreover, the standardized effect size was Cohen’s d = 0.50, a medium effect. Our guide to the t-test vs ANOVA explains when to use each test.

Step 6: Analyze the Secondary Binary Outcome

Blood pressure control was achieved by 48 of 75 participants (64.0%) in the new drug group and 33 of 75 (44.0%) in the standard care group. The chi-square test showed a significant difference (χ² = 6.04, df = 1, p = 0.014). In addition, three effect measures describe the size of the benefit, as shown in Table 2. The risk ratio was 1.45, the absolute risk difference was 20.0%, and the number needed to treat (NNT) was 1 ÷ 0.20 = 5.

Table 2. Primary and secondary outcomes at 12 weeks (intention-to-treat analysis, n = 150)
Outcome New drug (n = 75) Standard care (n = 75) Effect (95% CI) p-value
SBP reduction, mmHg, mean (SD) 14.2 (11.8) 8.1 (12.4) MD = 6.1 (2.2 to 10.0) 0.002
BP control (SBP < 140 mmHg), n (%) 48 (64.0%) 33 (44.0%) RR = 1.45 (1.07 to 1.98) 0.014
Risk difference for BP control 20.0% (4.4% to 35.6%)
Number needed to treat 5 (3 to 23)

Step 7: Check the Robustness with a Per-Protocol Analysis

A per-protocol analysis includes only the participants who followed the protocol. In this example, four participants in each group took less than 80% of their tablets and were excluded, which left 71 per group. The mean SBP reduction was 14.6 mmHg (SD 11.5) with the new drug and 8.0 mmHg (SD 12.3) with standard care. The per-protocol result agreed with the ITT result (Table 3), which supports the robustness of the main finding.

Table 3. Intention-to-treat and per-protocol analyses of the primary outcome
Analysis n per group MD, mmHg (95% CI) t (df) p-value
Intention to treat 75 vs 75 6.1 (2.2 to 10.0) 3.09 (148) 0.002
Per protocol 71 vs 71 6.6 (2.6 to 10.5) 3.30 (140) 0.001

How to Report Clinical Trial Results in a Manuscript

In the Methods section, state the sample size assumptions, the randomization method, the analysis population, and the statistical tests. For example: “The primary outcome was compared between groups using an independent samples t-test in the intention-to-treat population.” In the Results section, report the significant findings only, as in the model paragraph below.

Primary and Secondary Outcomes at 12 Weeks

The mean reduction in systolic blood pressure was significantly greater with the new drug than with standard care (14.2 vs 8.1 mmHg, MD = 6.1 mmHg, 95% CI, 2.2 to 10.0, p = 0.002). Moreover, blood pressure control was significantly more frequent with the new drug (64.0% vs 44.0%, RR = 1.45, 95% CI, 1.07 to 1.98, p = 0.014), with a risk difference of 20.0% (95% CI, 4.4% to 35.6%) and a number needed to treat of 5 (Table 2).

The paragraph gives the numbers without interpretation. The clinical meaning and the comparison with previous trials belong in the Discussion section.

Common Mistakes in Statistics for Clinical Trials

Calculating the Sample Size After the Trial

A post hoc power calculation does not rescue a small trial. The sample size must be calculated and justified in the protocol, before recruitment begins.

Testing Baseline Differences

Significance tests on the baseline table answer a question that randomization has already answered. Instead, judge the clinical size of any imbalance and, if needed, adjust for prespecified prognostic factors.

Excluding Participants from the Primary Analysis

Analyzing only the participants who completed treatment breaks the randomization and usually exaggerates the treatment effect. Therefore, the ITT analysis should be the primary analysis in superiority trials, with the per-protocol analysis as a sensitivity analysis.

Reporting Only P-Values

A p-value shows whether a difference is statistically significant, but not how large it is. Always report the effect estimate with its 95% confidence interval and, for binary outcomes, the absolute risk difference or NNT.

Multiple Testing Without Correction

Testing many outcomes, subgroups, or time points increases the chance of false positive results. Define one primary endpoint, limit the number of secondary endpoints, and label unplanned analyses as exploratory.

Running Clinical Trial Analyses in SPSS and R

In SPSS, the primary outcome is analyzed through Analyze → Compare Means → Independent-Samples T Test. Move the SBP reduction to “Test Variable(s)” and the group variable to “Grouping Variable”. The secondary outcome is analyzed through Analyze → Descriptive Statistics → Crosstabs, with “Chi-square” and “Risk” selected under “Statistics”. In R, the primary analysis is performed with one line of code: t.test(sbp_reduction ~ group, data = trial, var.equal = TRUE). For more complex designs, our guide to hiring a medical statistician explains when expert help is needed.

Conclusion

Statistics for clinical trials start long before the analysis. A valid trial needs a single prespecified primary endpoint, a justified sample size, concealed randomization, and an intention-to-treat analysis. Moreover, a complete report gives effect estimates with confidence intervals, not only p-values. If you need support in designing your trial, calculating the sample size, analyzing your data, or writing the Results section, the StatisMed team of biostatisticians provides statistical analysis services for clinical research. You can request a free quote today.

Frequently Asked Questions

1. Which statistical test is used most often in clinical trials?

The choice depends on the type of the primary outcome. Continuous outcomes are usually compared with the t-test or analysis of covariance, binary outcomes with the chi-square test or logistic regression, and time-to-event outcomes with the log-rank test or Cox regression.

2. What is the difference between intention-to-treat and per-protocol analysis?

The intention-to-treat analysis includes all randomized participants in their allocated groups, which preserves the benefits of randomization. The per-protocol analysis includes only the participants who followed the protocol. It is usually reported as a sensitivity analysis.

3. Why should the sample size be calculated before the trial?

The sample size determines whether the trial can detect a clinically important difference. Calculating it in advance prevents underpowered trials, avoids unnecessary exposure of patients, and is required by ethics committees, funders, and journals.

References

Gupta, S. K. (2011). Intention-to-treat concept: A review. Perspectives in Clinical Research, 2(3), 109–112. https://doi.org/10.4103/2229-3485.83221

Kim, J., & Shin, W. (2014). How to do random allocation (randomization). Clinics in Orthopedic Surgery, 6(1), 103–109. https://doi.org/10.4055/cios.2014.6.1.103

Related Posts