## t-test Calculator

When to use a t-test, which t-test, how to do a t-test, p-value from t-test, t-test critical values, how to use our t-test calculator, one-sample t-test, two-sample t-test, paired t-test, t-test vs z-test.

Welcome to our t-test calculator! Here you can not only easily perform one-sample t-tests , but also two-sample t-tests , as well as paired t-tests .

Do you prefer to find the p-value from t-test, or would you rather find the t-test critical values? Well, this t-test calculator can do both! 😊

What does a t-test tell you? Take a look at the text below, where we explain what actually gets tested when various types of t-tests are performed. Also, we explain when to use t-tests (in particular, whether to use the z-test vs. t-test) and what assumptions your data should satisfy for the results of a t-test to be valid. If you've ever wanted to know how to do a t-test by hand, we provide the necessary t-test formula, as well as tell you how to determine the number of degrees of freedom in a t-test.

A t-test is one of the most popular statistical tests for location , i.e., it deals with the population(s) mean value(s).

There are different types of t-tests that you can perform:

• A one-sample t-test;
• A two-sample t-test; and
• A paired t-test.

In the next section , we explain when to use which. Remember that a t-test can only be used for one or two groups . If you need to compare three (or more) means, use the analysis of variance ( ANOVA ) method.

The t-test is a parametric test, meaning that your data has to fulfill some assumptions :

• The data points are independent; AND
• The data, at least approximately, follow a normal distribution .

If your sample doesn't fit these assumptions, you can resort to nonparametric alternatives. Visit our Mann–Whitney U test calculator or the Wilcoxon rank-sum test calculator to learn more. Other possibilities include the Wilcoxon signed-rank test or the sign test.

Your choice of t-test depends on whether you are studying one group or two groups:

One sample t-test

Choose the one-sample t-test to check if the mean of a population is equal to some pre-set hypothesized value .

The average volume of a drink sold in 0.33 l cans — is it really equal to 330 ml?

The average weight of people from a specific city — is it different from the national average?

Choose the two-sample t-test to check if the difference between the means of two populations is equal to some pre-determined value when the two samples have been chosen independently of each other.

In particular, you can use this test to check whether the two groups are different from one another .

The average difference in weight gain in two groups of people: one group was on a high-carb diet and the other on a high-fat diet.

The average difference in the results of a math test from students at two different universities.

This test is sometimes referred to as an independent samples t-test , or an unpaired samples t-test .

A paired t-test is used to investigate the change in the mean of a population before and after some experimental intervention , based on a paired sample, i.e., when each subject has been measured twice: before and after treatment.

In particular, you can use this test to check whether, on average, the treatment has had any effect on the population .

The change in student test performance before and after taking a course.

The change in blood pressure in patients before and after administering some drug.

So, you've decided which t-test to perform. These next steps will tell you how to calculate the p-value from t-test or its critical values, and then which decision to make about the null hypothesis.

Decide on the alternative hypothesis :

Use a two-tailed t-test if you only care whether the population's mean (or, in the case of two populations, the difference between the populations' means) agrees or disagrees with the pre-set value.

Use a one-tailed t-test if you want to test whether this mean (or difference in means) is greater/less than the pre-set value.

Formulas for the test statistic in t-tests include the sample size , as well as its mean and standard deviation . The exact formula depends on the t-test type — check the sections dedicated to each particular test for more details.

Determine the degrees of freedom for the t-test:

The degrees of freedom are the number of observations in a sample that are free to vary as we estimate statistical parameters. In the simplest case, the number of degrees of freedom equals your sample size minus the number of parameters you need to estimate . Again, the exact formula depends on the t-test you want to perform — check the sections below for details.

The degrees of freedom are essential, as they determine the distribution followed by your T-score (under the null hypothesis). If there are d degrees of freedom, then the distribution of the test statistics is the t-Student distribution with d degrees of freedom . This distribution has a shape similar to N(0,1) (bell-shaped and symmetric) but has heavier tails . If the number of degrees of freedom is large (>30), which generically happens for large samples, the t-Student distribution is practically indistinguishable from N(0,1).

💡 The t-Student distribution owes its name to William Sealy Gosset, who, in 1908, published his paper on the t-test under the pseudonym "Student". Gosset worked at the famous Guinness Brewery in Dublin, Ireland, and devised the t-test as an economical way to monitor the quality of beer. Cheers! 🍺🍺🍺

Recall that the p-value is the probability (calculated under the assumption that the null hypothesis is true) that the test statistic will produce values at least as extreme as the T-score produced for your sample . As probabilities correspond to areas under the density function, p-value from t-test can be nicely illustrated with the help of the following pictures:

The following formulae say how to calculate p-value from t-test. By cdf t,d we denote the cumulative distribution function of the t-Student distribution with d degrees of freedom:

p-value from left-tailed t-test:

p-value = cdf t,d (t score )

p-value from right-tailed t-test:

p-value = 1 − cdf t,d (t score )

p-value from two-tailed t-test:

p-value = 2 × cdf t,d (−|t score |)

or, equivalently: p-value = 2 − 2 × cdf t,d (|t score |)

However, the cdf of the t-distribution is given by a somewhat complicated formula. To find the p-value by hand, you would need to resort to statistical tables, where approximate cdf values are collected, or to specialized statistical software. Fortunately, our t-test calculator determines the p-value from t-test for you in the blink of an eye!

Recall, that in the critical values approach to hypothesis testing, you need to set a significance level, α, before computing the critical values , which in turn give rise to critical regions (a.k.a. rejection regions).

Formulas for critical values employ the quantile function of t-distribution, i.e., the inverse of the cdf :

Critical value for left-tailed t-test: cdf t,d -1 (α)

critical region:

(-∞, cdf t,d -1 (α)]

Critical value for right-tailed t-test: cdf t,d -1 (1-α)

[cdf t,d -1 (1-α), ∞)

Critical values for two-tailed t-test: ±cdf t,d -1 (1-α/2)

(-∞, -cdf t,d -1 (1-α/2)] ∪ [cdf t,d -1 (1-α/2), ∞)

To decide the fate of the null hypothesis, just check if your T-score lies within the critical region:

If your T-score belongs to the critical region , reject the null hypothesis and accept the alternative hypothesis.

If your T-score is outside the critical region , then you don't have enough evidence to reject the null hypothesis.

Choose the type of t-test you wish to perform:

A one-sample t-test (to test the mean of a single group against a hypothesized mean);

A two-sample t-test (to compare the means for two groups); or

A paired t-test (to check how the mean from the same group changes after some intervention).

Two-tailed;

Left-tailed; or

Right-tailed.

This t-test calculator allows you to use either the p-value approach or the critical regions approach to hypothesis testing!

Enter your T-score and the number of degrees of freedom . If you don't know them, provide some data about your sample(s): sample size, mean, and standard deviation, and our t-test calculator will compute the T-score and degrees of freedom for you .

Once all the parameters are present, the p-value, or critical region, will immediately appear underneath the t-test calculator, along with an interpretation!

The null hypothesis is that the population mean is equal to some value μ 0 \mu_0 μ 0 ​ .

The alternative hypothesis is that the population mean is:

• different from μ 0 \mu_0 μ 0 ​ ;
• smaller than μ 0 \mu_0 μ 0 ​ ; or
• greater than μ 0 \mu_0 μ 0 ​ .

One-sample t-test formula :

• μ 0 \mu_0 μ 0 ​ — Mean postulated in the null hypothesis;
• n n n — Sample size;
• x ˉ \bar{x} x ˉ — Sample mean; and
• s s s — Sample standard deviation.

Number of degrees of freedom in t-test (one-sample) = n − 1 n-1 n − 1 .

The null hypothesis is that the actual difference between these groups' means, μ 1 \mu_1 μ 1 ​ , and μ 2 \mu_2 μ 2 ​ , is equal to some pre-set value, Δ \Delta Δ .

The alternative hypothesis is that the difference μ 1 − μ 2 \mu_1 - \mu_2 μ 1 ​ − μ 2 ​ is:

• Different from Δ \Delta Δ ;
• Smaller than Δ \Delta Δ ; or
• Greater than Δ \Delta Δ .

In particular, if this pre-determined difference is zero ( Δ = 0 \Delta = 0 Δ = 0 ):

The null hypothesis is that the population means are equal.

The alternate hypothesis is that the population means are:

• μ 1 \mu_1 μ 1 ​ and μ 2 \mu_2 μ 2 ​ are different from one another;
• μ 1 \mu_1 μ 1 ​ is smaller than μ 2 \mu_2 μ 2 ​ ; and
• μ 1 \mu_1 μ 1 ​ is greater than μ 2 \mu_2 μ 2 ​ .

Formally, to perform a t-test, we should additionally assume that the variances of the two populations are equal (this assumption is called the homogeneity of variance ).

There is a version of a t-test that can be applied without the assumption of homogeneity of variance: it is called a Welch's t-test . For your convenience, we describe both versions.

## Two-sample t-test if variances are equal

Use this test if you know that the two populations' variances are the same (or very similar).

Two-sample t-test formula (with equal variances) :

where s p s_p s p ​ is the so-called pooled standard deviation , which we compute as:

