Free to use, no account

Kalkulator for statistisk styrke

Planlegg en sammenligning av gjennomsnitt for to grupper. Anslå styrke ut fra utvalgsstørrelse, eller anslå hvor mange deltakere som trengs for ønsket styrke.

Cohens d er forventet forskjell mellom gruppenes gjennomsnitt delt på det felles standardavviket. Bruk et forsvarlig estimat fra tidligere dokumentasjon eller en relevant minsteeffekt – ikke et resultat valgt etter at du har sett dataene.

Tilnærming for to uavhengige grupper av samme størrelse som sammenligner gjennomsnitt med en normalmodell (z). Dette er ikke en eksakt beregning med t-test for små utvalg.

Referanse for modellen Statsmodels: normalmodell for styrke ved to utvalg

Hva betyr statistisk styrke?

Statistisk styrke er sannsynligheten for at en planlagt test oppdager den angitte effekten dersom effekten faktisk finnes. Den avhenger av effektstørrelse, utvalgsstørrelse og signifikansnivå.

Veiledning

Slik bruker du statistical-power-calculator

The Statistical Power Calculator helps you plan a study that compares the averages of two equal-sized groups. Enter an expected effect size and a significance level, then ask either how many people you need for a target power, or how much power a chosen group size gives. It uses a normal-curve approximation, not an exact t-test.

Slik gjør du

  1. Choose a mode: estimate the sample size for a target power, or estimate the power for a sample size you already have.
  2. Enter the expected Cohen's d (0.01 to 5), the significance level in percent, and whether the test is two-sided or one-sided. In sample-size mode also set the target power and expected loss of participants.
  3. Press Calculate estimate to see the numbers per group, the total, and the estimated power. Use Copy results to keep them.

Eksempler

Sample size for 80% power

Du skriver inn
Modus
sample-size
Effektstørrelse
0.5
Signifikansnivå (%)
5
Ønsket styrke (%)
80
Alternativ hypotese
two-sided
Frafall (%)
0
Du får
Antall per gruppe
63
Totalt analysert
126
Anslått styrke
80.1%

The tool rounds the group size up to a whole person, so power ends slightly above the 80% target. A medium effect of 0.5 needs 63 people in each of the two groups.

Kjørt med verktøyets egen kode.

One-sided test with some dropouts

Du skriver inn
Modus
sample-size
Effektstørrelse
0.3
Signifikansnivå (%)
5
Ønsket styrke (%)
90
Alternativ hypotese
one-sided
Frafall (%)
15
Du får
Antall per gruppe
191
Totalt analysert
382
Anslått styrke
90.1%
Rekrutteres per gruppe
225
Samlet rekruttering
450

You need 191 analysed people per group. If 15% may drop out, you divide by 0.85 and round up, so you plan to recruit 225 per group, or 450 in all.

Kjørt med verktøyets egen kode.

Power from a known sample

Du skriver inn
Modus
power
Antall per gruppe
30
Effektstørrelse
0.5
Signifikansnivå (%)
5
Alternativ hypotese
two-sided
Du får
Anslått styrke
49.1%
Totalt analysert
60

With 30 people per group and an effect of 0.5, the chance of detecting that effect is a little under one in two. A group size of 30 is often too small for a medium effect.

Kjørt med verktøyets egen kode.

Når det er nyttig

  • Estimate how many participants a simple two-group experiment needs before you start.
  • Check whether a sample you already have is large enough for the effect you care about.
  • Add a recruitment allowance for people who may drop out.

Begrensninger

  • It covers two independent groups of equal size comparing means with a normal (z) model. It is not the exact t-test calculation, and it does not handle unequal groups, paired data, proportions, ANOVA or repeated measures.
  • Inputs are limited: effect size 0.01 to 5, significance level 0.1% to 20%, target power 50% to 99%, expected loss 0% to 80%, and 2 to 1,000,000 people per group.
  • The answer is only as good as the effect size you assume. It is a planning estimate, not a replacement for a statistician or a pre-registered study plan.

Tips

  • Take your effect size from earlier studies or from the smallest difference that would matter, not from data you have already seen.
  • Run a few effect sizes, such as optimistic and cautious ones, and plan for the cautious one.
  • Use a two-sided test unless you decided on a one-sided one before collecting data.

Vanlige spørsmål

What is statistical power?

It is the chance that a planned test will detect an effect of the size you specify, if that effect is real. It depends on the effect size, the sample size and the significance level.

What is Cohen's d?

It is the expected gap between the two group averages divided by their shared standard deviation. A larger d means a larger, easier-to-detect difference. The tool accepts values from 0.01 to 5.

Does 80% power mean my result will be true?

No. It means that, under your assumptions, the test would detect the effect about 80% of the time if it were real. It says nothing about the chance that a result is correct.

Why does the estimated power come out above my target?

The group size must be a whole number, and the tool always rounds up. Rounding up a little raises the power slightly, which is why a request for 80% can show 80.1%.

How is participant loss handled?

The analysed sample is worked out first. The tool then divides it by one minus the loss rate and rounds up to get the number to recruit, so a 15% loss turns 191 into 225 per group.

Is my study data uploaded?

No. The calculation runs in your browser and the page says the assumptions are not uploaded or saved. Write down the numbers you need before you close the page.

Kilder

Ofte stilte spørsmål

Hva betyr statistisk styrke?

Statistisk styrke er sannsynligheten for at en planlagt test oppdager den angitte effekten dersom effekten faktisk finnes. Den avhenger av effektstørrelse, utvalgsstørrelse og signifikansnivå.

Lastes forutsetningene i studien min opp?

Nei. Beregningen kjøres i denne nettleseren. Forutsetningene dine lastes ikke opp eller lagres av dette verktøyet.

Hva betyr 80 % statistisk styrke?

Med forutsetningene du oppga betyr et estimat på 80 % at den planlagte testen ville oppdage den angitte effekten omtrent 80 % av gangene dersom effekten faktisk finnes. Det betyr ikke at det er 80 % sannsynlighet for at et resultat er sant.

Hva er Cohens d?

Cohens d er en standardisert forskjell mellom to gjennomsnitt: den forventede forskjellen delt på det felles standardavviket. Resultatet avhenger sterkt av hvilken effekt du velger.

Er dette en erstatning for en fullstendig styrkeanalyse?

Nei. Dette nettleserestimatet dekker en balansert sammenligning av gjennomsnittet i to grupper med en normaltilnærming. Det modellerer ikke ulike gruppestørrelser, parede data, andeler, ANOVA, klynger eller gjentatte målinger, kovariater, eksakte t-tester, multippel testing eller studiespesifikke begrensninger.