Procedure demonstrated with an example

  1. The example and data set
  2. Setting up the data
  3. Analyzing the date with one sample t test
  4. Checking assumption for the method
  5. Reading the output
  6. Interpreting the results

The sleep study and data set

College-aged adults need at least 7 hours of sleep each night to stay healthy. Sleep deprivation can lead to decreased immune system function, lack of concentration, and poor memory. In the data set “sleep.sav”, a simple random sample of college students reports the number of hours of sleep they had last night. Is there evidence that the true population mean hours of sleep for college students in the population is less than the 7 hours that are recommended?

Setting up the data

Open the data set from SPSS.

In Data View: one observation per row.

In Variable View: one variable per row.

Analyzing the data

  1. Analyze -> Compare means -> One-Sample T test.
  2. Move the variable into the “Test Variable(s)” box.
  3. Type the value of under into the “Test Value” box.
  4. By default, it will also give you the 95% confidence interval. To change the confidence level, you may click “Options” on the right bottom corner of the “One-Sample T Test” window and then change it.
  5. Continue -> OK.
  6. In the output, the P-value, Sig. 2-tailed, is for two-sided test. If you have a one-sided t test, your test P-value should be (Sig. 2-tailed)/2.
  7. The one-sample t confidence interval = (Test value + Lower, Test value + Upper).

Checking assumptions

One sample t-test assumes that the data follow a normal distribution. This can be checked with a Normal quantile plot . The data looks fine in this problem

Reading the output

One-Sample Statistics: gives the sample size, mean and SD.

One-Sample Test: gives your t, df, 2-tailed sig., and other stuff you don’t need to worry about.

NOTE: SPSS does only two-tailed tests. The t-obtained would be the same for a one or twotailed test, but if you are doing a one-tailed test, you will have to look up the t-critical yourself to see if t-obtained is larger than t-critical. Alternatively, you can divide the significance by two to calculate the significance of a one-tailed test (as long as your effect is in the predicted direction).

Interpreting the result

Based on the data, conduct a hypothesis test (with a 0.05 significance level) to see if there is evidence that the population mean hours of sleep for college age students is less than the recommended 7 hours per night. Use α= 0.05.

According to the One-Sample Test table, t = -2.030, P-value = 0.052/2 = 0.026
Reject the null hypothesis. We have evidence that the population mean number of hours of sleep for college students is less than 7 hours.