One-Sample t-Test: How to Run It Online and Report It in APA7
The one-sample t-test compares the mean of one group with a fixed, known or hypothesised value (μ0).
What is One-Sample t-Test?
The one-sample t-test compares the mean of one group with a fixed, known or hypothesised value (μ0).
When to use it
Use it to check whether your sample differs from a benchmark, such as a population norm, a neutral midpoint or a published standard.
Example question: Does the mean test score of my class differ from the national average of 70?
Preparing your data
One numeric column with one row per participant. You also supply the comparison value (μ0) in the tool.
Example dataset (simulated; first rows of 40): id, score (test score, 0 to 100); the comparison value is 70.
| id | score |
|---|---|
| 1.0 | 71.0 |
| 2.0 | 75.0 |
| 3.0 | 85.0 |
| 4.0 | 62.0 |
| 5.0 | 75.0 |
| 6.0 | 74.0 |
Download the full example CSV to practise. If the tool asks for a different layout, follow the instructions on its page.
How to run it on StatFas
- Open the One-Sample t-Test tool. You do not need an account to run an analysis.
- Enter your data or upload your file, laid out as described in Preparing your data.
- Select your variables. Select the numeric variable and enter the test value.
- Choose any options the tool offers (for example the confidence level, a post hoc test or the error bar type) and run the analysis.
- Read the results on the page. Check the assumptions first, then the test statistic, the p-value and the effect size.
- To save your results, log in or create a free account. Every analysis stays free; the account is only needed to download.
Assumptions and checks
- The outcome is continuous.
- Observations are independent.
- The outcome is roughly normal, or the sample is large (about 30 or more).
- The test value is chosen before looking at the data.
Key numbers to look at
- Sample mean and SD.
- t(df) with df = n − 1, and the p-value.
- Mean difference from μ0 with 95% CI.
- Cohen's d = (M − μ0) / SD.
Effect size
Cohen's d: about 0.2 small, 0.5 medium, 0.8 large.
Benchmarks such as small, medium and large are conventions (Cohen, 1988), not rules. Interpret size in the context of your field.
Reporting One-Sample t-Test in APA7 style
Template
Worked example (simulated data)
The numbers below were computed from the example CSV above, so you can reproduce them. They illustrate the format and are not real findings.
APA7 reminders: italicise statistical symbols (M, SD, t, F, p, r), report exact p-values to two or three decimals (use p < .001 for very small values), omit the leading zero for values that cannot exceed 1 (.45, not 0.45), and put degrees of freedom in parentheses. See the APA7 cheat sheet.
Common mistakes
- Using it to compare two groups.
- Choosing the test value after seeing the data.
- Ignoring strong skew or outliers in a small sample.
Related analyses and alternatives
- Wilcoxon Test: If the data are not normal (signed-rank version).
- Independent t-Test: To compare two groups.
- Binomial Test: If the outcome is yes/no.
Not sure which analysis you need? Use the test chooser.
Frequently asked questions
What are the degrees of freedom?
n − 1, where n is the number of participants.
Is a one-sided test acceptable?
Only if the direction was specified in advance and an effect in the other direction would be meaningless. Otherwise use the two-sided test.
References
American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). https://doi.org/10.1037/0000165-000
Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.
This guide is for learning and for preparing results for your own reports. You remain responsible for choosing an appropriate analysis, checking its assumptions and interpreting the results. Follow the formatting rules of your journal or institution where they differ from APA7.