Sampling/ Change in Proportion
Sample Size Estimation, Measuring Change

How to Calculate Sample Size to Detect a Change in Proportion

A change in proportion compares a rate or percentage across two groups, or the same group at two points in time. This guide explains the underlying statistics first, then shows how to apply them using AnalyZ Solutions.

7 min read Sample Size Estimation Intermediate

A large share of programme evaluations come down to one question: did a percentage move? Did employment go up? Did contraceptive use increase? Did school attendance improve? This tool is built for exactly that question, whether or not random assignment was possible, and whether the same people were tracked over time or two separate samples were compared. This guide first explains the general formula behind the calculation, then walks through how to apply it in AnalyZ Solutions.

01The general sample size formula

The most important decision this tool asks you to make is not a number at all. It is whether you are comparing two independent groups or the same group measured twice. This single choice changes the formula, the required inputs, and, usually significantly, the required sample size.

Two independent groups

Use this when comparing two separate samples: a treatment group against a comparison group, or two different people surveyed at baseline and again at endline, sometimes called a repeated cross-section. No individual is measured twice.

n = (Z1−α/2√(2p̄q̄) + Z1−β√(p₁q₁+p₂q₂))2 / (p₂−p₁)2 This is the sample required in each group. Total sample across both groups is twice this figure.

Each symbol in this formula plays a specific role.

Same group, before and after

Use this when the same individuals are measured at both time points, a genuine panel or cohort rather than two separate samples. Because each person acts as their own comparison, this design is statistically more efficient. It typically needs a meaningfully smaller sample to detect the same size of change.

n = (Z1−α/2 + Z1−β)2 × [p₁q₁+p₂q₂−2ρ√(p₁q₁p₂q₂)] / (p₂−p₁)2 This is the number of matched pairs required, meaning the number of individuals tracked, not the number of measurements.

This formula shares p₁, p₂, q₁, and q₂ with the independent groups version above, but introduces one new term.

Notice that the entire bracketed term, [p₁q₁+p₂q₂−2ρ√(p₁q₁p₂q₂)], is smaller than the independent groups term whenever ρ is positive. This is the mathematical expression of the intuition that tracking the same people over time captures information a fresh, unrelated sample cannot.

Choosing your confidence level and power

Confidence level and power are judgment calls, not fixed rules, and they deserve as much thought as the effect size itself.

Confidence level reflects how willing you are to risk a false alarm, concluding a change happened when it actually did not. 95% is the standard default across social research and evaluation, meaning a 5% chance of that false alarm. A higher confidence level, such as 99%, is worth considering when acting on a wrong conclusion would be costly or hard to reverse, for example before scaling a programme nationally. A lower level, such as 90%, is sometimes used for lower stakes, exploratory work where a smaller sample is preferable and an occasional false alarm is an acceptable trade-off.

Power reflects how willing you are to risk missing a real change entirely. 80% power is the conventional minimum, meaning a 20% chance of failing to detect a genuine change of the size specified. 90% power is worth considering for high stakes decisions, such as a funding renewal that depends on demonstrating impact, where missing a real effect would be especially damaging.

Undermining either value carries a real cost. A confidence level set too low increases the risk of reporting a change that is actually just noise, potentially leading to a programme decision based on a false result. Power set too low means that even a genuinely effective programme has a meaningful chance of producing a study that fails to detect its own impact, an outcome that is difficult to distinguish from the programme simply not working. Once data collection is complete, there is no way to fix an underpowered study after the fact. The sample size decision made in advance is the only point at which either risk can actually be managed.

Choosing one-tailed or two-tailed

Both formulas above use Z1−α/2, the two-tailed critical value, appropriate when you want to detect a change in either direction, an increase or a decrease. If your interest is specifically and only in one direction, for example only whether a programme increases employment, and a decrease genuinely does not need to be detected or reported, a one-tailed test using Z1−α instead can be used. For 95% confidence, this changes the critical value from 1.96 to approximately 1.64, producing a smaller required sample for the same nominal confidence level.

Two-tailed is the safer, more defensible default. Choosing one-tailed specifically to reduce the required sample, without a genuine reason a change in the opposite direction is impossible or irrelevant, is a common way evaluations end up under-protected against being wrong. Reviewers and funders often expect a clear justification whenever one-tailed testing is used.

Accounting for cluster sampling

