Jun 23, 2022 · 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; This is an example of a two-tailed hypothesis test because the alternative hypothesis contains the not equal “≠” sign. The engineer believes that ... ... This is a one-sided alternative hypothesis. Example 10.8: Hypotheses about comparing the relationship between Two Measurement Variables in Two Samples Section Research Question : Is there a linear relationship between the amount of the bill (\$) at a restaurant and the tip (\$) that was left. ... The null hypothesis is that the difference in means is zero. The two-sided alternative is that the difference in means is not zero. There are two one-sided alternatives that one could opt to test instead: that the male score is higher than the female score (diff > 0) or that the female score is higher than the male score (diff < 0). ... The alternative hypothesis can be one-sided, stating that the mean of one of the groups is higher or lower than the mean of the other group. If there is no information to justify a one-sided alternative hypothesis, a two-sided alternative hypothesis, which states that the two means are significantly different, could be formulated. ... Nov 4, 2018 · Then subtract it from 1. So, if you’re using a significance level of 0.05, double that to 0.10 and then subtract from 1 (1 – 0.10 = 0.90). 90% is the confidence level you want to use for a two-sided test. After obtaining the two-sided CI, use one of the endpoints depending on the direction of your hypothesis (i.e., upper or lower bound). ... Mar 12, 2024 · One-sided and two-sided tests in R. Many tests in R have the argument alternative, which allows you to choose the alternative hypothesis to be two.sided, greater, or less. If you don’t specify this argument, it defaults to two.sided. So it turns out, in the exercise above, you did the right thing with: ... Nov 27, 2019 · In this post, we will discuss how to do hypothesis testing for a 2-tailed test. I have discussed in detail with examples about hypothesis testing and how to validate it using the Null(H0) and Alternate(H1) hypothesis in my previous post. So, in this post, I won’t be going into the what and how of hypothesis testing. ... The 2 sided hypothesis test is used to examine both sides of the data. In other words, one must use this test to test both areas under the left and right tails of the normal distribution. Hence, the p-value must be multiplied by 2 in order to account for both tail areas. This type of test is usually used to determine whether a claim is true or ... ... May 13, 2024 · 2. Two-tailed test H 1: A two-tailed alternative hypothesis is concerned with both regions of rejection of the sampling distribution. 3. Non-directional test H 1: A non-directional alternative hypothesis is not concerned with either region of rejection; rather, it is only concerned that null hypothesis is not true. 4. ... The probability is doubled for the two-sided test, since the two-sided alternative hypothesis considers the possibility of observing extreme values on either tail of the normal distribution. Example In the test score example above, where the sample mean equals 73 and the population standard deviation is equal to 10, the test statistic is ... ... ">

Statology

Two-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:

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

In a two-tailed test , the alternative hypothesis always contains the not equal ( ≠ ) sign.

This indicates that we’re testing whether or not some effect exists, regardless of whether it’s a positive or negative effect.

Check out the following example problems to gain a better understanding of two-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

This is an example of a two-tailed hypothesis test because the alternative hypothesis contains the not equal “≠” sign. The engineer believes that the new method will influence widget weight, but doesn’t specify whether it will cause average weight to increase or decrease.

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
  • two-tailed p-value: 0.776

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 different 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 causes this species of plants to grow by an average amount different 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

This is an example of a two-tailed hypothesis test because the alternative hypothesis contains the not equal “≠” sign. The botanist believes that the new fertilizer will influence plant growth, but doesn’t specify whether it will cause average growth to increase or decrease.

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
  • two-tailed p-value: 0.0478

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 growth that is different than 10 inches.

Example 3: Studying Method

A professor believes that a certain studying technique will influence the mean score that her students receive on a certain exam, but she’s unsure if it will increase or decrease the mean score, which is currently 82.

To test this, she lets each student use the studying technique for one month leading up to the exam and then administers the same exam to each of the students.

She then performs a hypothesis test using the following hypotheses:

  • H 0 : μ = 82
  • H A : μ ≠ 82

This is an example of a two-tailed hypothesis test because the alternative hypothesis contains the not equal “≠” sign. The professor believes that the studying technique will influence the mean exam score, but doesn’t specify whether it will cause the mean score to increase or decrease.

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
  • two-tailed p-value: 0.0012

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

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

Additional Resources

The following tutorials provide additional information about hypothesis testing:

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

Featured Posts

two sided alternative hypothesis example

Hey there. My name is Zach Bobbitt. I have a Masters of Science degree in Applied Statistics and I’ve worked on machine learning algorithms for professional businesses in both healthcare and retail. I’m passionate about statistics, machine learning, and data visualization and I created Statology to be a resource for both students and teachers alike.  My goal with this site is to help you learn statistics through using simple terms, plenty of real-world examples, and helpful illustrations.

One Reply to “Two-Tailed Hypothesis Tests: 3 Example Problems”

i owe u my first born child

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Join the Statology Community

Sign up to receive Statology's exclusive study resource: 100 practice problems with step-by-step solutions. Plus, get our latest insights, tutorials, and data analysis tips straight to your inbox!

By subscribing you accept Statology's Privacy Policy.

User Preferences

Content preview.

Arcu felis bibendum ut tristique et egestas quis:

  • Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
  • Duis aute irure dolor in reprehenderit in voluptate
  • Excepteur sint occaecat cupidatat non proident