• Δ \Delta Δ — Mean difference postulated in the null hypothesis;
• n 1 n_1 n 1 ​ — First sample size;
• x ˉ 1 \bar{x}_1 x ˉ 1 ​ — Mean for the first sample;
• s 1 s_1 s 1 ​ — Standard deviation in the first sample;
• n 2 n_2 n 2 ​ — Second sample size;
• x ˉ 2 \bar{x}_2 x ˉ 2 ​ — Mean for the second sample; and
• s 2 s_2 s 2 ​ — Standard deviation in the second sample.

Number of degrees of freedom in t-test (two samples, equal variances) = n 1 + n 2 − 2 n_1 + n_2 - 2 n 1 ​ + n 2 ​ − 2 .

## Two-sample t-test if variances are unequal (Welch's t-test)

Use this test if the variances of your populations are different.

Two-sample Welch's t-test formula if variances are unequal:

• s 1 s_1 s 1 ​ — Standard deviation in the first sample;
• s 2 s_2 s 2 ​ — Standard deviation in the second sample.

The number of degrees of freedom in a Welch's t-test (two-sample t-test with unequal variances) is very difficult to count. We can approximate it with the help of the following Satterthwaite formula :

Alternatively, you can take the smaller of n 1 − 1 n_1 - 1 n 1 ​ − 1 and n 2 − 1 n_2 - 1 n 2 ​ − 1 as a conservative estimate for the number of degrees of freedom.

🔎 The Satterthwaite formula for the degrees of freedom can be rewritten as a scaled weighted harmonic mean of the degrees of freedom of the respective samples: n 1 − 1 n_1 - 1 n 1 ​ − 1 and n 2 − 1 n_2 - 1 n 2 ​ − 1 , and the weights are proportional to the standard deviations of the corresponding samples.

As we commonly perform a paired t-test when we have data about the same subjects measured twice (before and after some treatment), let us adopt the convention of referring to the samples as the pre-group and post-group.

The null hypothesis is that the true difference between the means of pre- and post-populations is equal to some pre-set value, Δ \Delta Δ .

The alternative hypothesis is that the actual difference between these means is:

Typically, this pre-determined difference is zero. We can then reformulate the hypotheses as follows:

The null hypothesis is that the pre- and post-means are the same, i.e., the treatment has no impact on the population .

The alternative hypothesis:

• The pre- and post-means are different from one another (treatment has some effect);
• The pre-mean is smaller than the post-mean (treatment increases the result); or
• The pre-mean is greater than the post-mean (treatment decreases the result).

Paired t-test formula

In fact, a paired t-test is technically the same as a one-sample t-test! Let us see why it is so. Let x 1 , . . . , x n x_1, ... , x_n x 1 ​ , ... , x n ​ be the pre observations and y 1 , . . . , y n y_1, ... , y_n y 1 ​ , ... , y n ​ the respective post observations. That is, x i , y i x_i, y_i x i ​ , y i ​ are the before and after measurements of the i -th subject.

For each subject, compute the difference, d i : = x i − y i d_i := x_i - y_i d i ​ := x i ​ − y i ​ . All that happens next is just a one-sample t-test performed on the sample of differences d 1 , . . . , d n d_1, ... , d_n d 1 ​ , ... , d n ​ . Take a look at the formula for the T-score :

Δ \Delta Δ — Mean difference postulated in the null hypothesis;

n n n — Size of the sample of differences, i.e., the number of pairs;

x ˉ \bar{x} x ˉ — Mean of the sample of differences; and

s s s  — Standard deviation of the sample of differences.

Number of degrees of freedom in t-test (paired): n − 1 n - 1 n − 1

We use a Z-test when we want to test the population mean of a normally distributed dataset, which has a known population variance . If the number of degrees of freedom is large, then the t-Student distribution is very close to N(0,1).

Hence, if there are many data points (at least 30), you may swap a t-test for a Z-test, and the results will be almost identical. However, for small samples with unknown variance, remember to use the t-test because, in such cases, the t-Student distribution differs significantly from the N(0,1)!

🙋 Have you concluded you need to perform the z-test? Head straight to our z-test calculator !

## What is a t-test?

A t-test is a widely used statistical test that analyzes the means of one or two groups of data. For instance, a t-test is performed on medical data to determine whether a new drug really helps.

## What are different types of t-tests?

Different types of t-tests are:

• One-sample t-test;
• Two-sample t-test; and
• Paired t-test.

## How to find the t value in a one sample t-test?

To find the t-value:

• Subtract the null hypothesis mean from the sample mean value.
• Divide the difference by the standard deviation of the sample.
• Multiply the resultant with the square root of the sample size.

• Biology (99)
• Chemistry (98)
• Construction (144)
• Conversion (292)
• Ecology (30)
• Everyday life (261)
• Finance (569)
• Health (440)
• Physics (508)
• Sports (104)
• Statistics (182)
• Other (181)
• Discover Omni (40)

## Have a language expert improve your writing

Run a free plagiarism check in 10 minutes, generate accurate citations for free.

• Knowledge Base

## An Introduction to t Tests | Definitions, Formula and Examples

Published on January 31, 2020 by Rebecca Bevans . Revised on June 22, 2023.

A t test is a statistical test that is used to compare the means of two groups. It is often used in hypothesis testing to determine whether a process or treatment actually has an effect on the population of interest, or whether two groups are different from one another.

• The null hypothesis ( H 0 ) is that the true difference between these group means is zero.
• The alternate hypothesis ( H a ) is that the true difference is different from zero.

When to use a t test, what type of t test should i use, performing a t test, interpreting test results, presenting the results of a t test, other interesting articles, frequently asked questions about t tests.

A t test can only be used when comparing the means of two groups (a.k.a. pairwise comparison). If you want to compare more than two groups, or if you want to do multiple pairwise comparisons, use an   ANOVA test  or a post-hoc test.

The t test is a parametric test of difference, meaning that it makes the same assumptions about your data as other parametric tests. The t test assumes your data:

• are independent
• are (approximately) normally distributed
• have a similar amount of variance within each group being compared (a.k.a. homogeneity of variance)

If your data do not fit these assumptions, you can try a nonparametric alternative to the t test, such as the Wilcoxon Signed-Rank test for data with unequal variances .

## Prevent plagiarism. Run a free check.

When choosing a t test, you will need to consider two things: whether the groups being compared come from a single population or two different populations, and whether you want to test the difference in a specific direction.

## One-sample, two-sample, or paired t test?

• If the groups come from a single population (e.g., measuring before and after an experimental treatment), perform a paired t test . This is a within-subjects design .
• If the groups come from two different populations (e.g., two different species, or people from two separate cities), perform a two-sample t test (a.k.a. independent t test ). This is a between-subjects design .
• If there is one group being compared against a standard value (e.g., comparing the acidity of a liquid to a neutral pH of 7), perform a one-sample t test .

## One-tailed or two-tailed t test?

• If you only care whether the two populations are different from one another, perform a two-tailed t test .
• If you want to know whether one population mean is greater than or less than the other, perform a one-tailed t test.
• Your observations come from two separate populations (separate species), so you perform a two-sample t test.
• You don’t care about the direction of the difference, only whether there is a difference, so you choose to use a two-tailed t test.

The t test estimates the true difference between two group means using the ratio of the difference in group means over the pooled standard error of both groups. You can calculate it manually using a formula, or use statistical analysis software.

## T test formula

The formula for the two-sample t test (a.k.a. the Student’s t-test) is shown below.

In this formula, t is the t value, x 1 and x 2 are the means of the two groups being compared, s 2 is the pooled standard error of the two groups, and n 1 and n 2 are the number of observations in each of the groups.

A larger t value shows that the difference between group means is greater than the pooled standard error, indicating a more significant difference between the groups.

You can compare your calculated t value against the values in a critical value chart (e.g., Student’s t table) to determine whether your t value is greater than what would be expected by chance. If so, you can reject the null hypothesis and conclude that the two groups are in fact different.

## T test function in statistical software

Most statistical software (R, SPSS, etc.) includes a t test function. This built-in function will take your raw data and calculate the t value. It will then compare it to the critical value, and calculate a p -value . This way you can quickly see whether your groups are statistically different.

In your comparison of flower petal lengths, you decide to perform your t test using R. The code looks like this:

Sample data set

If you perform the t test for your flower hypothesis in R, you will receive the following output:

The output provides:

• An explanation of what is being compared, called data in the output table.
• The t value : -33.719. Note that it’s negative; this is fine! In most cases, we only care about the absolute value of the difference, or the distance from 0. It doesn’t matter which direction.
• The degrees of freedom : 30.196. Degrees of freedom is related to your sample size, and shows how many ‘free’ data points are available in your test for making comparisons. The greater the degrees of freedom, the better your statistical test will work.
• The p value : 2.2e-16 (i.e. 2.2 with 15 zeros in front). This describes the probability that you would see a t value as large as this one by chance.
• A statement of the alternative hypothesis ( H a ). In this test, the H a is that the difference is not 0.
• The 95% confidence interval . This is the range of numbers within which the true difference in means will be 95% of the time. This can be changed from 95% if you want a larger or smaller interval, but 95% is very commonly used.
• The mean petal length for each group.

When reporting your t test results, the most important values to include are the t value , the p value , and the degrees of freedom for the test. These will communicate to your audience whether the difference between the two groups is statistically significant (a.k.a. that it is unlikely to have happened by chance).

You can also include the summary statistics for the groups being compared, namely the mean and standard deviation . In R, the code for calculating the mean and the standard deviation from the data looks like this:

flower.data %>% group_by(Species) %>% summarize(mean_length = mean(Petal.Length), sd_length = sd(Petal.Length))

