Understanding Median Difference Planning
Median outcomes are useful when data are skewed. Income, length of stay, reaction time, and biomarker values often behave this way. A mean may move because of a few extreme values. A median gives the middle value, so it can describe a typical subject better. This calculator helps plan two independent groups before data collection starts.
Why Sample Size Matters
A study with too few records may miss a real median difference. A study with too many records can waste time, money, and effort. Power planning balances these concerns. The tool uses the expected median gap, spread, confidence level, power, allocation ratio, and attrition rate. It then estimates how many participants are needed in each group.
Statistical Method
A true t test is designed for mean differences. Median testing usually uses rank methods or asymptotic median theory. This calculator uses a planning approximation for medians. It converts each standard deviation into a median standard error. For roughly normal data, the usual factor is 1.2533. You can edit that factor when your distribution is more or less variable near the center.
Inputs That Need Care
The expected median difference is the most sensitive input. Choose it from prior studies, pilot data, or a clinically meaningful target. Standard deviations should describe the expected variation in each group. The power value often uses 80 percent or 90 percent. The alpha value often uses 0.05 for two sided testing. A higher design effect increases the needed sample.
Reading the Output
The result table shows the analyzable sample size and the recruited sample size. Recruited size includes the attrition allowance. It also shows the estimated effect size, standard error, critical value, and approximate degrees of freedom. These checks help you see whether the plan is realistic. Export the result when you need a record for reports.
Best Practice
Use this output as an estimate, not as a final protocol decision. Median studies can depend strongly on the data shape. When possible, compare this estimate with a rank test, simulation, or specialist review. Save the assumptions with every result, because reviewers need clear details. Recheck them whenever the study question changes or data improve later. Good planning combines math with subject knowledge.