Free tool · biostatistics

Which statistical test should I use for my thesis?

Answer four questions about your data. You get the right test, what to check before trusting it, how to report the result, and a sentence you can adapt for your Results chapter.

Chi-square & Fisher'st-test & Mann–WhitneyANOVA & Kruskal–WallisPaired testsCorrelation
What do you want to find out?
What kind of outcome is it?
Are the observations independent or paired?
How many groups or time points?
How big is the table?
Are the expected counts large enough?

The quick reference table

Most thesis analyses compare groups. Find your outcome and design; the right-hand column is the test to use when the assumption behind the first one does not hold.

OutcomeDesignTestIf the assumption fails
Yes/no or categoriesIndependent groupsChi-squareFisher's exact (2 × 2)
Yes/noSame people, twiceMcNemar's testExact McNemar
MeasurementTwo independent groupsIndependent t-testMann–Whitney U
MeasurementThree or more groupsOne-way ANOVAKruskal–Wallis H
MeasurementSame people, twicePaired t-testWilcoxon signed-rank
MeasurementSame people, 3+ timesRepeated-measures ANOVAFriedman test
Ordered scoreTwo independent groupsMann–Whitney U—
Two measurementsRelationshipPearson correlationSpearman correlation

Chi-square or Fisher's exact test?

This is the most common mistake in thesis statistics, and it is usually made by looking at the wrong numbers. The chi-square test's validity depends on the expected counts — what each cell would hold if there were no association — not on the counts you observed.

  • 2 × 2 table: all four expected counts must be at least 5, or use Fisher's exact test.
  • Larger table: every expected count at least 1, and no more than 20% of cells below 5. If that fails, merge categories that make clinical sense together, or report a Monte-Carlo p-value.

A cell can contain 5 patients and still have an expected count of 2.5, so "no cell below 5" in the table you collected is not the test.

Checking normality properly

Parametric tests assume the measurement is roughly normal within each group being compared. Check each group separately with a Shapiro–Wilk test and a histogram or Q–Q plot. Testing the whole column at once can hide a group that is badly skewed.

With large groups, Shapiro–Wilk flags trivial departures from normality, so look at the plots too. With small groups it has little power, so a skewed histogram is reason enough to go non-parametric.

Parametric or non-parametric?

Parametric tests (t-test, ANOVA, Pearson) compare means and are more powerful when their assumptions hold. Non-parametric tests (Mann–Whitney, Kruskal–Wallis, Spearman) compare ranks, make no normality assumption, and are the right choice for skewed measurements and ordered scores. Summarise with the matching statistic: mean ± SD alongside a parametric test, median (IQR) alongside a non-parametric one.

Reporting results in your thesis

  • Give exact p-values to three decimals (p = 0.032); write p < 0.001, never p = 0.000.
  • Report the test statistic and degrees of freedom — χ²(1) = 5.21 — not the p-value alone.
  • Show the group summaries the test compared, so the reader can see the size of the difference.
  • A non-significant result is a finding. Report it as clearly as a significant one.
  • When you run many comparisons, say so, and consider a correction for multiple testing.

Frequently asked questions

Should I use the chi-square test or Fisher's exact test?

Decide from the expected counts, not the observed ones. The chi-square test is valid when every expected count is at least 1 and no more than 20% of them are below 5 — for a 2 × 2 table, all four must be at least 5. Otherwise use Fisher's exact test for a 2 × 2 table, or merge sparse categories in a larger one.

When should I use a t-test instead of the Mann–Whitney U test?

Use the independent t-test when the measurement is roughly normal in each group. When it is skewed in either group, or the outcome is an ordered score such as a Likert item, use the Mann–Whitney U test.

How do I check whether my data are normally distributed?

Check within each group you are comparing, not across the whole column: a Shapiro–Wilk test per group together with a histogram or Q–Q plot. A column can look normal overall while one of its groups is badly skewed.

What test do I use for before-and-after data on the same patients?

A paired test: the paired t-test for a roughly normal measurement, the Wilcoxon signed-rank test when it is skewed, and McNemar's test for a yes/no outcome.

How should I report a p-value in my thesis?

Give the exact value to three decimal places (p = 0.032), write p < 0.001 for very small values rather than p = 0.000, and report the test statistic and the group summaries alongside it.

Have your data already?

Pythesis cleans your Excel sheet, chooses these tests by the same rules, runs them, and writes the Results chapter with real tables, charts and p-values from your own data.