In our example, you would report the results like this:

If you want to know more about statistics , methodology , or research bias , make sure to check out some of our other articles with explanations and examples.

• Chi square test of independence
• Statistical power
• Descriptive statistics
• Degrees of freedom
• Pearson correlation
• Null hypothesis

Methodology

• Double-blind study
• Case-control study
• Research ethics
• Data collection
• Hypothesis testing
• Structured interviews

Research bias

• Hawthorne effect
• Unconscious bias
• Recall bias
• Halo effect
• Self-serving bias
• Information bias

A t-test is a statistical test that compares the means of two samples . It is used in hypothesis testing , with a null hypothesis that the difference in group means is zero and an alternate hypothesis that the difference in group means is different from zero.

A t-test measures the difference in group means divided by the pooled standard error of the two group means.

In this way, it calculates a number (the t-value) illustrating the magnitude of the difference between the two group means being compared, and estimates the likelihood that this difference exists purely by chance (p-value).

Your choice of t-test depends on whether you are studying one group or two groups, and whether you care about the direction of the difference in group means.

If you are studying one group, use a paired t-test to compare the group mean over time or after an intervention, or use a one-sample t-test to compare the group mean to a standard value. If you are studying two groups, use a two-sample t-test .

If you want to know only whether a difference exists, use a two-tailed test . If you want to know if one group mean is greater or less than the other, use a left-tailed or right-tailed one-tailed test .

A one-sample t-test is used to compare a single population to a standard value (for example, to determine whether the average lifespan of a specific town is different from the country average).

A paired t-test is used to compare a single population before and after some experimental intervention or at two different points in time (for example, measuring student performance on a test before and after being taught the material).

A t-test should not be used to measure differences among more than two groups, because the error structure for a t-test will underestimate the actual error when many groups are being compared.

If you want to compare the means of several groups at once, it’s best to use another statistical test such as ANOVA or a post-hoc test.

## Cite this Scribbr article

If you want to cite this source, you can copy and paste the citation or click the “Cite this Scribbr article” button to automatically add the citation to our free Citation Generator.

Bevans, R. (2023, June 22). An Introduction to t Tests | Definitions, Formula and Examples. Scribbr. Retrieved March 19, 2024, from https://www.scribbr.com/statistics/t-test/

## Rebecca Bevans

Other students also liked, choosing the right statistical test | types & examples, hypothesis testing | a step-by-step guide with easy examples, test statistics | definition, interpretation, and examples.

• The Open University
• Guest user / Sign out
• Study with The Open University

## My OpenLearn Profile

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

## 4.2 Two-tailed tests

Hypotheses that have an equal (=) or not equal (≠) supposition (sign) in the statement are called non-directional hypotheses . In non-directional hypotheses, the researcher is interested in whether there is a statistically significant difference or relationship between two or more variables, but does not have any specific expectation about which group or variable will be higher or lower. For example, a non-directional hypothesis might be: ‘There is a difference in the preference for brand X between male and female consumers.’ In this hypothesis, the researcher is interested in whether there is a statistically significant difference in the preference for brand X between male and female consumers, but does not have a specific prediction about which gender will have a higher preference. The researcher may conduct a survey or experiment to collect data on the brand preference of male and female consumers and then use statistical analysis to determine whether there is a significant difference between the two groups.

Non-directional hypotheses are also known as two-tailed hypotheses. The term ‘two-tailed’ comes from the fact that the statistical test used to evaluate the hypothesis is based on the assumption that the difference or relationship could occur in either direction, resulting in two ‘tails’ in the probability distribution. Using the coffee foam example (from Activity 1), you have the following set of hypotheses:

H 0 : µ = 1cm foam

H a : µ ≠ 1cm foam

In this case, the researcher can reject the null hypothesis for the mean value that is either ‘much higher’ or ‘much lower’ than 1 cm foam. This is called a two-tailed test because the rejection region includes outcomes from both the upper and lower tails of the sample distribution when determining a decision rule. To give an illustration, if you set alpha level (α) equal to 0.05, that would give you a 95% confidence level. Then, you would reject the null hypothesis for obtained values of z < 1.96 and z > 1.96 (you will look at how to calculate z-scores later in the course).

This can be plotted on a graph as shown in Figure 7.

A symmetrical graph reminiscent of a bell. The x-axis is labelled ‘z-score’ and the y-axis is labelled ‘probability density’. The x-axis increases in increments of 1 from -2 to 2.

The top of the bell-shaped curve is labelled ‘Foam height = 1cm’. The graph circles the rejection regions of the null hypothesis on both sides of the bell curve. Within these circles are two areas shaded orange: beneath the curve from -2 downwards which is labelled z < -1.96 and α = 0.025; and beneath the curve from 2 upwards which is labelled z > 1.96 and α = 0.025.

In a two-tailed hypothesis test, the null hypothesis assumes that there is no significant difference or relationship between the two groups or variables, and the alternative hypothesis suggests that there is a significant difference or relationship, but does not specify the direction of the difference or relationship.

When performing a two-tailed test, you need to determine the level of significance, which is denoted by alpha (α). The value of alpha, in this case, is 0.05. To perform a two-tailed test at a significance level of 0.05, you need to divide alpha by 2, giving a significance level of 0.025 for each distribution tail (0.05/2 = 0.025). This is done because the two-tailed test is looking for significance in either tail of the distribution. If the calculated test statistic falls in the rejection region of either tail of the distribution, then the null hypothesis is rejected and the alternative hypothesis is accepted. In this case, the researcher can conclude that there is a significant difference or relationship between the two groups or variables.

Assuming that the population follows a normal distribution, the tail located below the critical value of z = –1.96 (in a later section, you will discuss how this value was determined) and the tail above the critical value of z = +1.96 each represent a proportion of 0.025. These tails are referred to as the lower and upper tails, respectively, and they correspond to the extreme values of the distribution that are far from the central part of the bell curve. These critical values are used in a two-tailed hypothesis test to determine whether to reject or fail to reject the null hypothesis. The null hypothesis represents the default assumption that there is no significant difference between the observed data and what would be expected under a specific condition.

If the calculated test statistic falls within the critical values, then the null hypothesis cannot be rejected at the 0.05 level of significance. However, if the calculated test statistic falls outside the critical values (orange-coloured areas in Figure 7), then the null hypothesis can be rejected in favour of the alternative hypothesis, suggesting that there is evidence of a significant difference between the observed data and what would be expected under the specified condition.

• 1.6 - Hypothesis Testing

Another way to make statistical inferences about a population parameter such as the mean is to use hypothesis testing to make decisions about the parameter’s value. Suppose that we are interested in a particular value of the mean single-family home sale price, for example, a claim from a realtor that the mean sale price in this market is $$\$$255,000. Does the information in our sample support this claim, or does it favor an alternative claim?

## The rejection region method

To decide between two competing claims, we can conduct a hypothesis test as follows.

• Express the claim about a specific value for the population parameter of interest as a null hypothesis , denoted NH. [More traditional notation uses H0.] The null hypothesis needs to be in the form "parameter = some hypothesized value," for example, NH: E(Y) = 255. A frequently used legal analogy is that the null hypothesis is equivalent to a presumption of innocence in a trial before any evidence has been presented.
• Express the alternative claim as an alternative hypothesis , denoted AH. [More traditional notation uses Ha or H1.]. The alternative hypothesis can be in a lower-tail form, for example, AH: E(Y) < 255, or an upper-tail form, for example, AH: E(Y) > 255, or a two-tail form, for example, AH: E(Y) ≠ 255. The alternative hypothesis, also sometimes called the research hypothesis, is what we would like to demonstrate to be the case, and needs to be stated before looking at the data. To continue the legal analogy, the alternative hypothesis is guilt, and we will only reject the null hypothesis (innocence) if we favor the alternative hypothesis (guilt) beyond a reasonable doubt. To illustrate, we will presume for the home prices example that we have some reason to suspect that the mean sale price is higher than claimed by the realtor (perhaps a political organization is campaigning on the issue of high housing costs and has employed us to investigate whether sale prices are "too high" in this housing market). Thus, our upper-tail alternative hypothesis is AH: E(Y) > 255.
• Calculate a test statistic based on the assumption that the null hypothesis is true. For hypothesis tests for a univariate population mean the relevant test statistic is $\text{t-statistic}=\frac{m_Y-\text{E}(Y)}{s_Y/\sqrt{n}},$ where $$m_Y$$ is the sample mean, E(Y) is the value of the population mean in the null hypothesis, $$s_Y$$ is the sample standard deviation, and n is the sample size.
• For an upper-tail test, a t-statistic that is positive and far from zero would then lead us to favor the alternative hypothesis (a t-statistic that was far from zero but negative would favor neither hypothesis and the test would be inconclusive).
• For a lower-tail test, a t-statistic that is negative and far from zero would then lead us to favor the alternative hypothesis (a t-statistic that was far from zero but positive would favor neither hypothesis and the test would be inconclusive).
• For a two-tail test, any t-statistic that is far from zero (positive or negative) would lead us to favor the alternative hypothesis.
• To decide how far from zero a t-statistic would have to be before we reject the null hypothesis in favor of the alternative, recall the legal analogy. To deliver a guilty verdict (the alternative hypothesis), the jury must establish guilt beyond a reasonable doubt. In other words, a jury rejects the presumption of innocence (the null hypothesis) only if there is compelling evidence of guilt. In statistical terms, compelling evidence of guilt is found only in the tails of the t-distribution density curve. For example, in conducting an upper-tail test, if the t-statistic is way out in the upper tail, then it seems unlikely that the null hypothesis could have been true—so we reject it in favor of the alternative. Otherwise, the t-statistic could well have arisen while the null hypothesis held true—so we do not reject it in favor of the alternative. How far out in the tail does the t-statistic have to be to favor the alternative hypothesis rather than the null? Here we must make a decision about how much evidence we will require before rejecting a null hypothesis. There is always a chance that we might mistakenly reject a null hypothesis when it is actually true (the equivalent of pronouncing an innocent defendant guilty). Often, this chance—called the significance level —will be set at 5%, but more stringent tests (such as in clinical trials of new pharmaceutical drugs) might set this at 1%, while less stringent tests (such as in sociological studies) might set this at 10%. For the sake of argument, we use 5% as a default value for hypothesis tests in this course (unless stated otherwise).
• For an upper-tail test, the critical value is the 95th percentile of the t-distribution with n−1 degrees of freedom; reject the null in favor of the alternative if the t-statistic is greater than this.
• For a lower-tail test, the critical value is the 5th percentile of the t-distribution with n−1 degrees of freedom; reject the null in favor of the alternative if the t-statistic is less than this.
• For a two-tail test, the two critical values are the 2.5th and the 97.5th percentiles of the t-distribution with n−1 degrees of freedom; reject the null in favor of the alternative if the t-statistic is less than the 2.5th percentile or greater than the 97.5th percentile.