Keyboard Shortcuts

10.1 - setting the hypotheses: examples.

A significance test examines whether the null hypothesis provides a plausible explanation of the data. The null hypothesis itself does not involve the data. It is a statement about a parameter (a numerical characteristic of the population). These population values might be proportions or means or differences between means or proportions or correlations or odds ratios or any other numerical summary of the population. The alternative hypothesis is typically the research hypothesis of interest. Here are some examples.

Example 10.2: Hypotheses with One Sample of One Categorical Variable Section  

About 10% of the human population is left-handed. Suppose a researcher at Penn State speculates that students in the College of Arts and Architecture are more likely to be left-handed than people found in the general population. We only have one sample since we will be comparing a population proportion based on a sample value to a known population value.

  • Research Question : Are artists more likely to be left-handed than people found in the general population?
  • Response Variable : Classification of the student as either right-handed or left-handed

State Null and Alternative Hypotheses

  • Null Hypothesis : Students in the College of Arts and Architecture are no more likely to be left-handed than people in the general population (population percent of left-handed students in the College of Art and Architecture = 10% or p = .10).
  • Alternative Hypothesis : Students in the College of Arts and Architecture are more likely to be left-handed than people in the general population (population percent of left-handed students in the College of Arts and Architecture > 10% or p > .10). This is a one-sided alternative hypothesis.

Example 10.3: Hypotheses with One Sample of One Measurement Variable Section  

 two Diphenhydramine pills

A generic brand of the anti-histamine Diphenhydramine markets a capsule with a 50 milligram dose. The manufacturer is worried that the machine that fills the capsules has come out of calibration and is no longer creating capsules with the appropriate dosage.

  • Research Question : Does the data suggest that the population mean dosage of this brand is different than 50 mg?
  • Response Variable : dosage of the active ingredient found by a chemical assay.
  • Null Hypothesis : On the average, the dosage sold under this brand is 50 mg (population mean dosage = 50 mg).
  • Alternative Hypothesis : On the average, the dosage sold under this brand is not 50 mg (population mean dosage ≠ 50 mg). This is a two-sided alternative hypothesis.

Example 10.4: Hypotheses with Two Samples of One Categorical Variable Section  

vegetarian airline meal

Many people are starting to prefer vegetarian meals on a regular basis. Specifically, a researcher believes that females are more likely than males to eat vegetarian meals on a regular basis.

  • Research Question : Does the data suggest that females are more likely than males to eat vegetarian meals on a regular basis?
  • Response Variable : Classification of whether or not a person eats vegetarian meals on a regular basis
  • Explanatory (Grouping) Variable: Sex
  • Null Hypothesis : There is no sex effect regarding those who eat vegetarian meals on a regular basis (population percent of females who eat vegetarian meals on a regular basis = population percent of males who eat vegetarian meals on a regular basis or p females = p males ).
  • Alternative Hypothesis : Females are more likely than males to eat vegetarian meals on a regular basis (population percent of females who eat vegetarian meals on a regular basis > population percent of males who eat vegetarian meals on a regular basis or p females > p males ). This is a one-sided alternative hypothesis.

Example 10.5: Hypotheses with Two Samples of One Measurement Variable Section  

low carb meal

Obesity is a major health problem today. Research is starting to show that people may be able to lose more weight on a low carbohydrate diet than on a low fat diet.

  • Research Question : Does the data suggest that, on the average, people are able to lose more weight on a low carbohydrate diet than on a low fat diet?
  • Response Variable : Weight loss (pounds)
  • Explanatory (Grouping) Variable : Type of diet
  • Null Hypothesis : There is no difference in the mean amount of weight loss when comparing a low carbohydrate diet with a low fat diet (population mean weight loss on a low carbohydrate diet = population mean weight loss on a low fat diet).
  • Alternative Hypothesis : The mean weight loss should be greater for those on a low carbohydrate diet when compared with those on a low fat diet (population mean weight loss on a low carbohydrate diet > population mean weight loss on a low fat diet). This is a one-sided alternative hypothesis.

Example 10.6: Hypotheses about the relationship between Two Categorical Variables Section  

  • Research Question : Do the odds of having a stroke increase if you inhale second hand smoke ? A case-control study of non-smoking stroke patients and controls of the same age and occupation are asked if someone in their household smokes.
  • Variables : There are two different categorical variables (Stroke patient vs control and whether the subject lives in the same household as a smoker). Living with a smoker (or not) is the natural explanatory variable and having a stroke (or not) is the natural response variable in this situation.
  • Null Hypothesis : There is no relationship between whether or not a person has a stroke and whether or not a person lives with a smoker (odds ratio between stroke and second-hand smoke situation is = 1).
  • Alternative Hypothesis : There is a relationship between whether or not a person has a stroke and whether or not a person lives with a smoker (odds ratio between stroke and second-hand smoke situation is > 1). This is a one-tailed alternative.

This research question might also be addressed like example 11.4 by making the hypotheses about comparing the proportion of stroke patients that live with smokers to the proportion of controls that live with smokers.

