Calculator Inputs
Enter assumptions for a non-inferiority design using a normal approximation.
Example Data Table
These examples show common physics study planning cases.
| Study case | Outcome | Margin | Power | Allocation | Typical use |
|---|---|---|---|---|---|
| Detector calibration | Continuous response | 2.5 units | 80% | 1:1 | Compare a new sensor against a reference system. |
| Beam stability pass rate | Binary success | 4 percentage points | 90% | 2:1 | Show a faster procedure is not meaningfully worse. |
| Dose measurement workflow | Continuous error | 0.8 units | 85% | 1:1 | Assess a lower-burden method for routine testing. |
| Material inspection yield | Binary pass rate | 3 percentage points | 80% | 1.5:1 | Plan a trial with more new-method samples. |
Formula Used
For a continuous endpoint, the calculator uses this normal approximation:
nC = [(Z1-α + Zpower)2 × (σT2 / r + σC2)] / (δ + M)2
For a binary endpoint measured by risk difference, it uses:
nC = [(Z1-α + Zpower)2 × {pT(1-pT) / r + pC(1-pC)}] / (δ + M)2
Here, r is the treatment to control allocation ratio. M is the non-inferiority margin. δ is the expected treatment advantage after applying the selected better direction. The control sample is multiplied by the design effect, adjusted for attrition, and rounded upward. The treatment sample is then based on the selected allocation ratio.
How to Use This Calculator
- Select the outcome type used in your physics experiment.
- Choose whether higher or lower measurements are better.
- Enter alpha, power, allocation ratio, and margin.
- Add means and standard deviations for continuous data.
- Add percentages for binary pass, fail, event, or success data.
- Set attrition, design effect, and rounding preferences.
- Press the calculate button to show the result above the form.
- Download the result as a CSV file or PDF report.
Planning Non-Inferiority Studies in Physics
Why This Design Matters
Physics research often compares a new method with a trusted reference. The new method may be faster, cheaper, safer, or easier to repeat. It may not need to be better. It may only need to be not unacceptably worse. That is the purpose of a non-inferiority design.
A sample size plan protects the study before data collection begins. It links the scientific margin to alpha, power, variability, and allocation. A small margin demands more observations. A high power target also increases sample size. Large standard deviations have the same effect.
Choosing the Margin
The margin should come from physics judgment, prior validation work, safety limits, or measurement tolerance. It should not be selected only to reduce sample size. For detector calibration, the margin may be an allowed response loss. For beam monitoring, it may be a maximum pass rate reduction. For dose measurement, it may be an acceptable increase in error.
Understanding Direction
Direction matters. Some endpoints improve when values rise. Others improve when values fall. The calculator converts the expected difference into a favorable effect. It then adds the margin. This creates the non-inferiority gap. If this gap is zero or negative, the planned assumptions cannot support the claim.
Using Advanced Options
The allocation ratio lets you place more runs in one arm. This can help when the new method is easier to test. The design effect inflates sample size for clustered, repeated, or less independent observations. Attrition covers missing, failed, or unusable measurements. Rounding helps match real lab batches.
Interpreting Results
The final enrollment is a planning number. It is based on normal approximations. It does not replace a full protocol review. Still, it provides a transparent starting point. It also makes assumptions visible. That helps teams discuss feasibility before equipment time, samples, and staffing are committed.
FAQs
1. What is a non-inferiority sample size?
It is the number of observations needed to show a new method is not worse than a reference by more than a chosen margin.
2. Why is the margin important?
The margin defines the largest acceptable loss. A smaller margin makes the study stricter and usually requires more observations.
3. Can this be used for physics experiments?
Yes. It can plan comparisons for detectors, calibration workflows, measurement methods, pass rates, or process validation studies.
4. What does one-sided alpha mean?
It is the type I error level for the non-inferiority claim. Many designs use 0.025 for a one-sided test.
5. How should I enter binary data?
Enter treatment and control percentages. Use success rates when higher is better, or event rates when lower is better.
6. What is the design effect?
It inflates sample size when observations are clustered, repeated, correlated, or less independent than a simple random design.
7. Why add attrition?
Attrition covers missing data, unusable runs, sensor failures, or rejected samples. It increases enrollment before the final analysis.
8. Is this enough for a final protocol?
No. Treat it as a planning tool. Final protocols should confirm assumptions, endpoint definitions, and analysis rules carefully.