Analyses

One-sample t-test

Compare a sample mean with a number you chose in advance.

Edit on GitHub

When to use it

Use this when you have one numeric column and a fixed comparison value, not two groups. For example: is the mean anxiety score in this sample different from the scale’s neutral point of 10?

Assumptions

The scores are numeric, and the sample mean is a fair summary (no extreme outliers doing all the work). The test assumes the scores are roughly normal, or that the sample is large.

Tensr does not run Shapiro–Wilk or any other normality check inside this procedure. Run Shapiro–Wilk yourself if you need it. There is no effect-size field and no Cohen’s d on the result.

Running it in Tensr

Analyze → Compare Means → One-Sample T Test. In chat: “One-sample t-test of anxiety against 10.”
Put the numeric column in value column.
Type the comparison value in hypothesized mean. The API requires it. The dialog starts that box at 0, which is a poor default for a 0–20 anxiety scale. Confidence level starts at 0.95.

Options

Prop

Type

Reading the output

The same 96 exam scores, tested against a department target of 71. The class was built to land near that target, so a difference of a point or two is the result to read.

tdfpMean diff95% CI low95% CI high
score0.46695.6430.395-1.2892.078

One-sample t-test of score against μ = 71 on 96 rows (mean diff = 0.395, p = .643). The primary result is not significant (p = .643). This is not large enough to treat the comparison this page is about as a reliable association. The result is non-significant: the data are still compatible with no effect. Metrics: t statistic = 0.466; p-value = .643; df = 95; Sample mean = 71.395; SE mean = 0.848; Mean diff = 0.395.

Reporting (APA 7)

One-sample t-test of score against μ = 71 on 96 rows (mean diff = 0.395, p = .643). This result is not significant (p = .643). Report the estimate with that p, and do not describe the pattern as a reliable effect.

Coming from SPSS

Analyze → Compare Means → One-Sample T Test.

SPSS prints Cohen’s d when effect sizes are requested. Tensr does not compute one for this test.

Two groups use the independent-samples t-test. A before-and-after design uses the paired-samples t-test. Check the shape of the scores with Shapiro–Wilk or descriptives.