Example 10.7: Hypotheses about the relationship between Two Measurement Variables Section  

  • Research Question : A financial analyst believes there might be a positive association between the change in a stock's price and the amount of the stock purchased by non-management employees the previous day (stock trading by management being under "insider-trading" regulatory restrictions).
  • Variables : Daily price change information (the response variable) and previous day stock purchases by non-management employees (explanatory variable). These are two different measurement variables.
  • Null Hypothesis : The correlation between the daily stock price change (\$) and the daily stock purchases by non-management employees (\$) = 0.
  • Alternative Hypothesis : The correlation between the daily stock price change (\$) and the daily stock purchases by non-management employees (\$) > 0. This is a one-sided alternative hypothesis.

Example 10.8: Hypotheses about comparing the relationship between Two Measurement Variables in Two Samples Section  

Calculation of a person's approximate tip for their meal

  • Research Question : Is there a linear relationship between the amount of the bill (\$) at a restaurant and the tip (\$) that was left. Is the strength of this association different for family restaurants than for fine dining restaurants?
  • Variables : There are two different measurement variables. The size of the tip would depend on the size of the bill so the amount of the bill would be the explanatory variable and the size of the tip would be the response variable.
  • Null Hypothesis : The correlation between the amount of the bill (\$) at a restaurant and the tip (\$) that was left is the same at family restaurants as it is at fine dining restaurants.
  • Alternative Hypothesis : The correlation between the amount of the bill (\$) at a restaurant and the tip (\$) that was left is the difference at family restaurants then it is at fine dining restaurants. This is a two-sided alternative hypothesis.
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Statistical Methods and Data Analytics

FAQ: What are the differences between one-tailed and two-tailed tests?

When you conduct a test of statistical significance, whether it is from a correlation, an ANOVA, a regression or some other kind of test, you are given a p-value somewhere in the output.  If your test statistic is symmetrically distributed, you can select one of three alternative hypotheses. Two of these correspond to one-tailed tests and one corresponds to a two-tailed test.  However, the p-value presented is (almost always) for a two-tailed test.  But how do you choose which test?  Is the p-value appropriate for your test? And, if it is not, how can you calculate the correct p-value for your test given the p-value in your output?  

What is a two-tailed test?

First let’s start with the meaning of a two-tailed test.  If you are using a significance level of 0.05, a two-tailed test allots half of your alpha to testing the statistical significance in one direction and half of your alpha to testing statistical significance in the other direction.  This means that .025 is in each tail of the distribution of your test statistic. When using a two-tailed test, regardless of the direction of the relationship you hypothesize, you are testing for the possibility of the relationship in both directions.  For example, we may wish to compare the mean of a sample to a given value x using a t-test.  Our null hypothesis is that the mean is equal to x . 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 a one-tailed test?

Next, let’s discuss the meaning of a one-tailed test.  If you are using a significance level of .05, a one-tailed test allots all of your alpha to testing the statistical significance in the one direction of interest.  This means that .05 is in one tail of the distribution of your test statistic. When using a one-tailed test, you are testing for the possibility of the relationship in one direction and completely disregarding the possibility of a relationship in the other direction.  Let’s return to our example comparing the mean of a sample to a given value x using a t-test.  Our null hypothesis is that the mean is equal to x . A one-tailed test will test either if the mean is significantly greater than x or if the mean is significantly less than x , but not both. Then, depending on the chosen tail, the mean is significantly greater than or less than x if the test statistic is in the top 5% of its probability distribution or bottom 5% of its probability distribution, resulting in a p-value less than 0.05.  The one-tailed test provides more power to detect an effect in one direction by not testing the effect in the other direction. A discussion of when this is an appropriate option follows.   

When is a one-tailed test appropriate?

Because the one-tailed test provides more power to detect an effect, you may be tempted to use a one-tailed test whenever you have a hypothesis about the direction of an effect. Before doing so, consider the consequences of missing an effect in the other direction.  Imagine you have developed a new drug that you believe is an improvement over an existing drug.  You wish to maximize your ability to detect the improvement, so you opt for a one-tailed test. In doing so, you fail to test for the possibility that the new drug is less effective than the existing drug.  The consequences in this example are extreme, but they illustrate a danger of inappropriate use of a one-tailed test.

So when is a one-tailed test appropriate? If you consider the consequences of missing an effect in the untested direction and conclude that they are negligible and in no way irresponsible or unethical, then you can proceed with a one-tailed test. For example, imagine again that you have developed a new drug. It is cheaper than the existing drug and, you believe, no less effective.  In testing this drug, you are only interested in testing if it less effective than the existing drug.  You do not care if it is significantly more effective.  You only wish to show that it is not less effective. In this scenario, a one-tailed test would be appropriate. 

When is a one-tailed test NOT appropriate?

Choosing a one-tailed test for the sole purpose of attaining significance is not appropriate.  Choosing a one-tailed test after running a two-tailed test that failed to reject the null hypothesis is not appropriate, no matter how "close" to significant the two-tailed test was.  Using statistical tests inappropriately can lead to invalid results that are not replicable and highly questionable–a steep price to pay for a significance star in your results table!   

Deriving a one-tailed test from two-tailed output

The default among statistical packages performing tests is to report two-tailed p-values.  Because the most commonly used test statistic distributions (standard normal, Student’s t) are symmetric about zero, most one-tailed p-values can be derived from the two-tailed p-values.   

