Calculator Inputs
Example Data Table
This table shows sample planning cases for common t test designs.
| Scenario | Test Type | Effect Size | Alpha | Target Power | Suggested Sample |
|---|---|---|---|---|---|
| Small treatment difference | Two sample | 0.30 | 0.05 | 80% | About 176 per group |
| Moderate lab change | Paired sample | 0.50 | 0.05 | 80% | About 32 pairs |
| Large benchmark gain | One sample | 0.80 | 0.05 | 90% | About 19 observations |
| Unequal groups | Two sample | 0.45 | 0.05 | 80% | Depends on allocation ratio |
Formula Used
The calculator uses a normal approximation to estimate t test planning values.
d = |mean1 - mean2| / SD
effective n = n1 × n2 / (n1 + n2) for two independent groups.
effective n = n for one sample or paired sample designs.
noncentrality = d × √effective n
For a two-tailed test, approximate power is:
Power = 1 - Φ(zα/2 - noncentrality) + Φ(-zα/2 - noncentrality)
For a one-tailed test, approximate power is:
Power = 1 - Φ(zα - noncentrality)
Required sample size uses:
n = ((zα + zpower) / d)²
For equal two-group designs, the per-group value is approximately doubled.
How to Use This Calculator
- Select one sample, paired sample, or two sample design.
- Choose whether to enter Cohen effect size or raw means.
- Enter sample sizes, alpha level, tail setting, and target power.
- Use allocation ratio when group sizes are unequal.
- Press the calculate button to view power and sample guidance.
- Download the result as CSV or PDF for records.
Power Calculation for a T Test
Why Power Matters
Statistical power describes the chance of detecting a real effect. A study with low power may miss useful findings. This can happen even when the effect exists. Power planning helps before data collection starts. It links sample size, effect size, alpha, and test direction. These choices shape the strength of a study.
Understanding the Inputs
The effect size is the standardized difference. It shows how large the difference is compared with variation. A larger effect needs fewer observations. A smaller effect needs more observations. Alpha controls the false positive risk. Common studies use 0.05, but this is not mandatory. A two-tailed test is more conservative than a one-tailed test.
Choosing a Test Design
Use a one sample design when comparing one mean with a fixed value. Use a paired design when observations are matched. Examples include before and after scores. Use a two sample design when comparing independent groups. Unequal allocation can be useful when one group costs more. The calculator supports that ratio directly.
Reading the Result
The result gives estimated power for your current plan. It also gives the required sample for the target power. The detectable effect tells what size can be found. Treat these outputs as planning estimates. Real studies may need extra allowance for missing data. Measurement quality also affects the final result.
Practical Planning Tips
Start with an effect size from earlier studies when possible. Use realistic variation estimates. Avoid choosing an effect only because it lowers sample needs. Compare several scenarios before final planning. Export the result and keep it with your study notes. This makes assumptions clear for later review.
Frequently Asked Questions
1. What is t test power?
It is the chance that a t test detects a real difference. Higher power lowers the chance of missing a meaningful effect.
2. What power level should I use?
Many studies use 80% as a minimum target. Some important studies use 90% or higher for stronger sensitivity.
3. What is Cohen effect size?
Cohen effect size is a standardized mean difference. It divides the mean difference by the standard deviation.
4. Can I use raw means?
Yes. Select the raw input mode, then enter both means and the pooled or difference standard deviation.
5. What is a two-tailed test?
A two-tailed test checks for a difference in either direction. It is common when direction is not certain.
6. What does allocation ratio mean?
It is the size of group two divided by group one. A ratio of one means equal group sizes.
7. Is this exact t power?
This calculator uses a normal approximation for planning. It is useful for estimates, but specialized software may give exact noncentral t results.
8. Should I increase sample size?
Increase sample size when power is below target, effects are small, or missing data is expected during collection.