It is best to lay out hypothesis tests in a series of steps, so for the house prices example:

• State null hypothesis: NH: E(Y) = 255.
• State alternative hypothesis: AH: E(Y) > 255.
• Calculate test statistic: t-statistic = $$m_Y−\text{E}(Y)/(s_Y/\sqrt{n})=(278.6033−255)/(53.8656/\sqrt{30})=2.40$$.
• Set significance level: 5%.
• Look up critical value: The 95th percentile of the t-distribution with 29 degrees of freedom is 1.699; the rejection region is therefore any t-statistic greater than 1.699.
• Make decision: Since the t-statistic of 2.40 falls in the rejection region, we reject the null hypothesis in favor of the alternative.
• Interpret in the context of the situation: The 30 sample sale prices suggest that a population mean of $$\$$255,000 seems implausible—the sample data favor a value greater than this (at a significance level of 5%).

## The p-value method

An alternative way to conduct a hypothesis test is to again assume initially that the null hypothesis is true, but then to calculate the probability of observing a t-statistic as extreme as the one observed or even more extreme (in the direction that favors the alternative hypothesis). This is known as the p-value (sometimes also called the observed significance level):

• For an upper-tail test, the p-value is the area under the curve of the t-distribution (with n−1 degrees of freedom) to the right of the observed t-statistic.
• For a lower-tail test, the p-value is the area under the curve of the t-distribution (with n−1 degrees of freedom) to the left of the observed t-statistic.
• For a two-tail test, the p-value is the sum of the areas under the curve of the t-distribution (with n−1 degrees of freedom) beyond both the observed t-statistic and the negative of the observed t-statistic.

If the p-value is too "small," then this suggests that it seems unlikely that the null hypothesis could have been true—so we reject it in favor of the alternative. Otherwise, the t-statistic could well have arisen while the null hypothesis held true—so we do not reject it in favor of the alternative. Again, the significance level chosen tells us how small is small: If the p-value is less than the significance level, then reject the null in favor of the alternative; otherwise, do not reject it. For the home prices example:

• Look up p-value: The area to the right of the t-statistic (2.40) for the t-distribution with 29 degrees of freedom is less than 0.025 but greater than 0.01 (since the 97.5th percentile of this t-distribution is 2.045 and the 99th percentile is 2.462); thus the upper-tail p-value is between 0.01 and 0.025.
• Make decision: Since the p-value is between 0.01 and 0.025, it must be less than the significance level (0.05), so we reject the null hypothesis in favor of the alternative.

The following figure shows why the rejection region method and the p-value method will always lead to the same decision (since if the t-statistic is in the rejection region, then the p-value must be smaller than the significance level, and vice versa).

Why do we need two methods if they will always lead to the same decision? Well, when learning about hypothesis tests and becoming comfortable with their logic, many people find the rejection region method a little easier to apply. However, when we start to rely on statistical software for conducting hypothesis tests in later chapters of the book, we will find the p-value method easier to use. At this stage, when doing hypothesis test calculations by hand, it is helpful to use both the rejection region method and the p-value method to reinforce learning of the general concepts. This also provides a useful way to check our calculations since if we reach a different conclusion with each method we will know that we have made a mistake.

## Lower-tail tests

Lower-tail tests work in a similar way to upper-tail tests, but all the calculations are performed in the negative (left-hand) tail of the t-distribution density curve; the following figure illustrates.

A lower-tail test would result in an inconclusive result for the home prices example (since the large, positive t-statistic means that the data favor neither the null hypothesis, NH: E(Y) = 255, nor the alternative hypothesis, AH: E(Y) < 255).

## Two-tail tests

Two-tail tests work similarly, but we have to be careful to work with both tails of the t-distribution; the following figure illustrates.

For the home prices example, we might want to do a two-tail hypothesis test if we had no prior expectation about how large or small sale prices are, but just wanted to see whether or not the realtor's claim of $$\$$255,000 was plausible. The steps involved are as follows.

• State alternative hypothesis: AH: E(Y) ≠ 255.
• critical value: The 97.5th percentile of the t-distribution with 29 degrees of freedom is 2.045; the rejection region is therefore any t-statistic greater than 2.045 or less than −2.045 (we need the 97.5th percentile in this case because this is a two-tail test, so we need half the significance level in each tail).
• p-value: The area to the right of the t-statistic (2.40) for the t-distribution with 29 degrees of freedom is less than 0.025 but greater than 0.01 (since the 97.5th percentile of this t-distribution is 2.045 and the 99th percentile is 2.462); thus the upper-tail area is between 0.01 and 0.025 and the two-tail p-value is twice as big as this, that is, between 0.02 and 0.05.
• Since the t-statistic of 2.40 falls in the rejection region, we reject the null hypothesis in favor of the alternative.
• Since the p-value is between 0.02 and 0.05, it must be less than the significance level (0.05), so we reject the null hypothesis in favor of the alternative.
• Interpret in the context of the situation: The 30 sample sale prices suggest that a population mean of \$255,000 seems implausible—the sample data favor a value different from this (at a significance level of 5%).

## Hypothesis test errors

When we introduced the significance level above, we saw that the person conducting the hypothesis test gets to choose this value. We now explore this notion a little more fully. Whenever we conduct a hypothesis test, either we reject the null hypothesis in favor of the alternative or we do not reject the null hypothesis. "Not rejecting" a null hypothesis isn't quite the same as "accepting" it. All we can say in such a situation is that we do not have enough evidence to reject the null—recall the legal analogy where defendants are not found "innocent" but rather are found "not guilty." Anyway, regardless of the precise terminology we use, we hope to reject the null when it really is false and to "fail to reject it" when it really is true. Anything else will result in a hypothesis test error. There are two types of error that can occur, as illustrated in the following table:

A type 1 error can occur if we reject the null hypothesis when it is really true—the probability of this happening is precisely the significance level. If we set the significance level lower, then we lessen the chance of a type 1 error occurring. Unfortunately, lowering the significance level increases the chance of a type 2 error occurring—when we fail to reject the null hypothesis but we should have rejected it because it was false. Thus, we need to make a trade-off and set the significance level low enough that type 1 errors have a low chance of happening, but not so low that we greatly increase the chance of a type 2 error happening. The default value of 5% tends to work reasonably well in many applications at balancing both goals. However, other factors also affect the chance of a type 2 error happening for a specific significance level. For example, the chance of a type 2 error tends to decrease the greater the sample size.

## Start Here!

• Welcome to STAT 462!
• Search Course Materials
• 1.1 - Identifying and Summarizing Data
• 1.2 - Population Distributions
• 1.3 - Selecting Individuals at Random
• 1.4 - Random Sampling
• 1.5 - Interval Estimation
• 1.7 - Random Errors and Prediction
• Lesson 2: Simple Linear Regression (SLR) Model
• Lesson 3: SLR Evaluation
• Lesson 4: SLR Assumptions, Estimation & Prediction
• Lesson 5: Multiple Linear Regression (MLR) Model & Evaluation
• Lesson 6: MLR Assumptions, Estimation & Prediction
• Lesson 7: Transformations & Interactions
• Lesson 8: Categorical Predictors
• Lesson 9: Influential Points
• Lesson 10: Regression Pitfalls
• Lesson 11: Model Building
• Lesson 12: Logistic, Poisson & Nonlinear Regression
• Website for Applied Regression Modeling, 2nd edition
• Notation Used in this Course
• R Software Help
• Minitab Software Help

Copyright © 2018 The Pennsylvania State University Privacy and Legal Statements Contact the Department of Statistics Online Programs

• school Campus Bookshelves
• perm_media Learning Objects
• how_to_reg Request Instructor Account
• hub Instructor Commons
• Periodic Table
• Physics Constants
• Scientific Calculator
• Reference & Cite
• Tools expand_more

This action is not available.

