Hypothesis Test for a Mean

Calculate the results of your one sample t-test.

Use the calculator below to analyze the results of a hypothesis test for a mean. Enter your null hypothesis's mean, sample mean, sample standard deviation, sample size, test type, and significance level to find your results.

You will find a description of how to conduct a hypothesis test of a mean below the calculator.

Define the t-test

?
?
?
?
?
?
?
?

Result

Significance Level Sample Mean
t-score
Probability

Sample Mean Under the Null Distribution

Conducting Single Mean Hypothesis Tests

A hypothesis test of a sample mean can help you make inferences about the population from which you drew it. It is a tool to determine what is probably true about an event or phenomena.

Testing a Mean

For the results of a hypothesis test of a mean to be valid, you should follow these steps:

  1. Check Your Conditions
  2. State Your Hypothesis
  3. Determine Your Analysis Plan
  4. Analyze Your Sample
  5. Interpret Your Results
Check Your Conditions

To use the testing procedure described below, you should check the following conditions:

  • Simple Random Sampling - You should collect your sample with simple random sampling. This type of sampling requires that every occurrence of a value in a population has an equal chance of being selected when taking a sample.
  • Normal Sampling Distribution -The sampling distribution should follow the Normal or a nearly Normal distribution. A sampling distribution will be nearly Normal when the samples are collected independently and when the population distribution is nearly Normal. Generally, the larger the sample size, the more normally distributed the sampling distribution. Additionally, outlier data points can make a distribution less Normal, so if your data contains many outliers, exercise caution when verifying this condition.
State Your Hypothesis

You must state a null hypothesis and an alternative hypothesis to conduct a hypothesis test for a mean.

The null hypothesis, is a skeptical claim that you would like to test. It is defined by the null hypothesis's mean, which is often labeled μ0.

The alternative hypothesis represents an alternative claim to the null hypothesis.

Your null hypothesis and alternative hypothesis should be stated in one of three mutually exclusive ways listed in the table below.

Null Hypothesis Alternative Hypothesis Number of Tails Description
μ = μ0 μ ≠ μ0 Two Tests whether the population with a mean, μ, from which you drew your sample is different from the population defined by the mean, μ0, from the null hypothesis.
μ ≤ μ0 μ > μ0 One (right) Tests whether the population with a mean, μ, from which you drew your sample is greater than the population defined by the mean, μ0, from the null hypothesis.
μ ≥ μ0 μ < μ0 One (left) Tests whether the population with a mean, μ, from which you drew your sample is less than the population defined by the mean, μ0, from the null hypothesis.
Determine Your Analysis Plan

Before conducting a hypothesis test, you must determine a reasonable significance level, α, or the probability of rejecting the null hypothesis assuming it is true. The lower your significance level, the more confident you can be of the conclusion of your hypothesis test. Common significance levels are 10%, 5%, and 1%.

To evaluate your hypothesis test at the significance level that you set, consider if you are conducting a one or two tail test:

  • Two-tail tests divide the rejection region, or critical region, evenly above and below the null distribution, i.e. to the tails of the null sampling distribution. For example, in a two-tail test with a 5% significance level, your rejection region would be the upper and lower 2.5% of the null distribution. An alternative hypothesis of μ ≠ μ0 requires a two-tail test.
  • One-tail tests place the rejection region entirely on one side of the distribution i.e. to the right or left tail of the null sampling distribution. For example, in a one-tail test evaluating if the sampling distribution is above the null sampling distribution with a 5% significance level, your rejection region would be the upper 5% of the null distribution. μ > μ0 and μ < μ0 alternative hypotheses require one-tail tests.

The graphical results section of the calculator above shades rejection regions blue.

Analyze Your Sample

After checking your conditions, stating your hypothesis, determining your significance level, and collecting your sample, you are ready to analyze your hypothesis.

Sample means follow the Normal Distribution with the following parameters:

  • The Population Mean, μ - The population mean is assumed to be the null hypothesis's mean in a single mean hypothesis test.
  • The Standard Error, SE - For samples that are much smaller than the population, the standard error can be computed as follows: SE = s / sqrt(n), with s being the sample standard deviation and n being the sample size. It defines how sample means are expected to vary around the null hypothesis's mean given the sample size and under the assumption that the null hypothesis is true.
  • Degrees of Freedom, DF - For hypothesis tests for a single mean, the degrees of freedom equals n – 1, with n being the sample size.

In a hypothesis test for a mean, we calculate the probability that we would observe the sample mean, x̄, assuming the null hypothesis is true, also known as the p-value. If the p-value is less than the significance level, then we can reject the null hypothesis.

You can determine a precise p-value using the calculator above, but we can find an estimate of the p-value manually by calculating the t-score, or t-statistic, as follows: t = (x̄ - μ0) / SE

The t-score is a test statistic that tells us how far our observation is from the null hypothesis's mean under the null distribution. Using any t-score table, we can look up the probability of observing the results under the null distribution. You will need to look up the t-score for the type of test you are conducting, i.e. one or two tail. A hypothesis test for a mean is sometimes known as a t-test because of the use of a t-score in analyzing results.

If you find the probability is below the significance level, we reject the null hypothesis.

Interpret Your Results

The conclusion of a hypothesis test for a mean is always either:

  1. Reject the null hypothesis
  2. Do not reject the null hypothesis

If you reject the null hypothesis, you cannot say that your sample mean is the true population mean. If you do not reject the null hypothesis, you cannot say that the null hypothesis is true.

A hypothesis test is simply a way to look at a sample and conclude if it provides sufficient evidence to reject the null hypothesis.

Example: Hypothesis Test for a Mean

Let’s say that you manage a clothing store with a historical average transaction amount of $53.24.

You believe the best way to improve your business is to increase your average sale amount. So, you have been working hard on training your sales staff on how sell more items to customers to increase sales.

To test if your sales training has increased your average sale amount, you decide to run a hypothesis test for a mean with a sample of 50 transactions to see if your average sale amount has increased.

  1. Check the conditions - You collect your sample using simple random sampling, and you know that historically your transactions are normally distributed about the average transaction. So, your conditions for running a hypothesis test for a mean are satisfied.
  2. State Your Hypothesis - Your null hypothesis is that your average transaction amount is the same or less than the historical average, formally stated μ ≤ $53.24. Your alternative hypothesis is that your average is greater than the historical average, formally stated μ > $53.24.
  3. Determine Your Analysis Plan - You believe that a 5% significance level is reasonable. As your test is one-tail test, you will evaluate if your sample mean would occur at the upper 5% of the null distribution.
  4. Analyze Your Sample - After collecting your sample (which you do after steps 1-3), you find that the sample mean, x̄, transaction amount is $61.02 with a standard deviation of $39.12. Using the calculator above, you find that a sample mean of $61.02 would results in a t-score of 1.41 under the null distribution, which translates to a p-value of 8.30%.
  5. Interpret Your Results - Since your p-value of 8.30% is greater than the significance level of 5%, you do not have sufficient evidence to reject the null hypothesis.

In this example, you found that you cannot reject the claim that your current transaction amount is less than or equal to your historical transaction amount of $53.24. Your results do not guarantee that your transaction amount is $53.24 or below, but they do indicate that your sales training has likely not had the effect that you wanted on your store's average sale amount.