Below, we have the output from a two-sample t-test in Stata.  The test is comparing the mean male score to the mean female score.  The null hypothesis is that the difference in means is zero.  The two-sided alternative is that the difference in means is not zero.  There are two one-sided alternatives that one could opt to test instead: that the male score is higher than the female score (diff  > 0) or that the female score is higher than the male score (diff < 0).  In this instance, Stata presents results for all three alternatives.  Under the headings Ha: diff < 0 and Ha: diff > 0 are the results for the one-tailed tests. In the middle, under the heading Ha: diff != 0 (which means that the difference is not equal to 0), are the results for the two-tailed test. 

Two-sample t test with equal variances ------------------------------------------------------------------------------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------------- male | 91 50.12088 1.080274 10.30516 47.97473 52.26703 female | 109 54.99083 .7790686 8.133715 53.44658 56.53507 ---------+-------------------------------------------------------------------- combined | 200 52.775 .6702372 9.478586 51.45332 54.09668 ---------+-------------------------------------------------------------------- diff | -4.869947 1.304191 -7.441835 -2.298059 ------------------------------------------------------------------------------ Degrees of freedom: 198 Ho: mean(male) - mean(female) = diff = 0 Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 t = -3.7341 t = -3.7341 t = -3.7341 P < t = 0.0001 P > |t| = 0.0002 P > t = 0.9999

Note that the test statistic, -3.7341, is the same for all of these tests.  The two-tailed p-value is P > |t|. This can be rewritten as P(>3.7341) + P(< -3.7341).  Because the t-distribution is symmetric about zero, these two probabilities are equal: P > |t| = 2 *  P(< -3.7341).  Thus, we can see that the two-tailed p-value is twice the one-tailed p-value for the alternative hypothesis that (diff < 0).  The other one-tailed alternative hypothesis has a p-value of P(>-3.7341) = 1-(P<-3.7341) = 1-0.0001 = 0.9999.   So, depending on the direction of the one-tailed hypothesis, its p-value is either 0.5*(two-tailed p-value) or 1-0.5*(two-tailed p-value) if the test statistic symmetrically distributed about zero. 

In this example, the two-tailed p-value suggests rejecting the null hypothesis of no difference. Had we opted for the one-tailed test of (diff > 0), we would fail to reject the null because of our choice of tails. 

The output below is from a regression analysis in Stata.  Unlike the example above, only the two-sided p-values are presented in this output.

Source | SS df MS Number of obs = 200 -------------+------------------------------ F( 2, 197) = 46.58 Model | 7363.62077 2 3681.81039 Prob > F = 0.0000 Residual | 15572.5742 197 79.0486001 R-squared = 0.3210 -------------+------------------------------ Adj R-squared = 0.3142 Total | 22936.195 199 115.257261 Root MSE = 8.8909 ------------------------------------------------------------------------------ socst | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- science | .2191144 .0820323 2.67 0.008 .0573403 .3808885 math | .4778911 .0866945 5.51 0.000 .3069228 .6488594 _cons | 15.88534 3.850786 4.13 0.000 8.291287 23.47939 ------------------------------------------------------------------------------

For each regression coefficient, the tested null hypothesis is that the coefficient is equal to zero.  Thus, the one-tailed alternatives are that the coefficient is greater than zero and that the coefficient is less than zero. To get the p-value for the one-tailed test of the variable science having a coefficient greater than zero, you would divide the .008 by 2, yielding .004 because the effect is going in the predicted direction. This is P(>2.67). If you had made your prediction in the other direction (the opposite direction of the model effect), the p-value would have been 1 – .004 = .996.  This is P(<2.67). For all three p-values, the test statistic is 2.67. 

Your Name (required)

Your Email (must be a valid email for us to receive the report!)

Comment/Error Report (required)

How to cite this page

  • © 2024 UC REGENTS
  • Instructor View

One-sided vs. two-sided tests, and data snooping

Last updated on 2024-03-12 | Edit this page

  • Why is it important to define the hypothesis before running the test?
  • What is the difference between one-sided and two-sided tests?
  • Explain the difference between one-sided and two-sided tests
  • Raise awareness of data snooping / HARKing
  • Introduce further arguments in the binom.test function

A one-sided test

Binomial null distribution with one-sided significance indicated.

What you’ve seen in the last episode was a one-sided test , which means we looked at only at one side of the distribution. In this example, we observed 9 out of 100 persons with disease, then we asked: What is the probability under the null, to observe at least 9 persons with that disease. And we rejected all the outcomes where this probability was lower than 5%. The alternative hypothesis that we then take on is that the prevalence is larger than 4%. But we could just as well have looked in the other direction and have asked: What is the probability of seeing at most the observed number of diseased under the null, and then in case of rejecting the null, we’d have accept the alternative hypothesis that the prevalence is below 4%.

Let me remind you how we initially phrased the research question and the alternative hypothesis: We wanted to test whether the prevalence is different from 4%. Well, different can be smaller or larger. So, to be fair, this is what we should actually do:

Binomial null distribution with two-sided significance indicated.

But what exactly was wrong with a one-sided test? An observation of 9 is clearly higher than the expected 4, so no need to test on the other side, right? Unfortunately: no.

Excursion: Data snooping / HARKing

What we did is called HARKing , which stands for “hypothesis after results known”, or, also data snooping. The problem is, we decided on the direction to look at after having seen at the data, and this messes with the significance level \(\alpha\) . The 5% is just not true anymore, because we spent all the 5% on one side, and we cheated by looking into the data to decide which side we want to look at. But if the null were true, then there would be a (roughly) 50:50 chance that the test group gives you an outcome that is higher or lower than the expected value. So we’d have to double the alpha, and in reality it would be around 10%. This means, assuming the null was true, we actually had an about 10% chance of falsely rejecting it.