## 11.7: Test of a Single Variance

• Last updated
• Save as PDF
• Page ID 1363

A test of a single variance assumes that the underlying distribution is normal . The null and alternative hypotheses are stated in terms of the population variance (or population standard deviation). The test statistic is:

$\chi^{2} = \frac{(n-1)s^{2}}{\sigma^{2}} \label{test}$

• $$n$$ is the the total number of data
• $$s^{2}$$ is the sample variance
• $$\sigma^{2}$$ is the population variance

You may think of $$s$$ as the random variable in this test. The number of degrees of freedom is $$df = n - 1$$. A test of a single variance may be right-tailed, left-tailed, or two-tailed. The next example will show you how to set up the null and alternative hypotheses. The null and alternative hypotheses contain statements about the population variance.

## Example $$\PageIndex{1}$$

Math instructors are not only interested in how their students do on exams, on average, but how the exam scores vary. To many instructors, the variance (or standard deviation) may be more important than the average.

Suppose a math instructor believes that the standard deviation for his final exam is five points. One of his best students thinks otherwise. The student claims that the standard deviation is more than five points. If the student were to conduct a hypothesis test, what would the null and alternative hypotheses be?

Even though we are given the population standard deviation, we can set up the test using the population variance as follows.

• $$H_{0}: \sigma^{2} = 5^{2}$$
• $$H_{a}: \sigma^{2} > 5^{2}$$

## Exercise $$\PageIndex{1}$$

A SCUBA instructor wants to record the collective depths each of his students dives during their checkout. He is interested in how the depths vary, even though everyone should have been at the same depth. He believes the standard deviation is three feet. His assistant thinks the standard deviation is less than three feet. If the instructor were to conduct a test, what would the null and alternative hypotheses be?

• $$H_{0}: \sigma^{2} = 3^{2}$$
• $$H_{a}: \sigma^{2} > 3^{2}$$

## Example $$\PageIndex{2}$$

With individual lines at its various windows, a post office finds that the standard deviation for normally distributed waiting times for customers on Friday afternoon is 7.2 minutes. The post office experiments with a single, main waiting line and finds that for a random sample of 25 customers, the waiting times for customers have a standard deviation of 3.5 minutes.

With a significance level of 5%, test the claim that a single line causes lower variation among waiting times (shorter waiting times) for customers .

Since the claim is that a single line causes less variation, this is a test of a single variance. The parameter is the population variance, $$\sigma^{2}$$, or the population standard deviation, $$\sigma$$.

Random Variable: The sample standard deviation, $$s$$, is the random variable. Let $$s = \text{standard deviation for the waiting times}$$.

• $$H_{0}: \sigma^{2} = 7.2^{2}$$
• $$H_{a}: \sigma^{2} < 7.2^{2}$$

The word "less" tells you this is a left-tailed test.

Distribution for the test: $$\chi^{2}_{24}$$, where:

• $$n = \text{the number of customers sampled}$$
• $$df = n - 1 = 25 - 1 = 24$$

Calculate the test statistic (Equation \ref{test}):

$\chi^{2} = \frac{(n-1)s^{2}}{\sigma^{2}} = \frac{(25-1)(3.5)^{2}}{7.2^{2}} = 5.67 \nonumber$

where $$n = 25$$, $$s = 3.5$$, and $$\sigma = 7.2$$.

Probability statement: $$p\text{-value} = P(\chi^{2} < 5.67) = 0.000042$$

Compare $$\alpha$$ and the $$p\text{-value}$$ :

