T-test using SPSS

By Priya Chetty on February 2, 2015

When using this statistical test, you are testing the null hypothesis that 2 population means (average) are equal.  The alternative hypothesis is that they are not equal.  There are 3 different ways; One sample T-Test, Paired sample T-test and 2-sample T-tests to go about this, depending on how the data were obtained.

When to use T-Test and why?

The T-test is conducted to determine the differences in averages of different samples. For example, we want to determine if the average amount spent by people in Delhi on Movies is Rs. 250. The difference in average means between the sample is likely to be meaningful if, the difference in average is large, the sample size is large and the standard deviation is low (i.e. similar responses within the sample).

In comparison to Independent T-tests, T-tests are mostly similar only with the exception that it would enable the comparison of groups’ average with a specific number. With respect to example, we would keep the Value to be checked at Rs. 250 and then evaluate the deviation from the set value. On the other hand with respect to Paired sample t-tests, T-tests can be considered simpler. The Paired T-tests enable deeper analysis wherein we can also determine if the average value changes during Festivals like Diwali and Eid.

Deciding which T-test to Use

Neither the one-sample t-test nor the paired samples t-test requires any assumption about the population variances (difference in the opinions of the population), but the 2-sample t-test does.

One-sample T-test

If you have a single sample of data and want to know whether it might be from a population with a known mean, you have what’s termed a one-sample design, which can be analyzed with a one-sample t-test.

Example 1

You’re suspicious of the claim that the normal body temperature is 98.6 degrees.  You want to test the null hypothesis that the average body temperature for human adults is the long assumed value of 98.6, against the alternative hypothesis that it is not.  The value 98.6 isn’t estimated from the data; it is a known constant.  You take a single random sample of 1,000 adult men and women and obtain their temperatures.

Example 2

You think that 40 hours no longer defines the traditional workweek.  In this case, you want to test the null hypothesis that the average workweek is 40 hours, against the alternative that it isn’t.  You ask a random sample of 500 full-time employees how many hours they worked last week.

Example 3

You want to know whether the average IQ score for children diagnosed with schizophrenia differs from 100, the average for the population of all children.  You administer an IQ test to a random sample of 700 schizophrenic children.  Your null hypothesis is that the population value for the average IQ score for schizophrenic children is 100, and the alternative hypothesis is that it isn’t.

Data Arrangement

For the one-sample t-test, you have one variable that contains the values for each case.  For example:
A manufacturer of high-performance automobiles produces disc brakes that must measure 322 millimetres in diameter. Quality control randomly draws 16 discs made by each of eight production machines and measures their diameters.  Use a One-Sample T-Test to determine whether or not the mean diameters of the brakes in each sample significantly differ from 322 millimetres (YES or NO type question).  A nominal variable, Machine Number, identifies the production machine used to make the disc brake. Because the data from each machine must be tested as a separate sample, the file must first be split into groups by Machine Number (See Article, Selecting Cases).

Sample T-test, Figure 1
Figure 1

Select compare groups in the split file dialogue box (See Figure 2 below). Select the machine number from the variable listing and move it into the box for “groups based on.” Select the “compare groups circle” and under that, “sort the file by grouping variables” is a default option; don’t make any changes to it.

Sample T-test, Figure 2
Figure 2

Next, select “Analyze”, then “Compare means”, and then “One-sample T test” (See Figure 3 below).

Sample T-test, Figure 3
Figure 3

Select the test variable, i.e. disc brake diameter (mm), type 322 (See Figure 4) as the “Test Value”, and click options.

Sample T-test, Figure 4
Figure 4

In the “Options” dialogue box for the one-sample T-test, type 90 (this means the diameter size of the disc can be +/- 10% than .322 mm) in the “Confidence interval %” (Refer to article “Explanation of Better Terms of SPSS” For better understanding), then be sure that you have missing values coded as “exclude cases analysis by analysis,” (selected by default, never change this) then click continue, then click “OK”.

Note:  Generally we use a 95% confidence interval, but the examples below reflect a 90% confidence interval.

The output file will open containing many tables under the title “T-Test”. The “One-Sample Statistics” table displays the sample size, mean, standard deviation, and standard error for each of the eight samples. The sample means disperse around the 322mm standard by what appears to be a small amount of variation.

Table 1: Descriptives Table
Table 1: Descriptives Table
The test statistic table shows the results of the one-sample T-test
Table 2: The test statistic table shows the results of the one-sample T-test

The “One same Test” table displays the following:

  1. The t column displays the observed t statistic for each sample, calculated as the ratio of the mean difference divided by the standard error of the sample mean.
  2. The df column displays degrees of freedom. In this case, this equals the number of cases (i.e. machines) in each group minus 1. Therefore, in this case, the number of discs per machine is 16.
  3. The column labelled Sig. (2-tailed) displays a probability from the t distribution with 15 degrees of freedom. The value listed is the probability of obtaining an absolute value greater than or equal to the observed t statistic if the difference between the sample means and the test value is purely random. Negative values in ‘t’ column cannot be considered significant, so we can automatically rule them “insignificant”.
  4. The Mean Difference is obtained by subtracting the test value (322 in this example) from each sample mean.


Since their confidence intervals lie entirely above 0.0, you can safely say that machines 2, 5 and 7 (encircled in RED in Table 2) are producing discs that are significantly wider than 322mm on average.

In the case of machine 4, although it reflects a significant value, the t value is negative i.e. -2.613. Therefore machine 4 cannot be considered as significant.

PS: When reporting the results of a t-test, make sure to include the actual means, differences, and standard errors.  Don’t give just at value and the observed significance level.


The one-sample t-test can be used whenever sample means must be compared to a known test value. As with all t-tests, the one-sample t-test assumes that the data be reasonably normally distributed, especially with respect to skewness.


I am a management graduate with specialisation in Marketing and Finance. I have over 12 years' experience in research and analysis. This includes fundamental and applied research in the domains of management and social sciences. I am well versed with academic research principles. Over the years i have developed a mastery in different types of data analysis on different applications like SPSS, Amos, and NVIVO. My expertise lies in inferring the findings and creating actionable strategies based on them. 

Over the past decade I have also built a profile as a researcher on Project Guru's Knowledge Tank division. I have penned over 200 articles that have earned me 400+ citations so far. My Google Scholar profile can be accessed here

I now consult university faculty through Faculty Development Programs (FDPs) on the latest developments in the field of research. I also guide individual researchers on how they can commercialise their inventions or research findings. Other developments im actively involved in at Project Guru include strengthening the "Publish" division as a bridge between industry and academia by bringing together experienced research persons, learners, and practitioners to collaboratively work on a common goal.