# A hypothesis test for the difference between two means is considered a two-tailed test when:

When creating your data analysis plan or working on your results, you may have to decide if your statistical test should be a one-tailed test or a two-tailed test (also known as “directional” and “non-directional” tests respectively). So, what exactly is the difference between the two? First, it may be helpful to know what the term “tail” means in this context.

The tail refers to the end of the distribution of the test statistic for the particular analysis that you are conducting. For example, a t-test uses the t distribution, and an analysis of variance (ANOVA) uses the F distribution. The distribution of the test statistic can have one or two tails depending on its shape (see the figure below). The black-shaded areas of the distributions in the figure are the tails. Symmetrical distributions like the t and z distributions have two tails. Asymmetrical distributions like the F and chi-square distributions have only one tail. This means that analyses such as ANOVA and chi-square tests do not have a “one-tailed vs. two-tailed” option, because the distributions they are based on have only one tail.

In this case, our statistic is the difference between sample means and our hypothesized value is 0. The hypothesized value is the null hypothesis that the difference between population means is 0.

We continue to use the data from the "Animal Research" case study and will compute a significance test on the difference between the mean score of the females and the mean score of the males. For this calculation, we will make the three assumptions specified above.

The first step is to compute the statistic, which is simply the difference between means.

M1 - M2 = 5.3529 - 3.8824 = 1.4705

Since the hypothesized value is 0, we do not need to subtract it from the statistic.

The next step is to compute the estimate of the standard error of the statistic. In this case, the statistic is the difference between means, so the estimated standard error of the statistic is (). Recall from the relevant section in the chapter on sampling distributions that the formula for the standard error of the difference between means is:

In order to estimate this quantity, we estimate σ2 and use that estimate in place of σ2. Since we are assuming the two population variances are the same, we estimate this variance by averaging our two sample variances. Thus, our estimate of variance is computed using the following formula:

where MSE is our estimate of σ2. In this example,

MSE = (2.743 + 2.985)/2 = 2.864.

Since n (the number of scores in each group) is 17,

=

=
= 0.5805.

The next step is to compute t by plugging these values into the formula:

t = 1.4705/.5805 = 2.533.

Finally, we compute the probability of getting a t as large or larger than 2.533 or as small or smaller than -2.533. To do this, we need to know the degrees of freedom. The degrees of freedom is the number of independent estimates of variance on which MSE is based. This is equal to (n1 - 1) + (n2 - 1), where n1 is the sample size of the first group and n2 is the sample size of the second group. For this example, n1 = n2 = 17. When n1 = n2, it is conventional to use "n" to refer to the sample size of each group. Therefore, the degrees of freedom is 16 + 16 = 32.

Once we have the degrees of freedom, we can use the t distribution calculator to find the probability. Figure 1 shows that the probability value for a two-tailed test is 0.0164. The two-tailed test is used when the null hypothesis can be rejected regardless of the direction of the effect. As shown in Figure 1, it is the probability of a t < -2.533 or a t > 2.533.

Figure 1. The two-tailed probability.

The results of a one-tailed test are shown in Figure 2. As you can see, the probability value of 0.0082 is half the value for the two-tailed test.

Figure 2. The one-tailed probability.

Online Calculator: t distribution

Formatting Data for Computer Analysis

Most computer programs that compute t tests require your data to be in a specific form. Consider the data in Table 2.

Here there are two groups, each with three observations. To format these data for a computer program, you normally have to use two variables: the first specifies the group the subject is in and the second is the score itself. The reformatted version of the data in Table 2 is shown in Table 3.

Table 3. Reformatted Data.

To use Analysis Lab to do the calculations, you would copy the data and then

1. Click the "Enter/Edit Data" button. (You may be warned that for security reasons you must use the keyboard shortcut for pasting data.)
3. Click "Accept Data."
4. Set the Dependent Variable to Y.
5. Set the Grouping Variable to G.
6. Click the "t-test/confidence interval" button.

The t value is -0.718, the df = 4, and p = 0.512.

Computations for Unequal Sample Sizes (optional)

The calculations are somewhat more complicated when the sample sizes are not equal. One consideration is that MSE, the estimate of variance, counts the group with the larger sample size more than the group with the smaller sample size. Computationally, this is done by computing the sum of squares error (SSE) as follows:

where M1 is the mean for group 1 and M2 is the mean for group 2. Consider the following small example:

### Under what conditions would a test be considered a two

A two-tailed test will test both if the mean is significantly greater than x and if the mean significantly less than x. The mean is considered significantly different from x if the test statistic is in the top 2.5% or bottom 2.5% of its probability distribution, resulting in a p-value less than 0.05.

### What is the difference between a 1 tailed and 2 tailed hypothesis?

The main difference between one-tailed and two-tailed tests is that one-tailed tests will only have one critical region whereas two-tailed tests will have two critical regions. If we require a 100(1−α) 100 ( 1 − α ) % confidence interval we have to make some adjustments when using a two-tailed test.

### Which test statistic can test the hypothesis for the difference between two means?

A t-test is an inferential statistic used to determine if there is a significant difference between the means of two groups and how they are related. T-tests are used when the data sets follow a normal distribution and have unknown variances, like the data set recorded from flipping a coin 100 times.

### What is a two tailed hypothesis example?

A Two Tailed Hypothesis is used in statistical testing to determine the relationship between a sample and a distribution. In statistics you compare a sample (Example: one class of high school seniors SAT scores) to a larger set of numbers, or a distribution (the SAT scores for all US high school seniors).