$\alpha = 0.05 (p\text{-value} = 0.000042 \alpha > p\text{-value} \nonumber$

Make a decision: Since $$\alpha > p\text{-value}$$, reject $$H_{0}$$. This means that you reject $$\sigma^{2} = 7.2^{2}$$. In other words, you do not think the variation in waiting times is 7.2 minutes; you think the variation in waiting times is less.

Conclusion: At a 5% level of significance, from the data, there is sufficient evidence to conclude that a single line causes a lower variation among the waiting times or with a single line, the customer waiting times vary less than 7.2 minutes.

In 2nd DISTR , use 7:χ2cdf . The syntax is (lower, upper, df) for the parameter list. For Example , χ2cdf(-1E99,5.67,24) . The $$p\text{-value} = 0.000042$$.

## Exercise $$\PageIndex{2}$$

The FCC conducts broadband speed tests to measure how much data per second passes between a consumer’s computer and the internet. As of August of 2012, the standard deviation of Internet speeds across Internet Service Providers (ISPs) was 12.2 percent. Suppose a sample of 15 ISPs is taken, and the standard deviation is 13.2. An analyst claims that the standard deviation of speeds is more than what was reported. State the null and alternative hypotheses, compute the degrees of freedom, the test statistic, sketch the graph of the p -value, and draw a conclusion. Test at the 1% significance level.

• $$H_{0}: \sigma^{2} = 12.2^{2}$$
• $$H_{a}: \sigma^{2} > 12.2^{2}$$

In 2nd DISTR , use7: χ2cdf . The syntax is (lower, upper, df) for the parameter list. χ2cdf(16.39,10^99,14) . The $$p\text{-value} = 0.2902$$.

$$df = 14$$

$\text{chi}^{2} \text{test statistic} = 16.39 \nonumber$

The $$p\text{-value}$$ is $$0.2902$$, so we decline to reject the null hypothesis. There is not enough evidence to suggest that the variance is greater than $$12.2^{2}$$.

• “AppleInsider Price Guides.” Apple Insider, 2013. Available online at http://appleinsider.com/mac_price_guide (accessed May 14, 2013).
• Data from the World Bank, June 5, 2012.

To test variability, use the chi-square test of a single variance. The test may be left-, right-, or two-tailed, and its hypotheses are always expressed in terms of the variance (or standard deviation).

## Formula Review

$$\chi^{2} = \frac{(n-1) \cdot s^{2}}{\sigma^{2}}$$ Test of a single variance statistic where:

$$n: \text{sample size}$$

$$s: \text{sample standard deviation}$$

$$\sigma: \text{population standard deviation}$$

$$df = n – 1 \text{Degrees of freedom}$$

Test of a Single Variance

• Use the test to determine variation.
• The degrees of freedom is the $$\text{number of samples} - 1$$.
• The test statistic is $$\frac{(n-1) \cdot s^{2}}{\sigma^{2}}$$, where $$n = \text{the total number of data}$$, $$s^{2} = \text{sample variance}$$, and $$\sigma^{2} = \text{population variance}$$.
• The test may be left-, right-, or two-tailed.

Use the following information to answer the next three exercises: An archer’s standard deviation for his hits is six (data is measured in distance from the center of the target). An observer claims the standard deviation is less.

## Exercise $$\PageIndex{3}$$

What type of test should be used?

a test of a single variance

## Exercise $$\PageIndex{4}$$

State the null and alternative hypotheses.

## Exercise $$\PageIndex{5}$$

Is this a right-tailed, left-tailed, or two-tailed test?

a left-tailed test

Use the following information to answer the next three exercises: The standard deviation of heights for students in a school is 0.81. A random sample of 50 students is taken, and the standard deviation of heights of the sample is 0.96. A researcher in charge of the study believes the standard deviation of heights for the school is greater than 0.81.

## Exercise $$\PageIndex{6}$$

$$H_{0}: \sigma^{2} = 0.81^{2}$$;

$$H_{a}: \sigma^{2} > 0.81^{2}$$

$$df =$$ ________

Use the following information to answer the next four exercises: The average waiting time in a doctor’s office varies. The standard deviation of waiting times in a doctor’s office is 3.4 minutes. A random sample of 30 patients in the doctor’s office has a standard deviation of waiting times of 4.1 minutes. One doctor believes the variance of waiting times is greater than originally thought.

## Exercise $$\PageIndex{7}$$

Exercise $$\pageindex{8}$$.

What is the test statistic?

## Exercise $$\PageIndex{9}$$

What is the $$p\text{-value}$$?

## Exercise $$\PageIndex{10}$$

What can you conclude at the 5% significance level?

If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## AP®︎/College Statistics

Course: ap®︎/college statistics   >   unit 10.

• Idea behind hypothesis testing

## Examples of null and alternative hypotheses

• Writing null and alternative hypotheses
• P-values and significance tests
• Comparing P-values to different significance levels
• Estimating a P-value from a simulation
• Estimating P-values from simulations
• Using P-values to make conclusions

## Want to join the conversation?

• Upvote Button navigates to signup page
• Downvote Button navigates to signup page
• Flag Button navigates to signup page

## Statistics Resources

• Excel - Tutorials
• Basic Probability Rules
• Single Event Probability
• Complement Rule
• Levels of Measurement
• Independent and Dependent Variables
• Entering Data
• Central Tendency
• Data and Tests
• Displaying Data
• Discussing Statistics In-text
• SEM and Confidence Intervals
• Two-Way Frequency Tables
• Empirical Rule
• Finding Probability
• Accessing SPSS
• Chart and Graphs
• Frequency Table and Distribution
• Descriptive Statistics
• Converting Raw Scores to Z-Scores
• Converting Z-scores to t-scores
• Split File/Split Output
• Partial Eta Squared
• Correlation
• Testing Parametric Assumptions
• One-Way ANOVA
• Two-Way ANOVA
• Repeated Measures ANOVA
• Goodness-of-Fit
• Test of Association
• Pearson's r
• Point Biserial
• Mediation and Moderation
• Simple Linear Regression
• Multiple Linear Regression
• Binomial Logistic Regression
• Multinomial Logistic Regression
• Independent Samples T-test
• Dependent Samples T-test
• Testing Assumptions
• T-tests using SPSS
• T-Test Practice
• Predictive Analytics This link opens in a new window
• Quantitative Research Questions
• Null & Alternative Hypotheses
• One-Tail vs. Two-Tail
• Alpha & Beta
• Associated Probability
• Decision Rule
• Statement of Conclusion
• Statistics Group Sessions

## One-Tail vs Two-Tail Tests

Two-tailed Test

When testing a hypothesis, you must determine if it is a one-tailed or a two-tailed test. The most common format is a two-tailed test, meaning the critical region is located in both tails of the distribution. This is also referred to as a non-directional hypothesis.

This type of test is associated with a "neutral" alternative hypothesis. Here are some examples:

• There is a difference between the scores.
• The groups are not equal .
• There is a relationship between the variables.

One-tailed Test

The alternative option is a one-tailed test. As the name implies, the critical region lies in only one tail of the distribution. This is also called a directional  hypothesis. The image below shows a right-tailed test. A left-tailed test would be another type of one-tailed test.

This type of test is associated with a more specific alternative claim. Here are some examples:

• One group is higher than the other.
• There is a decrease in performance.
• Group A performs worse than Group B.
• << Previous: Null & Alternative Hypotheses
• Next: Alpha & Beta >>
• Last Updated: Jan 16, 2024 12:09 PM
• URL: https://resources.nu.edu/statsresources

Six Sigma Study Guide

Study notes and guides for Six Sigma certification tests

## Tailed Hypothesis Tests

Posted by Ted Hessing

A tailed hypothesis tests is an assumption about a population parameter. The assumption may or may not be true.  Hypothesis testing is a key procedure in inferential statistics used to make statistical decisions using experimental data.  It is basically an assumption that we make about the population parameter.

## Null and alternative hypothesis

Null hypothesis (H 0 ): A statistical hypothesis assumes that the observation is due to the chance factor. In other words, the null hypothesis states that there is no (statistical significance) difference or effect.

Alternative hypothesis (H 1 ): The complementary hypothesis of the null hypothesis is an alternative hypothesis. In other words, the alternative hypothesis shows that observations are the results of a real effect.

## What are the tails in a hypothesis test?

A tail in hypothesis testing refers to the tail at either end of a distribution curve. Generally, in hypothesis tests, test statistic means to obtain all of the sample data and convert it to a single value. For example, Z-test calculates Z statistics, t-test calculates t-test statistic, and F-test calculates F values etc., are the test statistics. Test statistics need to compare to an appropriate critical value. A decision can then be made to reject or not reject the null hypothesis.

In probability distribution plots, the shaded area in the plot (one side in one-tailed hypothesis and two sides in a two-tailed hypothesis) indicates the probability of a value falls within that range.

Critical region: In a hypothesis test, critical regions are ranges of the distributions where the values represent statistically significant results. If the test statistic falls in the critical region, reject the null hypothesis.

## Types of tailed hypothesis tests

There are three basic types of ‘tails’ that hypothesis tests can have:

• Right-tailed test: where the alternative hypothesis includes a ‘>’ symbol.
• Left-tailed test: where the alternative hypothesis includes a ‘<’ symbol.
• Two-tailed test: where the alternative hypothesis includes a ≠.

## One-tailed hypothesis tests

A test of hypothesis where the area of rejection is only in one direction. In other words, when change is expected to have occurred in one direction, i.e expecting output either increase or to decrease.

If the level of significance is 0.05, a one-tail test allots the entire alpha (α) in the one direction to test the statistical significance. Since the statistical significance in the one direction of interest, it is also known as a directional hypothesis.

Reject the null hypothesis; If the test statistic falls in the critical region, that means the test statistic has a greater value than the critical value (for the right-tailed test) and the test statistic has a lesser value than the critical value (for the left tailed test).

Generally, one-tailed tests are more powerful than two-tailed tests; because of that, one-tailed tests are preferred.

The basic disadvantage of a one-tailed test is it considers effects in one direction only. There is a chance that an important effect may miss in another direction. For example, a new material used in the production and checking whether the yield improved over the existing material. There is a possibility that new material may give less yield than the current material.

One tailed tests are further divided into

## Right-tailed test

Left-tailed test.

Right tailed test is also called the upper tail test. A hypothesis test is performed if the population parameter is suspected to be greater than the assumed parameter of the null hypothesis.

• H 0 : The sampling mean (x̅) is less than are equal to µ
• H 1 : The sampling mean (x̅) is greater than µ.

Example: The average weight of an iron bar population is 90lbs. Supervisor believes that the average weight might be higher. Random samples of 5 iron bars are measured, and the average weight is 110lbs and a standard deviation of 18lbs. With a 95% confidence level, is there enough evidence to suggest the average weight is higher?

Population average score (µ) = 90

• Sample average (x̅) = 110
• number of samples (n) = 5
• Level of significance α=0.05

H 0 : The average weight is equal to 90, µ=90.

H 1 : The average score is higher than 90, µ>90

Since supervisor is keen to check the average weight is higher, it is a right-tailed test.

Compute the critical value: For 95% confidence level t value with a degrees of freedom n-1= 2.132

Critical value =2.132

Calculate the test statistics t = x̅-µ/(s/√n) = 110-90/(18/√5)=2.484.

Conclusion: Test statistic is greater than the critical value, and it is in the rejection region. Hence, we can reject the null hypothesis. So the average weight of the iron bar is may be higher than the 90lbs.

Left-tailed test is also known as a lower tail test. A hypothesis test is performed if the population parameter is suspected to be less than the assumed parameter of the null hypothesis.

• H 0 : The sampling mean (x̅) is greater than are equal to µ
• H 1 : The sampling mean (x̅) is less than µ.

Example: The average weight of an iron bar population is 90lbs. Supervisor believes that the average weight might be lower. Random samples of 6 iron bars are measured, and the average weight is 82lbs and a standard deviation of 18lbs. With a 95% confidence level, is there enough evidence to suggest the average weight is lower?

• Sample average (x̅) = 82
• number of samples (n) = 6

H 1 : The average score is less than 90, µ<90

Since the supervisor is keen to check the average weight is lower, hence it is a left-tailed test.

Compute the critical value: For 95% confidence level t value with a degrees of freedom n-1= -2.015

Critical value =-2.015

Calculate the test statistics t = x̅-µ/(s/√n) = 82-90/(18/√6)=-1.088

Conclusion: Test statistic is not in the rejection region. Hence, we failed to reject the null hypothesis. So the average weight of the iron bar is 90lbs.

## Two-tailed hypothesis tests

A test of hypothesis where the area of rejection is on both sides of the sampling distribution.

If level of significance is 0.05 of a two-tailed test, it distributes the alpha (α) into two equal parts (α/2 & α/2) on both sides to test the statistical significance.

• H 0 : The sampling mean (x̅) is equal to µ
• H 1 : The sampling mean (x̅) is not equal to µ

Two-tailed tests also known as two-sided or non-directional test, as it tests the effects on both sides. In a two-tailed test, extreme values above or below are evidence against the null hypothesis.

Reject the null hypothesis if test statistics fall on either side of the critical region.

Example: The average score for the mean population is 80, with a standard deviation of 10. With a new training method, the professor believes that the score might change. Professor tested randomly 36 students’ scores. The average score of the sample is 88. With a 95% confidence level, is there enough evidence to suggest the average score changed?

Population average score (µ) = 80

• Sample average (x̅) = 88
• number of samples (n) = 36

H 0 : The average score is equal to 80, µ=80.

H 1 : The average score is not equal to 80, µ≠80

Since the professor is keen to check the change in average score, it is a two tail test

Compute the critical value: For 95% confidence level Z value = 1.96

Critical value =±1.96

Calculate the test statistics Z = x̅-µ/(σ/√n) = 88-80/(10/√36)=4.8

Conclusion: The test statistic is greater than the critical value, which means the test statistic is in the rejection region. So, we can reject the null hypothesis.

## Few more Example

For Example, consider a null hypothesis that states that cars traveling on a particular road have a mean velocity of 40 miles/hour:

• A right-tailed test would state that cars traveling on a particular road have a mean velocity greater than 40 miles/hour.
• A left-tailed test would state that cars traveling on a particular road have a mean velocity less than 40 miles/hour.
• A two-tailed test would state that cars traveling on a particular road have a mean velocity greater than or less than 40 miles/hour.

• https://www.statisticshowto.datasciencecentral.com/how-to-decide-if-a-hypothesis-test-is-a-left-tailed-test-or-a-right-tailed-test/

## Important Videos

I believe you have the right tail and left tails mixed up in this article. It conflicts with other articles you have written and also with my separate findings. In general, the right tailed test is when the alternative hypothesis is > null hypothesis. Putting you on the right side of the bell curve, hence the “right tailed” name.

You’re absolutely correct, Montgomery. The article has been updated. Thanks for bringing this to my attention!

Good Day Ted,

Just brushing up a little while on my break at work. Has the following below been updated yet? When looking at an actual graph it’s otherwise.

-When performing a right-tailed test, we reject the null hypothesis if the test statistics are less than the critical value.

-When performing a left-tailed test, we reject the null hypothesis if the test statistics are greater than the critical value.

We should be all set now with our current re-write, Lemarcus.

Thank you for the note!

What is the difference btw z statistic and t statistic ?

I have seen on your content that, for a right tailed test

For Z statistic, reject null hypothesis if p value is less than critical value

For t statistic, reject null hypothesis if t value is more than critical value

Also, in the two-tailed test, you chose Z instead of t statistic. Why ?

Hello Rahul,

A t-test is used to compare the mean of two given samples. Like a z-test, a t-test also assumes a normal distribution of the sample. A t-test is used when the population parameters (mean and standard deviation) are not known.

Since we know the population mean and standard deviation, selected the z test instead of t test

Your explanations are better and easier to follow than those of my Statistics profs… Thanks

Thanks, Ben. That’s high praise!

This site uses Akismet to reduce spam. Learn how your comment data is processed .

Enter the destination URL

• Search Search Please fill out this field.

## What Is a One-Tailed Test?

• Determining Significance
• One-Tailed Test FAQs
• Corporate Finance
• Financial Analysis

## One-Tailed Test Explained: Definition and Example

Investopedia / Xiaojie Liu

A one-tailed test is a statistical test in which the critical area of a distribution is one-sided so that it is either greater than or less than a certain value, but not both. If the sample being tested falls into the one-sided critical area, the alternative hypothesis will be accepted instead of the null hypothesis.

Financial analysts use the one-tailed test to test an investment or portfolio hypothesis.

## Key Takeaways

• A one-tailed test is a statistical hypothesis test set up to show that the sample mean would be higher or lower than the population mean, but not both.
• When using a one-tailed test, the analyst is testing for the possibility of the relationship in one direction of interest and completely disregarding the possibility of a relationship in another direction.
• Before running a one-tailed test, the analyst must set up a null and alternative hypothesis and establish a probability value (p-value).

A basic concept in inferential statistics is hypothesis testing . Hypothesis testing is run to determine whether a claim is true or not, given a population parameter. A test that is conducted to show whether the mean of the sample is significantly greater than and significantly less than the mean of a population is considered a two-tailed test . When the testing is set up to show that the sample mean would be higher or lower than the population mean, it is referred to as a one-tailed test. The one-tailed test gets its name from testing the area under one of the tails (sides) of a normal distribution , although the test can be used in other non-normal distributions.

Before the one-tailed test can be performed, null and alternative hypotheses must be established. A null hypothesis is a claim that the researcher hopes to reject. An alternative hypothesis is the claim supported by rejecting the null hypothesis.

A one-tailed test is also known as a directional hypothesis or directional test.

## Example of the One-Tailed Test

Let's say an analyst wants to prove that a portfolio manager outperformed the S&P 500 index in a given year by 16.91%. They may set up the null (H 0 ) and alternative (H a ) hypotheses as:

H 0 : μ ≤ 16.91

H a : μ > 16.91

The null hypothesis is the measurement that the analyst hopes to reject. The alternative hypothesis is the claim made by the analyst that the portfolio manager performed better than the S&P 500. If the outcome of the one-tailed test results in rejecting the null, the alternative hypothesis will be supported. On the other hand, if the outcome of the test fails to reject the null, the analyst may carry out further analysis and investigation into the portfolio manager’s performance.

The region of rejection is on only one side of the sampling distribution in a one-tailed test. To determine how the portfolio’s return on investment compares to the market index, the analyst must run an upper-tailed significance test in which extreme values fall in the upper tail (right side) of the normal distribution curve. The one-tailed test conducted in the upper or right tail area of the curve will show the analyst how much higher the portfolio return is than the index return and whether the difference is significant.

## 1%, 5% or 10%

The most common significance levels (p-values) used in a one-tailed test.

## Determining Significance in a One-Tailed Test

To determine how significant the difference in returns is, a significance level must be specified. The significance level is almost always represented by the letter p, which stands for probability. The level of significance is the probability of incorrectly concluding that the null hypothesis is false. The significance value used in a one-tailed test is either 1%, 5%, or 10%, although any other probability measurement can be used at the discretion of the analyst or statistician. The probability value is calculated with the assumption that the null hypothesis is true. The lower the p-value , the stronger the evidence that the null hypothesis is false.

If the resulting p-value is less than 5%, the difference between both observations is statistically significant, and the null hypothesis is rejected. Following our example above, if the p-value = 0.03, or 3%, then the analyst can be 97% confident that the portfolio returns did not equal or fall below the return of the market for the year. They will, therefore, reject H 0  and support the claim that the portfolio manager outperformed the index. The probability calculated in only one tail of a distribution is half the probability of a two-tailed distribution if similar measurements were tested using both hypothesis testing tools.

When using a one-tailed test, the analyst is testing for the possibility of the relationship in one direction of interest and completely disregarding the possibility of a relationship in another direction. Using our example above, the analyst is interested in whether a portfolio’s return is greater than the market’s. In this case, they do not need to statistically account for a situation in which the portfolio manager underperformed the S&P 500 index. For this reason, a one-tailed test is only appropriate when it is not important to test the outcome at the other end of a distribution.

## How Do You Determine If It Is a One-Tailed or Two-Tailed Test?

A one-tailed test looks for an increase or decrease in a parameter. A two-tailed test looks for change, which could be a decrease or an increase.

## What Is a One-Tailed T Test Used for?

A one-tailed T-test checks for the possibility of a one-direction relationship but does not consider a directional relationship in another direction.

## When Should a Two-Tailed Test Be Used?

You would use a two-tailed test when you want to test your hypothesis in both directions.

University of Southern California. " FAQ: What Are the Differences Between One-Tailed and Two-Tailed Tests? "

• Editorial Policy

## Two-tailed significance tests for 2 × 2 contingency tables: What is the alternative?

Affiliation.

• 1 Centre for Population Health Studies, Usher Institute of Population Health Sciences and Informatics, University of Edinburgh, Edinburgh, Scotland, UK.
• PMID: 31264237
• DOI: 10.1002/sim.8294

Two-tailed significance testing for 2 × 2 contingency tables has remained controversial. Within the medical literature, different tests are used in different papers and that choice may decide whether findings are adjudged to be significant or nonsignificant; a state of affairs that is clearly undesirable. In this paper, it is argued that a part of the controversy is due to a failure to recognise that there are two possible alternative hypotheses to the Null. It is further argued that, while one alternative hypothesis can lead to tests with greater power, the other choice is more applicable in medical research. That leads to the recommendation that, within medical research, 2 × 2 tables should be tested using double the one-tailed exact probability from Fisher's exact test or, as an approximation, the chi-squared test with Yates' correction for continuity.

Keywords: 2 × 2 contingency tables; Fisher's exact test; alternative hypotheses; two-tailed tests.

© 2019 John Wiley & Sons, Ltd.

• Chi-Square Distribution
• Computer Simulation
• Data Interpretation, Statistical
• Probability
• Statistics as Topic / methods*

## One-Tailed Hypothesis Tests: 3 Example Problems

In statistics, we use hypothesis tests to determine whether some claim about a population parameter is true or not.

Whenever we perform a hypothesis test, we always write a null hypothesis and an alternative hypothesis, which take the following forms:

H 0 (Null Hypothesis): Population parameter = ≤, ≥ some value

H A (Alternative Hypothesis): Population parameter <, >, ≠ some value

There are two types of hypothesis tests:

• Two-tailed test : Alternative hypothesis contains the ≠ sign
• One-tailed test : Alternative hypothesis contains either < or > sign

In a one-tailed test , the alternative hypothesis contains the less than (“<“) or greater than (“>”) sign. This indicates that we’re testing whether or not there is a positive or negative effect.

Check out the following example problems to gain a better understanding of one-tailed tests.

## Example 1: Factory Widgets

Suppose it’s assumed that the average weight of a certain widget produced at a factory is 20 grams. However, one engineer believes that a new method produces widgets that weigh less than 20 grams.

To test this, he can perform a one-tailed hypothesis test with the following null and alternative hypotheses:

• H 0 (Null Hypothesis): μ ≥ 20 grams
• H A (Alternative Hypothesis): μ < 20 grams

Note : We can tell this is a one-tailed test because the alternative hypothesis contains the less than ( < ) sign. Specifically, we would call this a left-tailed test because we’re testing if some population parameter is less than a specific value.

To test this, he uses the new method to produce 20 widgets and obtains the following information:

• n = 20 widgets
• x = 19.8 grams
• s = 3.1 grams

Plugging these values into the One Sample t-test Calculator , we obtain the following results:

• t-test statistic: -0.288525
• one-tailed p-value: 0.388

Since the p-value is not less than .05, the engineer fails to reject the null hypothesis.

He does not have sufficient evidence to say that the true mean weight of widgets produced by the new method is less than 20 grams.

## Example 2: Plant Growth

Suppose a standard fertilizer has been shown to cause a species of plants to grow by an average of 10 inches. However, one botanist believes a new fertilizer can cause this species of plants to grow by an average of greater than 10 inches.

To test this, she can perform a one-tailed hypothesis test with the following null and alternative hypotheses:

• H 0 (Null Hypothesis): μ ≤ 10 inches
• H A (Alternative Hypothesis): μ > 10 inches

Note : We can tell this is a one-tailed test because the alternative hypothesis contains the greater than ( > ) sign. Specifically, we would call this a right-tailed test because we’re testing if some population parameter is greater than a specific value.

To test this claim, she applies the new fertilizer to a simple random sample of 15 plants and obtains the following information:

• n = 15 plants
• x = 11.4 inches
• s = 2.5 inches
• t-test statistic: 2.1689
• one-tailed p-value: 0.0239

Since the p-value is less than .05, the botanist rejects the null hypothesis.

She has sufficient evidence to conclude that the new fertilizer causes an average increase of greater than 10 inches.

## Example 3: Studying Method

A professor currently teaches students to use a studying method that results in an average exam score of 82. However, he believes a new studying method can produce exam scores with an average value greater than 82.

To test this, he can perform a one-tailed hypothesis test with the following null and alternative hypotheses:

• H 0 (Null Hypothesis): μ ≤ 82
• H A (Alternative Hypothesis): μ > 82

To test this claim, the professor has 25 students use the new studying method and then take the exam. He collects the following data on the exam scores for this sample of students:

• t-test statistic: 3.6586
• one-tailed p-value: 0.0006

Since the p-value is less than .05, the professor rejects the null hypothesis.

He has sufficient evidence to conclude that the new studying method produces exam scores with an average score greater than 82.

Introduction to Hypothesis Testing What is a Directional Hypothesis? When Do You Reject the Null Hypothesis?

#### IMAGES

1. PPT

2. Two Tailed Test Tutorial

3. What Is a Two-Tailed Test? Definition and Example

4. What Is a Two-Tailed Test? Definition and Example / STATISTICAL TABLES

5. One Sample T Test

6. Image result for notation two-tailed hypothesis test

#### VIDEO

1. Hypothesis Testing

2. Example 14.5 (Hypothesis Test with an Average Two Tailed)

3. Statistics Two tailed Hypothesis example

4. Two-Tailed Hypothesis Test for the Population Mean

5. Two-Sample Hypothesis Tests

6. Hypothesis and it's types, One-tailed test, Two-tailed test, Type-1 & Type-II error in Urdu

1. t-test Calculator

Decide on the alternative hypothesis: Use a two-tailed t-test if you only care whether the population's mean (or, in the case of two populations, the difference between the populations' means) agrees or disagrees with the pre-set value. ... Critical values for two-tailed t-test: ±cdf t,d-1 (1-α/2) critical region:

