t-test in practice with SPSS

Hang Nguyen
3 min readApr 13, 2022

--

# In Data Analyst series

A. Prepossessing:

  1. Creating a new variable naming “belTotal” as sum score of “bel” variable.

Transform -> Compute Variable

Create a new variable. Here beTotal for sum score

2. Checking missing values: 0 value for bel, day, ank variables.

Transform -> Replace missing values

3. Check normality: Variable is considered to follow normal distribution if skewness is between ‐2 to +2 and kurtosis is between ‐7 to +7, which is acceptable in this case for belTotal variable.

B. Hypothesis testing:

1. One-sample t-test

Does the average score of uncertainty differ significantly from test value of 50?

H0: No, there’s no significant difference between average score of uncertainty with test value

H1: Yes, there’s significant difference.

Analyze -> Compare means -> One-sample t-test

Population mean score for belTotal variable is 38.9116. Mean difference of test value from population mean is -11.08840.

P-value for both one-sided and two-sided <.05, which then rejects the null hypothesis and there’s significant difference between average score of uncertainty with test value.

2. Independent groups t-test

Let’s take a look at variable “gender”, there are twice as much as female than male for in data set, which makes the results quite questionable while running hypothesis testing. (1:male, 2:female)

Does the average score of betTotal differ significantly by gender?

H0: No, there’s no significant difference by gender when comes to uncertainty average mean.

H1: Yes, there’s significant difference by gender when comes to uncertainty average mean.

Significance of independent sample t-test is .603>0.05, meaning the variances of mean of these 2 groups are basically similar so that we can do the analysis.

P-value for both groups in one-sided and two-sided testing are >.05, meaning that we accept the null hypothesis that there’s no significant difference by gender when comes to uncertainty average mean score.

3. Paired groups tests

Does the uncertainty average score change after 1 month?

H0: The uncertainty of people after 1 month does not change.

H1: The uncertainty of people after 1 month changes.

p-value <.05, meaning reject the null hypothesis H0. The uncertainty of people after 1 month changes.

From this, we can see after 1 month, the uncertainty mean score actually reduces.

--

--

Hang Nguyen
Hang Nguyen

Written by Hang Nguyen

Just sharing (data) knowledge

No responses yet