Free to use, no account

Fisher-testkalkulator

Skriv inn de fire tallene i en 2 × 2-tabell for å beregne Fishers eksakte test med faste marginer.

Observert 2×2-frekvenstabell

Velg en ensidig retning bare når den er bestemt før dataene undersøkes. Oddsforholdet er det ukorrigerte kryssproduktforholdet; nullceller kan gjøre det udefinert eller uendelig. Dette er ikke en konklusjon om årsakssammenheng.

Antallene må være heltall. Maksimalt 10,000 per celle og 20,000 totalt. Den tosidige testen summerer tabeller som er minst like lite sannsynlige som den observerte tabellen, gitt de faste margintotalene.

Når bør jeg bruke Fishers eksakte test?

Dette er en eksakt test av sammenheng i en 2×2-tabell, ofte brukt når forventede antall er små. Resultatet avhenger av studiedesignet og beviser ikke årsakssammenheng.

Veiledning

Slik bruker du fisher-exact-test-calculator

The Fisher Exact Test Calculator takes the four counts of a 2 by 2 table and gives an exact p-value and an odds ratio. You can choose a two-sided test or a one-sided test in either direction. It suits small counts. It cannot show cause and effect, and it does not adjust for other variables or for running many tests.

Slik gjør du

  1. Enter the four whole counts: Group 1 with outcome 1 and outcome 2, then Group 2 with outcome 1 and outcome 2. Each cell may be 0 to 10,000, and the table total may be at most 20,000.
  2. Choose the alternative hypothesis. Two-sided is the usual choice. Pick a one-sided direction only if you decided on it before looking at the data.
  3. Press Calculate exact test. Read the p-value and the odds ratio, or press Load example to see a filled-in table first. Use Copy results to keep the numbers.

Eksempler

A small table with a strong split

Du skriver inn
Gruppe 1, utfall 1
1
Gruppe 1, utfall 2
9
Gruppe 2, utfall 1
11
Gruppe 2, utfall 2
3
Alternativ hypotese
two-sided
Du får
P-verdi
0.00275946
Oddsforhold
0.030303
Radtotaler
10; 14
Kolonnetotaler
12; 12

Group 1 had 1 of 10 in outcome 1, Group 2 had 11 of 14. The odds ratio is (1 times 3) divided by (9 times 11). A p-value this small points to a real association in this table.

Kjørt med verktøyets egen kode.

One-sided in each direction

Du skriver inn
Gruppe 1, utfall 1
1
Gruppe 1, utfall 2
9
Gruppe 2, utfall 1
11
Gruppe 2, utfall 2
3
Alternativ hypotese
less / greater
Du får
Mindre
0.00137973
Større
0.99996635

For this table, the lower tail holds the unlikely side, so the odds-lower test gives about half the two-sided value, and the opposite direction is close to 1. The direction must be fixed in advance.

Kjørt med verktøyets egen kode.

A zero cell

Du skriver inn
Gruppe 1, utfall 1
5
Gruppe 1, utfall 2
0
Gruppe 2, utfall 1
0
Gruppe 2, utfall 2
5
Alternativ hypotese
two-sided
Du får
P-verdi
0.00793651
Oddsforhold
infinity

With a zero in one of the off-diagonal cells the cross-product ratio has a zero under the line, so the page shows infinity. If both products are zero it says the ratio is not estimable.

Kjørt med verktøyets egen kode.

Når det er nyttig

  • Compare success and failure counts between a treatment and a control group in a small study.
  • Test whether two categories are linked when some expected counts are too small for a chi-squared test.
  • Check a classroom or lab exercise against a worked example.

Begrensninger

  • Only whole counts from 0 to 10,000 per cell are accepted, with a total between 1 and 20,000. Decimals, negative numbers and blank cells show an error.
  • The p-value is conditional on the row and column totals and does not adjust for covariates, multiple tests or complex sampling. It is not an effect size.
  • The two-sided p-value adds every table with the same totals that is no more likely than yours, and other software may use another convention. This tool is for learning and checks, not a replacement for expert analysis.

Tips

  • Decide the direction of a one-sided test before you see the numbers, and say so when you report it.
  • Report the odds ratio and the counts as well as the p-value, so readers can judge the size of the effect.
  • If a count cannot be a whole number, you probably have a different kind of data and need another test.

Vanlige spørsmål

When should I use Fisher's exact test?

Use it for a 2 by 2 table of counts, most often when some expected counts are small. It works with fixed row and column totals. It tests association, and it does not show that one thing causes another.

What does the p-value tell me?

It is the chance of a table at least as unusual as yours if rows and columns were unrelated, given the totals. A small value is evidence against independence. It is not the probability that the result is true.

What is the odds ratio shown here?

It is the plain cross-product ratio, a times d divided by b times c, with no correction. With a zero cell it can become infinite or not estimable, and the page says so.

What is the difference between two-sided and one-sided?

Two-sided looks for any association in either direction. One-sided asks only whether Group 1 has greater or lower odds. Choose one-sided only if you fixed the direction before seeing the data.

Why did I get an error for my counts?

Each cell must be a whole number from 0 to 10,000, and the four cells together must total between 1 and 20,000. Decimals, negatives, empty boxes and all-zero tables are refused.

Are my numbers sent anywhere?

No. The calculation runs in your browser, and the counts are neither uploaded nor stored by the tool. Reloading the page clears the table and the result.

Kilder

Ofte stilte spørsmål

Når bør jeg bruke Fishers eksakte test?

Dette er en eksakt test av sammenheng i en 2×2-tabell, ofte brukt når forventede antall er små. Resultatet avhenger av studiedesignet og beviser ikke årsakssammenheng.

Lastes antallene mine opp?

Nei. Beregningen kjøres i nettleseren. Antall lastes ikke opp eller lagres av verktøyet.

Hva er nullhypotesen?

Testen undersøker om rad- og kolonneklassifikasjonene er uavhengige, betinget av de observerte margintotalene. Den forklarer ikke hvorfor en sammenheng kan finnes.

Hvordan beregnes en tosidig p-verdi?

Denne kalkulatoren summerer sannsynlighetene for alle mulige tabeller med de samme margintotalene der den betingede sannsynligheten ikke er større enn for den observerte tabellen. Andre programmer kan bruke andre konvensjoner.

Beviser en lav p-verdi at det finnes en effekt?

Nei. En p-verdi er ikke et effektmål eller et bevis på årsakssammenheng. Se på oddsforholdet, studiedesignet, datakvaliteten, usikkerheten og eventuell plan for korreksjon for flere tester.