Above it says that there is a ~50% chance of the observation being below 4, and that a one-sided test after looking into the data had a significance level of ~0.1. The numbers are approximate, because a binomial distribution has discrete numbers. This means that

  • there’s not actually an outcome where the probability of seeing an outcome as high as this or higher is exactly 5%.
  • it’s actually more likely to see an outcome below 4 ( \(p=0.43\) ), than seeing an outcome above ( \(p=0.37\) ). The numbers don’t add up to 1, because there is also the option of observing exactly 4 ( \(p=0.2\) ).

One-sided and two-sided tests in R

Many tests in R have the argument alternative , which allows you to choose the alternative hypothesis to be two.sided , greater , or less . If you don’t specify this argument, it defaults to two.sided . So it turns out, in the exercise above, you did the right thing with:

A one-sided test would be:

It’s a little bit confusing that both tests give a similar p-value here, which is again due to the distribution’s discreteness. Using different numbers will show how the p-value for the same observation is lower if you choose a one-sided test:

Challenge: one-sided test

In which of these cases would a one-sided test be OK?

  • The trial was conducted to find out whether the disease prevalence is increased due to the precondition. In case of a significant outcome, persons with the preconditions would be monitored more carefully by their doctors.
  • You want to find out whether new-born children already resemble their father. Study participants look at a photo of a baby, and two photos of adult men, one of which is the father. They have to guess which of them. The hypothesis is that new-borns resemble their fathers and the father is thus guessed >50% of the cases. There is no reason to believe that children resemble their fathers less than they resemble randomly chosen men.
  • When looking at the data (only 1 out of 100), it becomes clear that the prevalence is certainly not increased by the precondition. It might even decrease the risk. We thus test for that.

Show me the solution

In the first and second scenario, one-sided tests could be used. There are different opinions to how sparsely they should be used. For example, Whitlock and Schluter gave the second scenario as a potential use-case. They believe that a one-sided test should only be used if “the null hypothesis are inconceivable for any reason other than chance”. They would likely argue against using a one-sided test in the first scenario, because what if the disease prevalence is decreased due to the precondition? Wouldn’t we find this interesting as well?

logo

  • I'm a Teacher
  • I'm a Student
  • High School/AP Statistics Resources
  • College Statistics Resources
  • R Help Pages
  • Advanced High School Statistics
  • CK-12 Probability and Statistics
  • OpenIntro Statistics
  • Introductory Statistics with Randomization and Simulation
  • Introductory Statistics
  • Introduction to Statistics
  • Using R for Introductory Statistics
  • Introduction to Probability and Statistics Using R

Hypothesis Testing: 2 Sided Test (aka 2 Tailed Test)

Introduction

The 2 sided hypothesis test is used to examine both sides of the data. In other words, one must use this test to test both areas under the left and right tails of the normal distribution. Hence, the p-value must be multiplied by 2 in order to account for both tail areas. 

This type of test is usually used to determine whether a claim is true or false. It is not used for "greater than" or "less than" scenarios; rather, a two-sided hypothesis test is used when your alternative hypothesis employs the "  \(\neq\)  " symbol. 

The manager of the FAO Schwarz factory states that 0.08 of its produced toys are defective. In order to test this, an employee of a FAO Schwarz store takes a random sample of 739 toys delivered from the factory and inspects them. He finds that 52 of them are defective. At a significance level of 0.05, is there evidence to support the claim that the manager of the FAO Schwarz factory is lying?

Step 1 : Name Test: 2 Sided Hypothesis Test

Step 2 : Define Test: Since this is a 2 sided test:

H o  = p o  = 0.08

H A  = p o   ≠ 0.08

Step 3 : Check Conditions:

1. Data from random sample

2. N  ≥ 10n

3. np o   ≥ 10 and nq o   ≥ 10

Step 4 : Calculate test statistic and p-value

\(z = pˆ - p_o \over \sqrt{p_oq_o \over n}\)    Note: pˆ is calculated by doing 52/739

p-value: For a 2 sided test , the p-value  is equal to 2  times the p-value  for the lower-tailed p-value,  if the value  of the test  statistic from your sample is negative. The p-value  is equal to 2  times the p-value  for the upper-tailed p-value   if the value  of the test  statistic from your sample is positive.

S o in this example one must calculate the z-score for the lower end (H A : p o  < 0.08) and multiply its p-value by 2.

Step 5 : Conclusion:

Once everything is solved, you will discover that the p-value is 0.16 So the conclusion is as follows:

I calculated a p-value of 0.16 which is greater than the significance level of 0.05. Therefore, we fail to reject the null hypothesis and the data fails to support the claim that the manager is lying. 

  • Number System and Arithmetic
  • Probability
  • Mensuration
  • Trigonometry
  • Mathematics

Alternative Hypothesis: Definition, Types and Examples

In statistical hypothesis testing, the alternative hypothesis is an important proposition in the hypothesis test. The goal of the hypothesis test is to demonstrate that in the given condition, there is sufficient evidence supporting the credibility of the alternative hypothesis instead of the default assumption made by the null hypothesis.

Null-Hypothesis-and-Alternative-Hypothesis

