Power analysis

Power analysis and sample size that matches G*Power

Before a study, power analysis answers how many subjects you need; after one, it answers what you could have detected. Magic Stat computes both from the same dialog, shows the power curve live as you change the parameters, and documents the formulas against the G*Power conventions.

The honest part

The three questions power analysis answers, and the one it should not

Power analysis links four quantities: the effect size, the sample size, the significance level and the power (the chance of detecting the effect if it exists). You know three of them and solve for the fourth. Solving for the sample size, given a target power, is the a priori analysis — the one you do when planning a study. Solving for power, given the sample you already collected, is the post hoc analysis. Solving for the smallest effect you could detect, given the sample and a target power, is the sensitivity analysis.

The honesty caveat belongs here. Post hoc power computed from the effect size you observed is a monotone function of the p-value; a non-significant result will look "underpowered" by construction. It is a weak argument for the value of a study that has already been run, and reporting it as if it rescued a null result is a known misuse. The a priori analysis, done before data collection and with an effect size justified from the literature or from a pilot, is where power analysis earns its place.

The tests covered run from the common ones — independent and paired t-tests, one-way ANOVA, correlation, chi-square, multiple regression — to repeated-measures ANOVA and structural equation models with RMSEA-based fit tests. Effect sizes can be typed in directly or computed from descriptive statistics with a calculator in the same style as G*Power's "Determine".

What it does

What Magic Stat gives you for power analysis

How it works

Answer three quantities, solve for the fourth

  1. Open Statistics → Power Analysis & Sample Size. the dialog opens with a live power curve on the right.
  2. Choose the analysis type. A priori (required sample size), Post hoc (achieved power) or Sensitivity (required effect size).
  3. Choose the test and the effect size. pick from the test list and type the effect size, or click "Determine…" to compute it from descriptive statistics.
  4. Enter the parameters. alpha, target power, and the design parameters the chosen test needs (the dialog shows only those).
  5. Read and export. the result updates as you type; open the power curve in a graph window and send the analysis to the report (.docx/.html/.md).
Options

The settings, out in the open

Analysis types: A priori — required sample size · Post hoc — achieved power · Sensitivity — required effect size.

Parameters: alpha · target power · n · ratio n2/n1 · groups (k) · chi-square df · predictors (p) · measures (nm) · nonsphericity ε · model df · H0 RMSEA · true RMSEA.

Effect-size calculator: Cohen's d, d_z, f, f², w, h or r from means and standard deviations, proportions or R².

Output: the solved quantity stated in words, plus a live power-versus-n curve rendered as a figure.

Frequently asked

Power analysis questions, answered honestly

Which mode do I need for a grant or an ethics application?

The a priori analysis: you state the test, an effect size justified from the literature or a pilot, the alpha and the target power, and the app returns the sample size. That is the analysis a reviewer expects to see before data collection, not after.

Is post hoc power meaningful?

Rarely. Power computed from the effect you observed in the same sample is a transformation of the p-value: a non-significant result will always look underpowered, and a significant one will always look adequately powered. It is not a good defence of a study that has already been run, and the app does not present it as one.

Is it really G*Power-compatible?

The formulas are documented against the G*Power and WebPower conventions and the repeated-measures case follows the Potvin and Schutz approach. For an unusual design, cross-checking a single number against G*Power is still a sensible habit — agreement is the point of documenting the conventions.

What if my design is clustered or multilevel?

Then power depends on the design, not only on the effect size and n: the number of clusters and their size both matter, and a simple formula will mislead. For those designs, a simulation or a design-specific tool is the honest route; the app's power analysis targets the single-level tests listed in the dialog.

Is my data uploaded somewhere?

No — power analysis runs locally from the values you type, and the only automatic signal is an anonymous installation counter.

t-test → ANOVA → Correlation analysis → Mixed models →