Skip to content

Recent Posts

  • How to Pass your Comprehensive Exams
  • Glossary of Common Academic Acronyms and Jargon (Canada & U.S.)
  • Five Online Tools for Doing Social Research
  • Writing Prompts to Overcome Writer’s Block
  • Please stop starting letters like this…

Most Used Categories

  • Publishing (4)
  • Writing (8)
  • Design (6)
  • Methods (18)
    • Software (11)
      • STATA (1)
      • SPSS (10)
    • Statistics (6)
    • Qualitative (1)
  • General Advice (5)
Skip to content

Practical Advice for Research, Writing, and Academia’s Hidden Curriculum

Subscribe
  • General Advice
  • Writing
  • Methods
    • Qualitative
    • Quantitative
  • Software
    • SPSS
    • STATA
  • Publishing
  • Podcast
  • Home
  • Methods
  • Software
  • SPSS
  • Calculating a t-test in SPSS

Calculating a t-test in SPSS

Phyllis L. F. RippeyNovember 9, 2021November 9, 2021

Table of Contents

Toggle
  • Calculating a t-test in SPSS in order to compare differences between means and/or proportions
    • What you’ll need variable-wise:
    • The steps in SPSS for calculating a t-test for comparing two independent means or proportions.
    • Your Output will look like this:
    • How these data should be presented in a table in a paper:
    • To do the same thing using syntax:

Calculating a t-test in SPSS in order to compare differences between means and/or proportions


What you’ll need variable-wise:

For comparing mean differences between groups: a dichotomous (binary) independent variable and an interval-ratio dependent variable.

For comparing differences in proportions between groups: a dichotomous (binary) independent variable and a dummied dependent variable (i.e. a variable coded 1/0).


The steps in SPSS for calculating a t-test for comparing two independent means or proportions.

  1. Analyze –> compare means –> Independent Sample t-tests
  2.  move your dependent variable  (the interval variable for testing means or dummy for testing differences in proportions)  into the Test Variables box
  3. move the independent (dichotomous) variable into the grouping variable box à click on define groups –> type in what the categories of the dichotomous variable are (1 & 0 or 1 & 2 or whatever they are)
  4. Click on options and make sure to tick “exclude cases listwise” (you can also change the confidence level from 95% to something else
  5. Click OK (or paste if you want to use syntax)

Your Output will look like this:


How these data should be presented in a table in a paper:


To do the same thing using syntax:

*check your work with a crosstab*.
crosstabs marstat by dummarcom.

****************************
* Recoding your variables *
****************************
*create a binary independent variable*.
RECODE MARSTAT (1=1) (2=1) (SYSMIS=SYSMIS) (3 thru 6=0) (ELSE=SYSMIS) INTO DumMarCom.
VARIABLE LABELS  DumMarCom ‘Dummy for Married/CommonLaw’.


recode CHINHSDC (1 thru 3=1) (0=0) (else=sysmis) (sysmis=sysmis) into dumHasKidsHousehold.
variable labels dumHasKidsHousehold ‘Dummy for Has Kids’.

*check your work with a crosstab*.
crosstabs CHINHSDC by dumHasKidsHousehold .

*explore the interval-ratio variable with a frequency table or descriptive statistics to make sure that missing data is not included in the analyses*.

freq hsdsizec.

********************
* Running t-Tests *
********************
T-TEST GROUPS=DumMarCom(1 0)/MISSING=LISTWISE/VARIABLES=dumHasKidsHousehold HSDSIZEC  /CRITERIA=CI(.95).


Post navigation

Previous: ANOVA in SPSS
Next: Calculating Confidence Intervals in SPSS

Related Posts

Pros & Cons of SPSS

September 24, 2019September 21, 2021 Phyllis L. F. Rippey

Opening Data in SPSS

September 21, 2019September 21, 2021 Phyllis L. F. Rippey

Exploring Data in SPSS

September 21, 2019September 21, 2021 Phyllis L. F. Rippey

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright All Rights Reserved | Theme: BlockWP by Candid Themes.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.