If your sample will be drawn from clusters, villages, schools, or facilities, rather than a simple random sample, a design effect should be applied to either formula above. It defaults to 1, meaning no clustering effect assumed, and is always editable. See the dedicated guide on Design Effect and ICC for how to set this correctly.

How to Calculate This in AnalyZ Solutions

The Change in Proportion tool applies both formulas automatically based on the design you select, along with the one-tailed or two-tailed choice and the design effect.

  1. Choose your design. Select Two independent groups or Same group, before and after. Read the short description AnalyZ Solutions displays under each option if you are unsure which applies to your study.
  2. Set confidence and power. Enter both as numbers, not from a fixed list, so any value is possible. 95% confidence and 80% power are reasonable defaults if you have no specific reason to depart from them.
  3. Enter baseline and expected endline proportions. Base these on prior data, a pilot, or, where genuinely nothing is known, a plausible planning assumption. The gap between them is the effect size the study is built to detect.
  4. For the paired design, enter an assumed correlation. If unsure, 0.5 is a reasonable default for most repeated measures indicators. Higher values assume more consistency between someone's baseline and endline status.
  5. Choose one-tailed or two-tailed. Two-tailed is selected by default and is appropriate for almost all evaluations.
  6. Set a design effect, if sampling by cluster. Enter a value directly, or calculate one automatically from an intraclass correlation and average cluster size.
  7. Calculate. The result shows the required sample, an interpretation of what it means, and the exact formula used, including which test type and design effect were applied.
VIDEO WALKTHROUGH PLACEHOLDER, 90 SECONDS

A short screen recording showing these steps in the AnalyZ Solutions interface, from selecting a design to reading the final result, can be embedded here.

02Worked example

A vocational training programme wants to show a rise in formal employment among the same cohort of graduates, tracked before enrolment and twelve months after completion. Baseline employment is 25%, the programme targets 40%, and the expected correlation between someone's baseline and follow-up employment status is 0.4.

Inputs
DesignPaired
Confidence level95%
Power80%
Baseline proportion25%
Endline proportion40%
Correlation (ρ)0.4
Test typeTwo-tailed
~88
pairs, graduates tracked twice

For comparison, sizing the identical 25% to 40% change as two independent groups, rather than the same cohort tracked twice, would require roughly 133 people per group at the same confidence and power, close to 50% more total participants than the paired design. This gap is entirely the value of tracking individuals rather than sampling fresh at each round, and it grows larger still as the assumed correlation ρ increases.

03Common mistakes to avoid

Frequently Asked Questions
My before and after samples are different people at each round. Which design do I use?
Use Two independent groups. The paired design specifically requires the same individuals measured twice. A repeated cross-section with different respondents at each round is an independent groups comparison, even though it is still before and after in time.
What if my outcome is a numeric average, not a percentage?
Use the companion Change in Mean tool instead. It applies the same independent and paired logic to continuous outcomes such as test scores or income. See How to Calculate Sample Size to Detect a Change in a Numeric Outcome.
Is this the same as an RCT calculation?
The underlying statistics are related, but RCT specifically assumes random assignment to arms and adds attrition handling. Use Change in Proportion when there is no randomisation involved, such as a natural comparison or a single group panel. See How to Calculate Sample Size for a Randomized Controlled Trial.
What if I do not know the correlation ρ for a paired design?
0.5 is a reasonable default for most repeated measures indicators when no prior data exists. If a previous round of the same or a similar panel is available, calculating ρ directly from that data will give a more accurate, and often more favourable, required sample than a generic assumption.
Why does the paired design need fewer participants for the same change?
Because each person acts as their own comparison, the variability that comes from comparing different individuals to each other is removed from the calculation. Only the variability in how much each person changed remains, which is smaller than the variability between two separate groups of people, provided baseline and endline status are meaningfully correlated.
Should I always use a two-tailed test?
In almost all evaluation contexts, yes. Two-tailed testing is appropriate whenever a change in either direction would be meaningful to detect and report. One-tailed testing is a narrower, less conservative choice that should only be used with a clear, defensible reason a change in one specific direction is the sole outcome of interest.
Does a design effect apply to this tool?
Yes, if the sample will be drawn from clusters rather than a simple random sample. It defaults to 1, meaning no clustering effect, and can be entered directly or calculated from an intraclass correlation and average cluster size. See Design Effect and ICC Explained.