Both hypotheses include statements with the same purpose of providing the researcher with a basic guideline. The researcher uses the statement from each hypothesis to guide their research. In statistics, alternative hypothesis is often denoted as H a or H 1 .

Table of Content

What is a Hypothesis?

Alternative hypothesis, types of alternative hypothesis, difference between null and alternative hypothesis, formulating an alternative hypothesis, example of alternative hypothesis, application of alternative hypothesis.

"A hypothesis is a statement of a relationship between two or more variables." It is a working statement or theory that is based on insufficient evidence.

While experimenting, researchers often make a claim, that they can test. These claims are often based on the relationship between two or more variables. "What causes what?" and "Up to what extent?" are a few of the questions that a hypothesis focuses on answering. The hypothesis can be true or false, based on complete evidence.

While there are different hypotheses, we discuss only null and alternate hypotheses. The null hypothesis, denoted H o , is the default position where variables do not have a relation with each other. That means the null hypothesis is assumed true until evidence indicates otherwise. The alternative hypothesis, denoted H 1 , on the other hand, opposes the null hypothesis. It assumes a relation between the variables and serves as evidence to reject the null hypothesis.

Example of Hypothesis:

Mean age of all college students is 20.4 years. (simple hypothesis).

An Alternative Hypothesis is a claim or a complement to the null hypothesis. If the null hypothesis predicts a statement to be true, the Alternative Hypothesis predicts it to be false. Let's say the null hypothesis states there is no difference between height and shoe size then the alternative hypothesis will oppose the claim by stating that there is a relation.

We see that the null hypothesis assumes no relationship between the variables whereas an alternative hypothesis proposes a significant relation between variables. An alternative theory is the one tested by the researcher and if the researcher gathers enough data to support it, then the alternative hypothesis replaces the null hypothesis.

Null and alternative hypotheses are exhaustive, meaning that together they cover every possible outcome. They are also mutually exclusive, meaning that only one can be true at a time.

There are a few types of alternative hypothesis that we will see:

1. One-tailed test H 1 : A one-tailed alternative hypothesis focuses on only one region of rejection of the sampling distribution. The region of rejection can be upper or lower.

  • Upper-tailed test H 1 : Population characteristic > Hypothesized value
  • Lower-tailed test H 1 : Population characteristic < Hypothesized value

2. Two-tailed test H 1 : A two-tailed alternative hypothesis is concerned with both regions of rejection of the sampling distribution.

3. Non-directional test H 1 : A non-directional alternative hypothesis is not concerned with either region of rejection; rather, it is only concerned that null hypothesis is not true.

4. Point test H 1 : Point alternative hypotheses occur when the hypothesis test is framed so that the population distribution under the alternative hypothesis is a fully defined distribution, with no unknown parameters; such hypotheses are usually of no practical interest but are fundamental to theoretical considerations of statistical inference and are the basis of the Neyman–Pearson lemma.

the differences between Null Hypothesis and Alternative Hypothesis is explained in the table below:

Formulating an alternative hypothesis means identifying the relationships, effects or condition being studied. Based on the data we conclude that there is a different inference from the null-hypothesis being considered.

  • Understand the null hypothesis.
  • Consider the alternate hypothesis
  • Choose the type of alternate hypothesis (one-tailed or two-tailed)

Alternative hypothesis must be true when the null hypothesis is false. When trying to identify the information need for alternate hypothesis statement, look for the following phrases:

  • "Is it reasonable to conclude..."
  • "Is there enough evidence to substantiate..."
  • "Does the evidence suggest..."
  • "Has there been a significant..."

When alternative hypotheses in mathematical terms, they always include an inequality ( usually ≠, but sometimes < or >) . When writing the alternate hypothesis, make sure it never includes an "=" symbol.

To help you write your hypotheses, you can use the template sentences below.

Does independent variable affect dependent variable?

  • Null Hypothesis (H 0 ): Independent variable does not affect dependent variable.
  • Alternative Hypothesis (H a ): Independent variable affects dependent variable.

Various examples of Alternative Hypothesis includes:

Two-Tailed Example

  • Research Question : Do home games affect a team's performance?
  • Null-Hypothesis: Home games do not affect a team's performance.
  • Alternative Hypothesis: Home games have an effect on team's performance.
  • Research Question: Does sleeping less lead to depression?
  • Null-Hypothesis: Sleeping less does not have an effect on depression.
  • Alternative Hypothesis : Sleeping less has an effect on depression.

One-Tailed Example

  • Research Question: Are candidates with experience likely to get a job?
  • Null-Hypothesis: Experience does not matter in getting a job.
  • Alternative Hypothesis: Candidates with work experience are more likely to receive an interview.
  • Alternative Hypothesis : Teams with home advantage are more likely to win a match.

Some applications of Alternative Hypothesis includes:

  • Rejecting Null-Hypothesis : A researcher performs additional research to find flaws in the null hypothesis. Following the research, which uses the alternative hypothesis as a guide, they may decide whether they have enough evidence to reject the null hypothesis.
  • Guideline for Research : An alternative and null hypothesis include statements with the same purpose of providing the researcher with a basic guideline. The researcher uses the statement from each hypothesis to guide their research.
  • New Theories : Alternative hypotheses can provide the opportunity to discover new theories that a researcher can use to disprove an existing theory that may not have been backed up by evidence.

