Hypothesis to Statistical Analysis Selection
Not sure which statistical test to use? Describe your research hypothesis and variables to find the most appropriate analysis.
Not sure which statistical test to use? Describe your research hypothesis and variables to find the most appropriate analysis.
Choosing the right statistical test comes down to four questions. What is your research question: a difference, a relationship, a prediction or a change? How many groups or variables are involved? What type of data is the outcome: continuous, categorical or a count? Are the observations independent or repeated? The answers narrow the options to one or two tests.
This list of statistical tests and when to use them covers the most common hypotheses in psychology, biology, medicine and education.
| Your question | Test to use | Example |
|---|---|---|
| Compare two independent groups | Independent t-test (or Mann-Whitney U if not normal) | Do men and women differ in sleep duration? |
| Compare the same people twice | Paired t-test (or Wilcoxon) | Anxiety before and after training |
| Compare three or more groups | One-way ANOVA (or Kruskal-Wallis) | Stress across three school types |
| Compare groups on two factors | Two-way ANOVA | Gender and treatment effects on depression |
| Same people measured three or more times | Repeated-measures ANOVA (or Friedman) | Mood at baseline, week 4 and week 8 |
| Relationship between two continuous variables | Pearson or Spearman correlation | Study hours and exam score |
| Predict an outcome from predictors | Multiple linear regression | Study hours and sleep predicting exam score |
| Predict a yes/no outcome | Logistic regression | Risk scores predicting a diagnosis |
| Two groups of categorical data (statistical test to compare two categorical variables) | Chi-squared test (Fisher’s exact for small counts, or two-proportion z-test) | Is smoking status linked to gender? |
| Does a third variable explain the link? | Mediation analysis | Exercise explaining the link between social support and depression |
| Does the effect depend on another variable? | Moderation analysis | Job autonomy changing the workload and burnout link |
| Check a questionnaire’s structure | CFA or EFA | Does the scale have three factors? |
| Model several relationships at once | SEM or path analysis | Social support, coping and well-being in one model |
In SPSS, t-tests are under Analyze > Compare Means, correlations under Analyze > Correlate and regression under Analyze > Regression. In Excel, the Data Analysis ToolPak offers t-tests, ANOVA, correlation and regression. StatFas runs the same analyses free in your browser with APA 7 output and no installation.
The chi-squared test compares observed counts with the counts expected if two categorical variables were unrelated. In linear regression you test whether each slope differs from zero and whether the whole model explains variance. For correlation you test whether r differs from zero, then report r with its confidence interval.
Hypothesis tests with p-values belong to quantitative research. Qualitative studies usually work with research questions or propositions and examine them through coding and thematic analysis.
Psychology: questionnaire data often calls for correlation, regression, ANOVA, mediation, moderation and CFA. Biology: small samples and skewed data favour non-parametric tests, ANOVA, regression and PCA. Treatment or intervention studies: compare change between groups with ANCOVA or a mixed ANOVA, which are not yet on StatFas; use a paired t-test when there is no control group.
Use an independent t-test when the groups contain different people and the outcome is continuous and roughly normal. Use the Mann-Whitney U test if it is not normal. If the same people are measured twice, use a paired t-test or the Wilcoxon signed-rank test.
Use the chi-squared test of independence. If expected counts are below 5, use Fisher’s exact test. For comparing two percentages, a two-proportion z-test also works. Report Cramér’s V as the effect size.
Answer four questions: what is your research question (difference, relationship, prediction or change), how many groups or variables are involved, what type of data is the outcome (continuous, categorical or count), and are the observations independent or repeated. The table and flowchart on this page map those answers to a test.
Paste the hypothesis into the box at the top of this page and choose your study design. The tool reads the wording (for example “associated with”, “differs between”, “mediates” or “predicts”) and suggests an analysis, assumptions to check and an APA 7 reporting tip.
State the null and alternative hypotheses, choose a test that fits your data, check its assumptions, run the test, and report the test statistic, p-value, effect size and 95% confidence interval. Interpret the result in the context of your design.
The tool is free and needs no account. The matching happens in your browser, so the hypotheses you type are not sent to a server.
More tools: test chooser and APA 7 cheat sheet, tutorials and the full list of free statistical analysis tools.