How to Compute T Score: Formula & Steps
- Sample mean
- 52
- You entered
- Population mean
- 50
- You entered
- Sample standard deviation
- 8
- You entered
- Sample size
- 20
- You entered
This guide explains how to compute a t-score, a statistic used to compare a sample mean to a known value or to another sample. You’ll learn the formulas for the one-sample and two-sample t-tests, with step-by-step instructions and a worked example. No special software is needed—just a calculator and your data.
Formula
The one-sample t-score formula is:
t = (x̄ – μ) / (s / √n)
- x̄ (x-bar) = sample mean (the average of your sample data)
- μ (mu) = population mean (the known or hypothesized mean you’re comparing against)
- s = sample standard deviation (a measure of spread in your sample)
- n = sample size (how many observations are in your sample)
For a two-sample t-test (comparing two independent groups), the formula is:
t = (x̄₁ – x̄₂) / √(s₁²/n₁ + s₂²/n₂)
where the subscripts 1 and 2 refer to the two samples.
Worked Example
Let’s use the default values from the calculator: sample mean = 52, population mean = 50, sample standard deviation = 8, sample size = 20.
- Find the difference between the sample mean and the population mean: 52 – 50 = 2.
- Divide the sample standard deviation by the square root of the sample size: 8 / √20 = 8 / 4.4721 = 1.7889.
- Divide the difference by the standard error: 2 / 1.7889 = 1.118.
The t-score is 1.118 (rounded to three decimal places).
What the t-Score Tells You
The t-score measures how many standard errors the sample mean is from the population mean. A t-score close to 0 means the sample mean is very close to the population mean. A large absolute t-score (positive or negative) means the sample mean is far from the population mean, which may suggest a statistically significant difference.
To determine if the difference is significant, compare your t-score to a critical value from a t-distribution table, using your chosen significance level (commonly 0.05) and degrees of freedom (df = n – 1 for a one-sample test). If |t| is greater than the critical value, the result is significant.
Common Mistakes
- Using the wrong standard deviation: Make sure you use the sample standard deviation (s), not the population standard deviation (σ). The sample standard deviation has n-1 in the denominator.
- Forgetting to take the square root: The denominator is s divided by √n, not s divided by n. This is a frequent error.
- Swapping sample and population means: The numerator is always (sample mean – population mean), not the other way around.
- Using the wrong degrees of freedom: For a one-sample test, df = n – 1. For a two-sample test, it’s more complex (often approximated).
- Rounding too early: Keep extra decimal places during intermediate steps to avoid rounding errors in the final result.
Tips
- Check your data for normality: t-tests assume the data is approximately normally distributed, especially for small samples (n < 30).
- Use the correct t-test: if your samples are paired (e.g., before/after measurements), use a paired t-test instead of an independent two-sample test.
- Always report the degrees of freedom and the p-value alongside the t-score in your results.
- For large samples (n > 30), the t-score is very close to a z-score, and you can use a normal distribution table.
- Consider using software (like Excel, R, or Python) to double-check your hand calculations.
Troubleshooting
- Your t-score seems too large: Check if you used the sample standard deviation or the population standard deviation. Also verify that you took the square root of n.
- Your t-score is negative: This is fine—it just means the sample mean is below the population mean. The sign matters for one-tailed tests, but for two-tailed tests, you use the absolute value.
- You get a division by zero: This happens if your sample standard deviation is 0 (all values identical) or if n = 0. Check your data.
- Your sample size is very small (n < 5): The t-test may not be reliable. Consider collecting more data or using a non-parametric test.
- You’re not sure which formula to use: If you have one sample and a known population mean, use the one-sample formula. If you have two independent samples, use the two-sample formula.
Frequently Asked Questions
What is the difference between a t-score and a z-score?
A z-score is used when the population standard deviation is known and the sample size is large (n > 30). A t-score is used when the population standard deviation is unknown and must be estimated from the sample, which is common for smaller samples.
How do I find the critical t-value?
You can look it up in a t-distribution table using your degrees of freedom (df) and chosen significance level (alpha). For a two-tailed test at alpha = 0.05 and df = 19, the critical value is about 2.093.
What does a t-score of 0 mean?
A t-score of 0 means the sample mean is exactly equal to the population mean. The difference is zero, so there is no evidence of a significant difference.
Can I use a t-score for any sample size?
Yes, but for very small samples (n < 5), the t-test may have low power and be sensitive to non-normality. For large samples (n > 30), the t-test is robust, and results are similar to a z-test.
What is the difference between a one-tailed and two-tailed t-test?
A one-tailed test checks if the sample mean is significantly greater than or less than the population mean (only one direction). A two-tailed test checks if it is significantly different in either direction. Two-tailed tests are more conservative.
Do I need to know the population standard deviation?
No, the t-test is designed for when you don’t know it. You use the sample standard deviation as an estimate. If you do know the population standard deviation, use a z-test instead.
Related
Formula used
in xbar | Sample mean | - | 52 | 0 in mu | Population mean | - | 50 | 0 in s | Sample standard deviation | - | 8 | 0 in n | Sample size | - | 20 | 1 out t | t-score | - | (xbar - mu) / (s / sqrt(n)) | 3
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.