We defined the relationship that exist between null-hypothesis and alternative hypothesis. While the null hypothesis is always a default assumption about our test data, the alternative hypothesis puts in all the effort to make sure the null hypothesis is disproved.

Null-hypothesis always explores new relationships between the independent variables to find potential outcomes from our test data. We should note that for every null hypothesis, one or more alternate hypotheses can be developed.

Also Check:

Mathematics Maths Formulas Branches of Mathematics

FAQs on Alternative Hypothesis

What is hypothesis.

A hypothesis is a statement of a relationship between two or more variables." It is a working statement or theory that is based on insufficient evidence.

What is an Alternative Hypothesis?

Alternative hypothesis, denoted by H 1 , opposes the null-hypothesis. It assumes a relation between the variables and serves as an evidence to reject the null-hypothesis.

What is the Difference between Null-Hypothesis and Alternative Hypothesis?

Null hypothesis is the default claim that assumes no relationship between variables while alternative hypothesis is the opposite claim which considers statistical significance between the variables.

What is Alternative and Experimental Hypothesis?

Null hypothesis (H 0 ) states there is no effect or difference, while the alternative hypothesis (H 1 or H a ) asserts the presence of an effect, difference, or relationship between variables. In hypothesis testing, we seek evidence to either reject the null hypothesis in favor of the alternative hypothesis or fail to do so.

Similar Reads

  • Alternative Hypothesis: Definition, Types and Examples In statistical hypothesis testing, the alternative hypothesis is an important proposition in the hypothesis test. The goal of the hypothesis test is to demonstrate that in the given condition, there is sufficient evidence supporting the credibility of the alternative hypothesis instead of the defaul 7 min read
  • Hypothesis | Definition, Meaning and Examples Hypothesis is a hypothesis is fundamental concept in the world of research and statistics. It is a testable statement that explains what is happening or observed. It proposes the relation between the various participating variables. Hypothesis is also called Theory, Thesis, Guess, Assumption, or Sug 12 min read
  • Natural Resources - Definition, Types, and Examples Natural resources refer to those resources which exist on the planet, independent of the activities and actions of humans. Some common examples of natural resources include sunlight, water, soil, stone, plants, fossil fuels, etc. Let's learn about Natural Resources in detail, including its types, us 6 min read
  • What Are Resources? Definition, Types, Preservation, Examples Assets are whatever has utility and enhances your life. Air, water, food, plants, creatures, minerals, metals, and all the other things that exist in nature and has utility to humanity is an 'Asset'. The worth of each such asset relies upon its utility and different variables. For instance, metals a 7 min read
  • What is a Demand? Definition, Types, Examples, FAQs In financial matters, 'demand' represents a customer's capacity and want to buy a decent or administration. It is the chief power that drives the financial development of a country. Without it, other monetary exercises will become unimportant. Keeping different variables consistent, an expansion in 6 min read
  • Road Transport - Definition, Types, Examples Road transport: Road transport is transporting goods, and people from one place to another place on the road. The road acts as a bridge to reach from one end to another end. Road transport can be grouped into two kinds- goods and people's transportation. Many countries have the requirement of safety 5 min read
  • Real Functions: Definition, Properties and Examples Real Function is a function which deals with real numbers as input and output values. In other words, a real function is a special type of relation between two sets of real numbers which follow some important properties. Values from one set called domain map to another set called range. A function i 7 min read
  • What is a Storage Device? Definition, Types, Examples The storage unit is a part of the computer system which is employed to store the information and instructions to be processed. A storage device is an integral part of the computer hardware which stores information/data to process the result of any computational work. Without a storage device, a comp 11 min read
  • Types of Derivatives in Financial Market What are Derivatives?Derivatives are financial contracts whose value derives from the performance of an underlying asset, index, rate, or another financial instrument. They are used for various purposes, including hedging against risk, speculating on price movements, and facilitating arbitrage oppor 9 min read
  • What are Descriptive Analytics? Working and Examples Descriptive analytics helps to identify important patterns and trends in large datasets. In comparison to all other methods of data analysis, descriptive is the most used one. The main task of descriptive analytics is to create metrics and key performance indicators for use in dashboards and busines 10 min read
  • How Many Types Of Environment Are There? Types of environments include man-made and geographical environments. Both categories have a significant meaning. Environment is a term that means a surrounding area where all living and non-living creatures co-exist. The word environment is derived from the French word "environ" which means each an 6 min read
  • Set Theory - Definition, Types, Operations Set Theory is a branch of logical mathematics that studies the collection of objects and operations based on it. A set is simply a collection of objects or a group of objects. For example, a group of players in a football team is a set and the players in the team are its objects. The words collectio 10 min read
  • Types of Databases in System Design Databases are among the most important components usually implemented in a system since they provide for the storage and the management of data. Selecting a database has a pronounced effect on the system’s performance, scalability, consistency, and availability. Choosing the proper type of database 7 min read
  • Commodity: Meaning, Types and Price Determination A commodity is an external object or item fulfilling various human needs, subsequently exchanged for other goods or services. These are typically physical products intended for consumption or use in production, needing more differentiation among themselves. Commodities encompass raw materials, basic 10 min read
  • Types of Algebraic Expressions An algebraic expression is an expression composed of various components, such as variables, constants, coefficients, and arithmetic operations. These components form various parts of the algebraic expressions. For example: 3x + 52a2 − 4b + 75(x + 2) − 3Note: The highest power of the variable is know 2 min read
  • TypeScript Conditional Types TypeScript's Conditional Types enable types to be defined based on a condition. Using the syntax T extends U ? X: Y, the type evaluates to X if T extends U; otherwise, it evaluates to Y. This feature allows for more flexible and dynamic type definitions. Syntaxtype ConditionalType<T> = T exten 6 min read
  • Digital Products : Meaning, Characteristics and Examples What are Digital Products?Digital Products encompass intangible goods presented in a digital format, spanning a diverse range such as digital art, software, online courses, ebooks, music, and virtual items in video games. These products are commonly delivered to customers through downloads or emails 11 min read
  • Real Life Examples and Applications of Power Set The concept of power sets is a fundamental topic in set theory with a wide range of real-life applications. A power set is essentially a set of all possible subsets of a given set, including the empty set and the set itself. This means if you have a set with three elements, its power set will contai 6 min read
  • Types of Change and John Kotter's Eight-Step Model Organisational change is defined as a dynamic process that involves the deliberate transformation of an entity's structures, processes, culture, or strategies to adapt to shifting circumstances, remain competitive, and drive growth. In an ever-evolving business landscape, organisations frequently en 7 min read
  • School Learning
  • Math-Statistics

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

