January 28, 2026

A hypothetical dataset given below is a sample of data concerning the quality control for hair products collected at a factory. The quality control runs on three working shifts: Morning, Afternoon, and Night. At regular time intervals, output batches are measured, and their pH is recorded. The target pH range is 4.5–5.5. Test the hypothesis that there is a difference between the pH levels recorded in shift times (afternoon and night). 95% confidence interval (α = 0.05).
| Case | Batch number | Working shift | pH level |
|---|---|---|---|
| 1 | 3 | Night | 4.97 |
| 2 | 6 | Night | 5.09 |
| 3 | 3 | Morning | 4.93 |
| 4 | 6 | Morning | 5.11 |
| 5 | 1 | Afternoon | 4.94 |
| 6 | 5 | Afternoon | 5.41 |
| 7 | 1 | Afternoon | 4.80 |
| 8 | 4 | Afternoon | 4.69 |
| 9 | 4 | Night | 4.53 |
| 10 | 4 | Morning | 4.83 |
| 11 | 4 | Morning | 4.88 |
| 12 | 1 | Afternoon | 5.16 |
| 13 | 6 | Afternoon | 5.26 |
| 14 | 6 | Night | 4.56 |
| 15 | 3 | Morning | 5.33 |
| 16 | 2 | Afternoon | 5.53 |
| 17 | 3 | Night | 4.60 |
| 18 | 5 | Morning | 5.01 |
| 19 | 6 | Night | 4.65 |
Create the variables (Batch number, Working shift, and pH level) directly in the variable view, create value-labels, and then input numbers (codes) into the nominal variables.
| Name | Type | Label | Values | Missing | Measure | |
|---|---|---|---|---|---|---|
| 1 | Batch | Numeric | Batch | None | None | Nominal |
| 2 | Shift | Numeric | Working shift | {1, Night} | None | Nominal |
| 3 | PH | Numeric | pH level | None | None | Scale |
Value-labels: Shift
Simple Mean Comparison
Let’s look at how the means computed with the test variable (pH level) differ with regard to the shifts. The “pH level” is the dependent variable that will be grouped with the values of the shift, which is the independent grouping variable.
Run SPSS Compare Means

We can see that the mean pH level in our sample for the afternoon shift is 5.1130, while for night shift it is 4.7319, The difference is -0.38112. The Std. Deviation for afternoon is higher.
We need to test whether this difference is statistically significant.
Independent-Samples T Test…
Run Independent-Samples T Test…


The Levene’s Test for Equality of Variances (‘Sig.’) p-value is > 0.05 (as p-value = 0.400). Therefore, we assume equal variances (If p-value is < 0.05, then “the Equal variances not assumed”). The Sig. (2-tailed) is the p-value that is used to test whether the difference is statistically significant (alternative hypothesis). Since the Sig. (2-tailed) p-value < 0.05 (as p-value = 0.034) conclude that the mean is significantly higher for the afternoon shift.

Home | Contact: info@gazersdigest.com
©2020-2026 Gazer’s Digest is an information sharing platform. Gazer’s Digest includes topics, thought to be useful for the readers.