SPSS command: SPSS T-TEST
One-sample t test against a known value
The one-sample t test asks whether the mean of a scale variable differs from a fixed reference value, such as a target, a norm or a scale midpoint.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs the SPSS T-TEST /TESTVAL procedure in your browser and reports one- and two-sided p values, the confidence interval for the difference, and Cohen's d and Hedges' correction with noncentral-t intervals.
- Whether the sample mean differs from the test value more than sampling error would explain.
- How far the mean is from the test value, with a confidence interval in the original units.
- How large the difference is in standard-deviation units (Cohen's d), with a small-sample correction (Hedges).
When to use it
Use it when
- Comparing a sample with a benchmark: a contracted 40-hour week, a published norm, last year's average.
- Testing whether ratings lean away from the neutral midpoint of a scale.
Use something else when
- The reference value is itself an estimate from another sample: use the independent-samples t test on both samples.
- Small samples from clearly skewed data or ordinal ratings: use the one-sample Wilcoxon signed-rank test in One-Sample Nonparametric Tests.
- A proportion rather than a mean: use a binomial test or the proportions tests.
How to run it in Crosstabs
- 01
Open the data
Load your file in the workspace and switch to Statistics mode.
- 02
Choose One-Sample T Test
In the Compare means group, pick One-Sample T Test (T-TEST).
- 03
Set Test variables and Test value
Tick one or more scale variables under Test variables and type the reference value in Test value.
- 04
Confidence level and missing values
Adjust Confidence interval (%) if needed, and choose Exclude cases analysis by analysis or Exclude cases listwise for several variables.
- 05
Run
Click Run. Declare any workspace weight first: a frequency weight replicates cases, while a sampling weight shows weighted descriptives only.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
Self-reported working hours for one week from 24 synthetic employees on a 40-hour contract, drawn from a normal distribution with a fixed seed. Test value: 40.
| Item | N | Mean | Std. Deviation | Std. Error Mean |
|---|---|---|---|---|
| hours | 24 | 41.72 | 3.164 | 0.646 |
| Item | t | df | One-Sided p | Two-Sided p | Mean Difference | 95% CI of the difference |
|---|---|---|---|---|---|---|
| hours | 2.658 | 23 | .007 | .014 | 1.717 | 0.381 to 3.053 |
| Item | Standardizer | Point Estimate | 95% CI |
|---|---|---|---|
| Cohen's d | 3.164 | 0.543 | 0.108 to 0.967 |
| Hedges' correction | 3.272 | 0.525 | 0.105 to 0.935 |
How to read it
Employees report a mean of 41.72 hours, 1.72 above the contracted 40 (t(23) = 2.66, two-sided p = .014). The 95% interval for the difference runs from 0.38 to 3.05 hours, and Cohen's d = 0.54 (Hedges' correction 0.52) expresses the gap in standard-deviation units.
Output tables explained
- One-Sample Statistics
- N, mean, standard deviation and standard error of the mean for each test variable.
- One-Sample Test
- t, df, One-Sided p, Two-Sided p, the mean difference from the test value and its confidence interval.
- One-Sample Effect Sizes
- Cohen's d and Hedges' correction with their standardizer, point estimate and confidence interval from the noncentral t distribution.
Assumptions and notes
- Observations are independent.
- The variable is roughly normal, or the sample is large enough (about 30 or more) for the mean to be close to normal.
- One-Sided p is in the direction of the observed difference; use it only when the direction was fixed in advance.
How the results are validated
On Python-generated reference data, t, df, p and the confidence interval match SciPy 1.18 ttest_1samp to a relative tolerance of 1e-9, including a frequency-weighted case checked by replicating rows. Cohen's d and Hedges' g match to 1e-9, and their confidence limits to 1e-8 against an independent noncentral-t inversion in SciPy. Validation evidence
Questions
Should I use the one-sided or the two-sided p?
Use the two-sided p unless you stated the direction before seeing the data. The one-sided p is half the two-sided value in the observed direction.
What is the confidence interval in the test table?
It is the interval for the difference between the mean and the test value, not for the mean itself. If it excludes 0, the two-sided test is significant at the matching level.
What is Hedges' correction?
Cohen's d slightly overstates the effect in small samples. Hedges' correction multiplies it by a factor J(N − 1) just below 1, as in SPSS 27 and later.
Can I test several variables against the same value?
Yes — tick several Test variables. Each gets its own row; consider a multiple-comparison correction when you interpret many tests.
Related procedures
- Paired-Samples T TestT-TEST PAIRS
- Independent-Samples T TestT-TEST GROUPS
- One-Sample Nonparametric TestsNPAR TESTS
- Bayesian One-Sample InferenceBAYES ONESAMPLE
- DescriptivesDESCRIPTIVES
- Free SPSS alternative: full coverage list
Run One-Sample T Test on your own data
Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.