Confidential · Professional · Structured · Research & publication support worldwide
Home / Free Guides / Which Statistical Test Should I Use? SPSS & Python Guide
FHJCIS • Free free tool

Which Statistical Test Should I Use? SPSS & Python Guide

Pick the right test for your thesis data, then see the SPSS menu path, the Python function and what to report.

By the FHJCIS Research Team · Updated · 8 min read

Choosing a statistical test is one of the most common sticking points in a thesis. The right test depends on your research question, the type of your data, how many groups you have and whether the same people were measured more than once. Use the chooser below, then read the reference table to see menu paths in SPSS and function names in Python.

Which test should I use?

Answer a few questions and get a suggested test, how to run it in SPSS and in Python, and what to report.

Before you test: three checks

  1. Type of data. Numeric (continuous), ordinal (ranked, such as Likert items) or categorical (groups or labels).
  2. Design. Are groups independent (different people) or related (the same people measured again, or matched pairs)?
  3. Assumptions. Many tests assume roughly normal data, similar variances and independent observations. Check them with plots and tests such as Shapiro-Wilk (normality) and Levene (variances). With small samples be especially careful.

Reference table: common tests

QuestionTestSPSS menuPython (SciPy / statsmodels)
Two independent groups, numericIndependent t-test (or Mann-Whitney U if not normal)Analyze > Compare Means > Independent-Samples T Testscipy.stats.ttest_ind, mannwhitneyu
Same people, two times, numericPaired t-test (or Wilcoxon signed-rank)Analyze > Compare Means > Paired-Samples T Testscipy.stats.ttest_rel, wilcoxon
Three or more independent groupsOne-way ANOVA (or Kruskal-Wallis)Analyze > Compare Means > One-Way ANOVAscipy.stats.f_oneway, kruskal
Same people, three or more timesRepeated-measures ANOVA (or Friedman)Analyze > General Linear Model > Repeated Measuresstatsmodels AnovaRM, scipy.stats.friedmanchisquare
Relationship, two numeric variablesPearson (or Spearman)Analyze > Correlate > Bivariatescipy.stats.pearsonr, spearmanr
Association, two categorical variablesChi-square (or Fisher's exact)Analyze > Descriptive Statistics > Crosstabs > Statisticsscipy.stats.chi2_contingency, fisher_exact
Predict a numeric outcomeLinear regressionAnalyze > Regression > Linearstatsmodels.formula.api.ols
Predict a yes/no outcomeLogistic regressionAnalyze > Regression > Binary Logisticstatsmodels.formula.api.logit
Reliability of a scaleCronbach's alphaAnalyze > Scale > Reliability Analysispingouin.cronbach_alpha
Check normalityShapiro-Wilk and plotsAnalyze > Descriptive Statistics > Explore > Plotsscipy.stats.shapiro

Menu names can differ slightly between SPSS versions. The Python names refer to the SciPy, statsmodels and pingouin libraries.

A tiny Python example

Pythonimport pandas as pd
from scipy import stats

df = pd.read_csv("survey.csv")
a = df.loc[df["group"] == "A", "score"]
b = df.loc[df["group"] == "B", "score"]

print(stats.shapiro(a), stats.shapiro(b)) # normality
print(stats.levene(a, b)) # equal variances
print(stats.ttest_ind(a, b, equal_var=False)) # Welch t-test

Reporting results well

  • State the test, why you chose it, and which assumptions you checked.
  • Report the test statistic, degrees of freedom (if any), exact p-value, sample size and an effect size with a confidence interval.
  • Do not describe a non-significant result as "proof of no difference", and do not describe a significant correlation as causation.
  • Describe any data cleaning, outlier handling and missing data decisions.
Decision aid onlyThe chooser follows common textbook rules. Your field, sample size and supervisor may require a different approach (for example mixed models, robust methods or Bayesian analysis). Confirm your choice before running final analyses. If you need help with your analysis workflow, see our Data Analysis & Technical Support service. Results and conclusions stay your own responsibility.
FAQ

Frequently asked questions.

Do I always need to test for normality before a t-test?

You should check that the assumption is reasonable, using plots and, where helpful, a test such as Shapiro-Wilk. With larger samples the t-test is fairly robust to moderate non-normality, while with small samples and clearly skewed data a non-parametric test such as Mann-Whitney U is safer. Welch's version of the t-test handles unequal variances.

What is the difference between independent and paired data?

Independent data come from different people in each group. Paired (related) data come from the same people measured twice, or from matched pairs such as twins. Using the wrong type is a common mistake, because paired data need paired tests.

Should I use SPSS or Python for my thesis?

Either works. SPSS is menu-driven and common in social sciences, while Python is free, scriptable and reproducible, which suits data-heavy work. Choose the tool your supervisor and department accept and that you can document clearly, and always report the software and version.

What is an effect size and why report it?

An effect size shows how large a difference or relationship is, which a p-value alone does not. Examples are Cohen's d for mean differences, eta squared for ANOVA and Cramer's V for chi-square. Many journals now ask for effect sizes along with confidence intervals.

Can FHJCIS run my analysis?

FHJCIS offers data analysis and technical support, such as guidance on choosing methods, preparing datasets, producing tables and figures and checking interpretations. You remain responsible for your data, your conclusions and your originality.

Watch and learn on our YouTube channel

Short videos on thesis writing, research tips and publication guidance from FHJCIS. Subscribe to @fhjcis so you do not miss new ones.

Subscribe on YouTube →
Need help with your own project?

Talk to the FHJCIS research team in Bahawalpur.

Message us on WhatsApp with your subject, service needed and deadline, and we will reply with a custom quote. We give guidance that strengthens your own work, with no guarantees of results.

WhatsApp +92 331 2663342 →WhatsApp +92 312 6243342 →Contact page
Academic integrity

Guidance that strengthens your own work

These guides give general information, not legal or institutional advice. Your university and target journal set the rules that apply to you. FHJCIS provides research support, editing, formatting and analysis assistance; clients remain responsible for originality, accuracy, authorship and institutional compliance.

Chat on WhatsApp