Open the following data set. The set contains 75 scores which represent typing speed in words per minute for 3rd and 4th grade students. The data consists of 39 3rd grade students and 36 4th grade students. We will explore the following hypotheses:
- H0: Typing speeds do not vary between 3rd and 4th grade
- H1: There is a difference between typing speed among 3rd and 4th grade students.
The population mean (μ) is 11.48. The population standard deviation (σ) is 6.77.
We will use the 4th grade scores as the sample to see if they differ from the population mean. The sample mean (x̅) is 14.14
We now have all of the information we need to compute the z-score.
SPSS
It is important to note that there is no way to conduct the one-sample z-test using the pre-existing menus in SPSS. That being said, there still is a way to calculate one-sample z-score in SPSS using syntax in SPSS. For this purpose, we have pre-calculated our population mean, sample mean, sample size, and population standard deviation.
1. Open SPSS
2. Click on New, then Syntax
3. copy the syntax below and paste it into the box in SPSS:
data list list / n sample_mean population_mean population_sd.
begin data
35 105 100 15
end data.
Compute mean_difference = sample_mean - population_mean.
Compute square_root_n =SQRT(n).
Compute standard_difference = population_sd/square_root_n.
Compute z_statistic = mean_difference/standard_difference.
Compute chi_square = z_statistic*z_statistic.
Compute p_value = SIG.CHISQ(chi_square, 1).
Compute cohens_d = mean_difference/population_sd.
EXECUTE.
Formats z_statistic p_value cohens_d (f8.5).
LIST z_statistic p_value.
4. Change the numbers in the third line of syntax (pre-populated with 35 105 100 15) to numbers from your data set in the following order: sample size, sample mean, population mean, and population standard deviation.
5. Click on Run on the top tool bar, then select All
6. This will output the z-score and p-value.
*Note: the above syntax and method was modified from a presentation on how2stats located at the following website: http://www.how2stats.net/2014/03/one-sample-z-test.html
The website also contains helpful videos for the process of using syntax in SPSS.