Quantitative Analysis/ Compare Means
Comparing a sample to a target

How to tell if your average differs from a target value

The one-sample t-test checks whether the average in your sample differs from a known or expected value. This guide explains when to use it, how to read the confidence interval, and how to run it in AnalyZ Solutions.

7 min read Compare Means Beginner

01What the one-sample t-test does

Sometimes the comparison you care about is not between two groups but between your sample and a benchmark. Is the average satisfaction score different from the neutral midpoint of 3? Is the mean age of participants different from the national average? Is the average birth weight in the clinic below the recommended threshold? The one-sample t-test answers these by checking whether your sample average is far enough from the target that sampling variation alone would be an unlikely explanation.

02When to use it

Use it when you have one numeric variable, one group, and a specific value to compare against. The value must come from outside your data: a policy target, a national statistic, a scale midpoint, or a previous study. It should be chosen before you look at your results. With two separate groups, use the independent t-test instead. With two measurements on the same people, use the paired t-test.

A worked example: a service helpline aims for an average caller satisfaction of at least 4.0 on a 5-point scale. A survey of 150 callers gives an average of 4.2 with a standard deviation of 0.9. The test asks whether 4.2 is really different from 4.0, or whether a sample of 150 could easily produce 4.2 when the true average is 4.0.

03Assumptions

The observations should be independent, and the variable should be roughly normally distributed. With a sample above about 30 the normality assumption matters much less. With smaller samples or heavily skewed data, interpret the result with caution. A transformation such as the logarithm often helps with skewed measures like income.

04Reading the result

The confidence interval

The most useful part of the output is the 95% confidence interval for the mean. It gives a range that is likely to contain the true population average. If your test value falls outside the interval, the sample average differs significantly from it at the 5% level. If the test value falls inside, the data is compatible with the target.

In the helpline example, an interval of 4.05 to 4.35 would sit entirely above 4.0. That tells you the result is significant and also how far above the target the true average probably is.

The significance level

The interpretation states whether the sample average is significantly different from the test value, and at what level. Size matters here as much as significance. A difference of 0.05 points on a 5-point scale can be significant in a very large sample and still be irrelevant in practice.

05How to run it in AnalyZ Solutions

Open Inferential Analysis, choose Compare Means, then One-sample t-test.

  1. Select the variable
    Pick the numeric variable you want to test.
  2. Enter the test value
    Type the benchmark you are comparing against, such as 3 for a scale midpoint or 4.0 for a target.
  3. Choose the tails
    Two-tailed tests for a difference in either direction. One-tailed tests whether the sample average is greater than the test value and cannot detect a lower average, so use it only when your hypothesis was directional from the start.
  4. Running a one-sample t-test in AnalyZ Solutions.

  5. Optionally filter the sample
    For example, to test a target within one region only.
  6. Click Run
    The output shows the sample size, mean, standard deviation, standard error, the test value, the t statistic, degrees of freedom, significance, and the 95% confidence interval, followed by a plain-language interpretation.
Set the test value in advance. If you pick the benchmark after seeing the sample average, you are effectively choosing a comparison that will look significant. Write the target into your analysis plan before running the test.

06Interpreting the result

The figures below are invented to show the steps, and they follow the results tables in AnalyZ Solutions, with a few columns left out to save space. Suppose a service helpline aims for an average caller satisfaction of at least 4.0 out of 5, and a survey of 150 callers gives the results below.

Test result
NMeanSDSETest valuetdfp-valueSig95% CI lower95% CI upper
1504.20.90.0734.02.72171490.0073**4.0554.345

Reading it step by step

  1. Compare the mean with the test value
    The sample average is 4.2 and the target is 4.0, so callers rate the service 0.2 points above the target.
  2. Check significance
    The p-value of 0.0073 carries two stars, so the difference is significant at the 1% level. A sample of 150 would rarely give an average this far above 4.0 if the true average were 4.0.
  3. Read the confidence interval
    The interval runs from 4.055 to 4.345. The whole range sits above 4.0, which agrees with the significant result and tells you the true average is probably between about 4.05 and 4.35.
  4. Judge whether the gap matters
    A gap of 0.2 is about a fifth of a standard deviation (0.2 divided by 0.9), so it is small. Whether it matters depends on the target. If 4.0 is a minimum standard, the service clears it. If the aim was 4.5, the service falls short, and the interval shows that 4.5 is well outside the plausible range.

In plain words

Average caller satisfaction was 4.2, above the target of 4.0. The difference is significant at the 1% level, and the true average is likely to lie between about 4.05 and 4.35. The service is meeting its target, though only by a small margin.

07Common mistakes

Comparing against a value taken from the same data. The test value must be independent of the sample, not the sample median or a cut-off derived from the same respondents.

Using it for a proportion. If your outcome is a percentage of people who did something, use the z-test for proportions instead.

Forgetting the direction of the scale. A significantly lower score can be good news or bad news depending on what the scale measures. Read the interpretation against the direction of your variable.

Frequently Asked Questions
What is a good value to test against?
Common choices are a scale midpoint, a target set in a service standard or plan, a national or regional statistic, or a result from a comparable earlier study. The value must be defined independently of your sample.
How is this different from the independent t-test?
The independent t-test compares two groups of respondents against each other. The one-sample t-test compares a single group against a fixed number that you supply.
Can I test against zero?
Yes. Testing whether an average difference or change score differs from zero is common. If you have before and after measures, the paired t-test does this directly.
My sample is small and skewed. What should I do?
Try a transformation such as the logarithm for skewed measures like income, then set the test value on the same scale. Report the result cautiously, since small samples give imprecise intervals whatever the test.
Should I use one-tailed or two-tailed?
Use two-tailed unless you had a strong, documented reason to care about one direction only. A one-tailed test cannot detect an effect in the opposite direction, which reviewers tend to treat with suspicion. In AnalyZ Solutions it tests only whether the sample average is above the test value.

Test your sample against a target

Open Compare Means in AnalyZ Solutions. Free to sign up, free to analyze.

Get started
Related Guides