What Is SPSS and Why Do Medical Researchers Use It?
SPSS (Statistical Package for the Social Sciences) is a point-and-click statistical software platform developed in the 1960s and now owned by IBM. Despite its name referencing "social sciences," it has become the dominant analysis tool in clinical research, epidemiology, public health, and medical education across the developing world particularly in Egypt, Saudi Arabia, India, Southeast Asia, and Sub-Saharan Africa.
Its dominance in medical thesis research comes from three practical advantages:
- No programming required: Unlike R or Python, all analyses are accessible through menu clicks. A researcher who has never written a line of code can run a complete statistical analysis.
- Institutional availability: Most medical universities and teaching hospitals have site licenses for SPSS versions 2029, making it the common language of academic statistical consulting.
- APA-formatted output: SPSS generates structured output tables that are directly comparable to the tables expected in medical journals and thesis committees.
Understanding the SPSS Interface: Data View vs Variable View
When you open SPSS and create a new dataset, you see a spreadsheet with two tabs at the very bottom of the window: Data View and Variable View. Understanding the difference between these two tabs is the most important conceptual step for any beginner.
Switch between them by clicking Variable View first, then Data View for data entry.
Data View
Data View is your data matrix the actual spreadsheet where numbers live. Each row represents one participant (one patient, one case), and each column represents one variable. A dataset with 80 patients and 15 measured variables will have 80 rows and 15 columns in Data View. This is where you type or paste your raw data after setting up Variable View.
Variable View
Variable View is your data dictionary it defines the rules for every column in your dataset. Each row in Variable View corresponds to one variable (one column in Data View). The columns in Variable View define the properties of each variable:
- Name: A short identifier with no spaces (e.g.,
age,sbp,sex). Maximum 64 characters, no spaces, no special characters except underscore. - Type: Numeric (default, for numbers) or String (for text). Almost all medical research variables should be Numeric.
- Label: The full descriptive name that appears in output tables (e.g., "Systolic Blood Pressure (mmHg)"). Always fill this in it makes your output readable.
- Values: Code labels for categorical variables. Click the cell enter pairs of code and label (1 = Male, 2 = Female).
- Missing: Define what code you are using for missing data (e.g., 99 for a 15 Likert scale, or 999 for age). SPSS will automatically exclude these from analysis.
- Measure: The measurement level Nominal, Ordinal, or Scale. This is critical set it correctly for every variable.
Data Entry and Variable Coding: The Foundation of Clean Analysis
Variable coding is the process of assigning numeric codes to categorical responses. Because SPSS works primarily with numbers, every categorical response must be converted to a numeric code before data entry. A common source of errors in medical theses is inconsistent coding the coding scheme must be established in Variable View before a single data point is entered.
Standard Coding Conventions in Medical Research
| Variable | SPSS Name | Values (Codes) | Measure Level |
|---|---|---|---|
| Sex | sex | 1 = Male, 2 = Female | Nominal |
| Disease stage | stage | 1 = Stage I, 2 = Stage II, 3 = Stage III, 4 = Stage IV | Ordinal |
| Treatment group | group | 1 = Control, 2 = Drug A, 3 = Drug B | Nominal |
| Outcome (binary) | outcome | 0 = No event, 1 = Event occurred | Nominal |
| Satisfaction (Likert) | satisfy | 1 = Very dissatisfied 5 = Very satisfied | Ordinal |
| Age (years) | age | Continuous (no codes needed) | Scale |
| Hemoglobin (g/dL) | hgb | Continuous (no codes needed) | Scale |
| Systolic BP (mmHg) | sbp | Continuous (no codes needed) | Scale |
Creating Value Labels for Better-Looking Output
In Variable View, click the cell in the Values column for your categorical variable. Click the small grey button that appears to open the Value Labels dialog. Add each code-label pair: type 1 in the Value box, type Male in the Label box, click Add. Repeat for each category. Now your output tables will show "Male" and "Female" instead of "1" and "2" making tables immediately interpretable without a separate code book.
Running Descriptive Statistics in SPSS
The first analysis in any medical thesis is descriptive statistics a characterization of your sample that answers the question "who are your participants?" This becomes Table 1 in virtually every published clinical paper.
For Continuous Variables (Scale): Mean, SD, Range
Open Descriptives
Navigate to: Analyze Descriptive Statistics Descriptives
Select Variables
Move all continuous variables (age, hemoglobin, SBP, BMI, etc.) into the Variables box. Click Options to select which statistics to include: Mean, Std. Deviation, Minimum, Maximum. For medical theses, also select Skewness to help assess normality.
Run and Read Output
Click OK. SPSS generates a Descriptive Statistics table with N, Minimum, Maximum, Mean, and Std. Deviation for each continuous variable. This forms the basis of your "Characteristics of the Study Population" table.
Frequency Tables for Categorical Variables
For nominal and ordinal variables (sex, blood group, disease stage, treatment group, yes/no outcomes), you need frequency tables counts and percentages for each category. These also appear in Table 1 of your thesis.
Open Frequencies
Select Categorical Variables
Move all categorical variables (sex, group, stage, outcome, etc.) into the Variable(s) box. Leave "Display frequency tables" checked. Click OK.
Testing Normality in SPSS Before Choosing a Test
Before selecting any inferential statistical test for a continuous outcome variable, you must assess whether the variable follows a normal distribution. Parametric tests (t-test, ANOVA, Pearson correlation) assume normality; non-parametric tests (Mann-Whitney, Kruskal-Wallis, Spearman) do not. Skipping this step is one of the most common methodological errors in medical theses.
Run the Explore Procedure
Move your continuous variable into the Dependent List. If testing by group, move the grouping variable into the Factor List.
Request Normality Tests and Plots
Click Plots check Normality plots with tests and Histogram. Click Continue, then OK.
Read the Tests of Normality Table
Find the Shapiro-Wilk column (recommended for n < 300). Look at the Sig. value. If Sig. > 0.05 data consistent with normality use parametric tests. If Sig. < 0.05 evidence of non-normality consider non-parametric alternatives. Also inspect the histogram and Q-Q plot visually.
For a complete guide to normality testing including Shapiro-Wilk vs Kolmogorov-Smirnov, histogram interpretation, and what to do if data is non-normal, read our dedicated article: How to Test Normality in Medical Research
Choosing the Correct Statistical Test
After assessing normality, use the following decision table to select the appropriate test. The choice depends on three factors: how many groups you are comparing, whether groups are independent or paired/related, and whether the normality assumption is met.
| Research Situation | Normal Data Parametric | Non-Normal Non-Parametric |
|---|---|---|
| Compare means: 2 independent groups | Independent Samples T-Test | Mann-Whitney U Test |
| Compare means: 2 paired/repeated measurements (before-after) | Paired Samples T-Test | Wilcoxon Signed-Rank Test |
| Compare means: 3 or more independent groups | One-Way ANOVA + Post-Hoc | Kruskal-Wallis Test |
| Compare proportions: 2 categorical variables | Chi-Square Test* | Fisher's Exact Test (small n) |
| Association between 2 continuous variables | Pearson Correlation (r) | Spearman Correlation () |
| Predict outcome from one continuous predictor | Linear Regression | |
| Predict binary outcome (yes/no) | Binary Logistic Regression |
* Chi-Square has its own assumption: all expected cell frequencies 5. Use Fisher's Exact if any expected frequency < 5.
Running the Independent Samples T-Test in SPSS
Use the independent t-test when you want to compare the mean of a normally distributed continuous variable between two separate, unrelated groups for example, comparing mean hemoglobin between male and female patients, or comparing mean SBP between a treatment and a control group.
Open Independent Samples T-Test
Define Variables
Move the continuous outcome variable (e.g., hemoglobin) into the Test Variable(s) box. Move the grouping variable (e.g., sex: coded 1=Male, 2=Female) into the Grouping Variable box. Click Define Groups and enter the two group codes (1 and 2). Click Continue.
Click OK and Read the Output
SPSS generates two tables: (1) Group Statistics shows N, mean, SD, and SE for each group; (2) Independent Samples Test shows Levene's test for equality of variances and the t-test results with the p-value (Sig. 2-tailed).
How to Read the Independent Samples Test Output
The output table has two rows: Equal variances assumed and Equal variances not assumed. Which row to read depends on Levene's test:
- Levene's p > 0.05 (variances are equal): Read the Equal variances assumed row.
- Levene's p < 0.05 (variances are unequal): Read the Equal variances not assumed row (SPSS automatically adjusts the degrees of freedom).
Question: Is there a significant difference in hemoglobin levels between male and female patients?
SPSS Output: Group Statistics: Males (n=47): Mean = 13.6 +/- 1.7 g/dL; Females (n=38): Mean = 11.8 +/- 1.6 g/dL
Levene's F = 0.84, p = 0.362 Equal variances assumed row.
t(83) = 4.87, p < 0.001 (Sig. 2-tailed = .000 in SPSS output)
Running One-Way ANOVA in SPSS
When you have three or more independent groups and want to compare a normally distributed continuous outcome variable across all groups simultaneously, use one-way ANOVA. Example: compare mean fasting glucose across three groups normal weight, overweight, and obese patients.
Open One-Way ANOVA
Define Variables
Move the continuous outcome variable into the Dependent List. Move the grouping variable (with 3+ categories) into the Factor box.
Request Post-Hoc Tests
Click Post Hoc. For equal variances: check Tukey (most commonly used in medical research). For unequal variances: check Games-Howell. Click Continue. Then click Options check Descriptive and Homogeneity of variance test. Click Continue OK.
Read the ANOVA Table and Post-Hoc Results
The ANOVA table shows the F statistic and the p-value (Sig.). If p < 0.05, at least one group mean is significantly different. The Tukey post-hoc table then shows which specific pairs differ, with adjusted p-values for each pairwise comparison.
Running the Chi-Square Test in SPSS
Use Chi-Square when both variables are categorical you want to know whether the distribution of one categorical variable differs across categories of another. For example: is there a significant association between sex and disease outcome (yes/no), or between treatment group and response (responder/non-responder)?
Open Crosstabs
Define Variables
Move one categorical variable into the Row(s) box and the other into the Column(s) box. Conventionally, the grouping (independent) variable goes in the rows and the outcome (dependent) variable goes in the columns.
Request Chi-Square and Percentages
Click Statistics check Chi-square and Phi and Cramer's V (effect size). Click Continue. Click Cells check Observed (counts) and Row percentages. Click Continue OK.
Check Expected Frequencies Before Reading Results
In Cells, also check Expected. Review the crosstable output SPSS will add a footnote telling you how many cells have expected frequencies < 5. If > 20% of cells have expected frequency < 5, use Fisher's Exact Test instead of Chi-Square (read the "Fisher's Exact Test" row in the Chi-Square Tests output table).
Question: Is there a significant association between sex and 30-day readmission (yes/no) in 85 cardiac patients?
SPSS Output:
Males: 14/47 readmitted (29.8%); Females: 19/38 readmitted (50.0%)
All expected frequencies 5 (Chi-Square valid).
Pearson 2(1) = 3.82, p = 0.051; Cram(c)r's V = 0.21
Interpreting SPSS Output Tables: Key Rules for Medical Research
Understanding what SPSS output means and what it does not mean is as important as knowing how to generate it. The following principles apply to output from every analysis.
The Sig. Column Is Always Your p-Value
Across all SPSS output tables, the column labeled Sig. or Asymp. Sig. or Sig. (2-tailed) contains the p-value for the test. SPSS always displays p-values to three decimal places and shows .000 when the actual value is less than 0.0005. Never report ".000" in your thesis convert it to "p < 0.001."
Always Report the Test Statistic, Degrees of Freedom, and p-Value Together
A bare p-value ("p = 0.032") is insufficient for a thesis or journal. Always report the complete statistical statement in the standardized format:
A Significant Result Does Not Prove Clinical Importance
A statistically significant p-value (p < 0.05) only tells you the result is unlikely due to chance. With a large enough sample, even a clinically trivial difference such as 0.2 mmHg difference in blood pressure will achieve statistical significance. Always report the mean difference (or odds ratio, or correlation coefficient) and its 95% confidence interval alongside the p-value to convey the magnitude of any finding.
Common SPSS Mistakes in Medical Thesis Writing
Mistake 1: Using the Wrong Measurement Level for Variables
Setting a nominal variable (like sex or blood group) to "Scale" in Variable View causes SPSS to compute a meaningless mean (mean sex = 1.44). Setting a continuous variable (like age) to "Nominal" prevents SPSS from generating appropriate descriptive statistics. These errors cascade through every analysis that uses those variables.
Mistake 2: Skipping Normality Testing Before Selecting Statistical Tests
Applying a t-test or ANOVA to non-normally distributed data serum CRP, hospital length of stay, platelet counts in disease states without first checking normality is among the most common methodological errors flagged by thesis examiners. It results in p-values and confidence intervals that may be incorrect.
Mistake 3: Copy-Pasting Raw SPSS Output Tables Into the Thesis
Raw SPSS output tables have six decimal places, non-standard fonts, wide column widths, and header formats that do not match academic journal or thesis committee standards. Submitting unedited SPSS output is a signal that the researcher does not understand what the table means and it will be noticed.
Mistake 4: Reporting p = 0.000
SPSS displays ".000" in the Sig. column when the p-value is less than 0.0005 it is a rounding artifact, not a real value. Reporting "p = 0.000" in a thesis or paper is an immediate indicator that the researcher copied the SPSS output without understanding it.
Mistake 5: Running Chi-Square Without Checking Expected Cell Frequencies
Chi-Square is only valid when all expected cell frequencies are 5. Researchers routinely run Chi-Square and report the result without verifying this assumption especially in studies with small group sizes or rare outcomes. SPSS adds a footnote to the Chi-Square output telling you how many cells violate this rule, but many researchers ignore or do not notice it.
Mistake 6: Running Multiple T-Tests Instead of One-Way ANOVA
Comparing mean values across three groups (e.g., Drug A vs Drug B, Drug A vs Placebo, Drug B vs Placebo) by running three separate t-tests inflates the Type I error rate from 5% to 14.3% meaning your "significant" findings at the 5% level may simply be a product of repeated testing rather than a real effect. This is a fundamental statistical error.
Frequently Asked Questions
Not Sure Which Test to Run Next?
StatClinic's AI Statistical Assistant identifies the correct test for your study design, data type, and normality result then walks you through interpretation. Free, no registration required.
Try StatClinic AI Statistical Assistant