2. An Introduction to t Tests

Revised on June 22, 2023. A t test is a statistical test that is used to compare the means of two groups. It is often used in hypothesis testing to determine whether a process or treatment actually has an effect on the population of interest, or whether two groups are different from one another. t test example.

3. Paired Samples t-test: Definition, Formula, and Example

A paired samples t-test always uses the following null hypothesis: H 0: μ 1 = μ 2 (the two population means are equal) The alternative hypothesis can be either two-tailed, left-tailed, or right-tailed: H 1 (two-tailed): μ 1 ≠ μ 2 (the two population means are not equal) H 1 (left-tailed): μ 1 < μ 2 (population 1 mean is less than ...

4. What is an Alternative Hypothesis in Statistics?

Null hypothesis: µ ≥ 70 inches. Alternative hypothesis: µ < 70 inches. A two-tailed hypothesis involves making an "equal to" or "not equal to" statement. For example, suppose we assume the mean height of a male in the U.S. is equal to 70 inches. The null and alternative hypotheses in this case would be: Null hypothesis: µ = 70 inches.

5. 5.2

Alternative Hypothesis. The statement that there is some difference in the population (s), denoted as H a or H 1. When writing hypotheses there are three things that we need to know: (1) the parameter that we are testing (2) the direction of the test (non-directional, right-tailed or left-tailed), and (3) the value of the hypothesized parameter.

6. 12.1.2: Hypothesis Test for a Correlation

The null-hypothesis of a two-tailed test states that there is no correlation (there is not a linear relation) between $$x$$ and $$y$$. The alternative-hypothesis states that there is a significant correlation (there is a linear relation) between $$x$$ and $$y$$. The t-test is a statistical test for the correlation coefficient. It can be used ...

7. Two Tailed Test: Definition, Examples

This video explains the difference between one and two tailed tests: For example, let's say you were running a z test with an alpha level of 5% (0.05). In a one tailed test, the entire 5% would be in a single tail. But with a two tailed test, that 5% is split between the two tails, giving you 2.5% (0.025) in each tail.

8. Introduction to Hypothesis Testing

A hypothesis test consists of five steps: 1. State the hypotheses. State the null and alternative hypotheses. These two hypotheses need to be mutually exclusive, so if one is true then the other must be false. 2. Determine a significance level to use for the hypothesis. Decide on a significance level.

9. Data analysis: hypothesis testing: 4.2 Two-tailed tests

To perform a two-tailed test at a significance level of 0.05, you need to divide alpha by 2, giving a significance level of 0.025 for each distribution tail (0.05/2 = 0.025). This is done because the two-tailed test is looking for significance in either tail of the distribution. If the calculated test statistic falls in the rejection region of ...

10. 1.6

The alternative hypothesis can be in a lower-tail form, for example, AH: E(Y) < 255, or an upper-tail form, for example, AH: E(Y) > 255, or a two-tail form, for example, AH: E(Y) ≠ 255. The alternative hypothesis, also sometimes called the research hypothesis, is what we would like to demonstrate to be the case, and needs to be stated before ...

11. 11.7: Test of a Single Variance

The test statistic is: χ2 = (n − 1)s2 σ2 (11.7.1) (11.7.1) χ 2 = ( n − 1) s 2 σ 2. where: n n is the the total number of data. s2 s 2 is the sample variance. σ2 σ 2 is the population variance. You may think of s s as the random variable in this test. The number of degrees of freedom is df = n − 1 d f = n − 1.

12. Examples of null and alternative hypotheses

It is the opposite of your research hypothesis. The alternative hypothesis--that is, the research hypothesis--is the idea, phenomenon, observation that you want to prove. If you suspect that girls take longer to get ready for school than boys, then: Alternative: girls time > boys time. Null: girls time <= boys time.

13. One-Tail vs. Two-Tail

When testing a hypothesis, you must determine if it is a one-tailed or a two-tailed test. The most common format is a two-tailed test, meaning the critical region is located in both tails of the distribution. This is also referred to as a non-directional hypothesis. This type of test is associated with a "neutral" alternative hypothesis.

14. One Tailed and Two Tailed Tests, Critical Values ...

This statistics video tutorial explains when you should use a one tailed test vs a two tailed test when solving problems associated with hypothesis testing. ...

15. One- and two-tailed tests

A two-tailed test applied to the normal distribution. A one-tailed test, showing the p-value as the size of one tail.. In statistical significance testing, a one-tailed test and a two-tailed test are alternative ways of computing the statistical significance of a parameter inferred from a data set, in terms of a test statistic.A two-tailed test is appropriate if the estimated value is greater ...

16. One-Tailed vs. Two-Tailed Tests

A two-tailed test, also known as a non directional hypothesis, is the standard test of significance to determine if there is a relationship between variables in either direction. Two-tailed tests ...

17. Tailed Hypothesis Tests

Two-tailed hypothesis tests. A test of hypothesis where the area of rejection is on both sides of the sampling distribution. If level of significance is 0.05 of a two-tailed test, it distributes the alpha (α) into two equal parts (α/2 & α/2) on both sides to test the statistical significance. H 0: The sampling mean (x̅) is equal to µ.

18. Independent t-tests. One- or two-tailed?

If your hypothesis is that the two group means are equal vs. that they differ, i.e.: H0:μ1 = μ2 H 0: μ 1 = μ 2 vs. H1:μ1 ≠ μ2 H 1: μ 1 ≠ μ 2, then you have a two-tailed test. This is because your alternative hypothesis is that the means differ in either direction: the mean of the second group ( μ2 μ 2) could either be higher or ...

19. One-Tailed Test Explained: Definition and Example

One-Tailed Test: A one-tailed test is a statistical test in which the critical area of a distribution is one-sided so that it is either greater than or less than a certain value, but not both. If ...

20. Two-tailed significance tests for 2 × 2 contingency tables ...

That leads to the recommendation that, within medical research, 2 × 2 tables should be tested using double the one-tailed exact probability from Fisher's exact test or, as an approximation, the chi-squared test with Yates' correction for continuity. Keywords: 2 × 2 contingency tables; Fisher's exact test; alternative hypotheses; two-tailed tests.

21. Solved Question 1 (3 points) Saved The null and alternative

Select one. O null and alternative hypothesis values Null Hypothesis: M1 = 42 Odataframes of values from each sample and optional equal variance indicator Alternative Hypothesis: Mi 7 M2 Oz-score and the corresponding P-value Notice that the alternative hypothesis is a two-tailed test.

22. One-Tailed Hypothesis Tests: 3 Example Problems

To test this, she can perform a one-tailed hypothesis test with the following null and alternative hypotheses: H 0 (Null Hypothesis): μ ≤ 10 inches; H A (Alternative Hypothesis): μ > 10 inches; Note: We can tell this is a one-tailed test because the alternative hypothesis contains the greater than (>) sign. Specifically, we would call this ...

23. Unit 6 Learning Content Flashcards

The hypothesis that can be rejected. Choose the incorrect answer: Hypothesis Testing: Tests claims about sample data. Choose the correct statement: the null is the only hypothesis that can contain the = sign. Write the null and alternate hypotheses: The mean number of years Americans work before retiring is less than 34. H0: μ = 34; Ha: μ < 34.