IMAGES

  1. 15 Hypothesis Examples (2024)

    two sided alternative hypothesis example

  2. Understanding the Types of P-Value Tests: One-Sided vs. Two-Sided Hypothesis Testing

    two sided alternative hypothesis example

  3. Null Hypothesis and Alternative Hypothesis

    two sided alternative hypothesis example

  4. Hypothesis Testing: One Sided vs Two Sided Alternative

    two sided alternative hypothesis example

  5. Hypothesis Testing: One- and Two-Sided Alternatives

    two sided alternative hypothesis example

  6. Research Hypothesis Generator

    two sided alternative hypothesis example

COMMENTS

  1. Two-Tailed Hypothesis Tests: 3 Example Problems - Statology

    Jun 23, 2022 · 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; This is an example of a two-tailed hypothesis test because the alternative hypothesis contains the not equal “≠” sign. The engineer believes that ...

  2. 10.1 - Setting the Hypotheses: Examples | STAT 100

    This is a one-sided alternative hypothesis. Example 10.8: Hypotheses about comparing the relationship between Two Measurement Variables in Two Samples Section Research Question : Is there a linear relationship between the amount of the bill (\$) at a restaurant and the tip (\$) that was left.

  3. FAQ: What are the differences between one-tailed and two ...

    The null hypothesis is that the difference in means is zero. The two-sided alternative is that the difference in means is not zero. There are two one-sided alternatives that one could opt to test instead: that the male score is higher than the female score (diff > 0) or that the female score is higher than the male score (diff < 0).

  4. Two-Sample Problems - University of West Georgia

    The alternative hypothesis can be one-sided, stating that the mean of one of the groups is higher or lower than the mean of the other group. If there is no information to justify a one-sided alternative hypothesis, a two-sided alternative hypothesis, which states that the two means are significantly different, could be formulated.

  5. One-Tailed and Two-Tailed Hypothesis Tests Explained

    Nov 4, 2018 · Then subtract it from 1. So, if you’re using a significance level of 0.05, double that to 0.10 and then subtract from 1 (1 – 0.10 = 0.90). 90% is the confidence level you want to use for a two-sided test. After obtaining the two-sided CI, use one of the endpoints depending on the direction of your hypothesis (i.e., upper or lower bound).

  6. Hypothesis testing in biology: One-sided vs. two-sided tests ...

    Mar 12, 2024 · One-sided and two-sided tests in R. Many tests in R have the argument alternative, which allows you to choose the alternative hypothesis to be two.sided, greater, or less. If you don’t specify this argument, it defaults to two.sided. So it turns out, in the exercise above, you did the right thing with:

  7. Hypothesis Testing — 2-tailed test | by Tanwir Khan | Towards ...

    Nov 27, 2019 · In this post, we will discuss how to do hypothesis testing for a 2-tailed test. I have discussed in detail with examples about hypothesis testing and how to validate it using the Null(H0) and Alternate(H1) hypothesis in my previous post. So, in this post, I won’t be going into the what and how of hypothesis testing.

  8. Hypothesis Testing: 2 Sided Test (aka 2 Tailed Test) - STATS4STEM

    The 2 sided hypothesis test is used to examine both sides of the data. In other words, one must use this test to test both areas under the left and right tails of the normal distribution. Hence, the p-value must be multiplied by 2 in order to account for both tail areas. This type of test is usually used to determine whether a claim is true or ...

  9. Alternative Hypothesis: Definition, Types and Examples

    May 13, 2024 · 2. Two-tailed test H 1: A two-tailed alternative hypothesis is concerned with both regions of rejection of the sampling distribution. 3. Non-directional test H 1: A non-directional alternative hypothesis is not concerned with either region of rejection; rather, it is only concerned that null hypothesis is not true. 4.

  10. Tests of Significance - Yale University

    The probability is doubled for the two-sided test, since the two-sided alternative hypothesis considers the possibility of observing extreme values on either tail of the normal distribution. Example In the test score example above, where the sample mean equals 73 and the population standard deviation is equal to 10, the test statistic is ...