8.1: Introduction to Hypothesis Testing
- Page ID
- 58291
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)- Understand the purpose and process of hypothesis testing in statistics
- Learn to state null and alternative hypotheses clearly
- Identify and select an appropriate significance level (α)
- Choose the correct statistical test based on the hypothesis type
- Calculate the test statistic using sample data
- Make informed decisions to reject or fail to reject the null hypothesis
- Distinguish between left-tailed, right-tailed, and two-tailed tests
Hypothesis testing is a statistical method used to make decisions or draw conclusions about a population based on sample data. It involves making an initial assumption (called the null hypothesis), collecting data, and then determining whether the evidence supports rejecting that assumption in favor of an alternative hypothesis. This process helps researchers test claims or ideas using probability and data.
Key Definition for Hypothesis Testing
- A statistic is a characteristic or measure from a sample. A parameter is a characteristic or measure of a population. We use statistics to generalize about parameters, known as estimations. Every time we take a sample statistic, we would expect that estimate to be close to the parameter, but not necessarily exactly equal to the unknown population parameter. How close would depend on how large a sample we took, who was sampled, how they were sampled, and other factors. Hypothesis testing is a scientific method used to evaluate claims about population parameters.
- A statistical hypothesis is an educated conjecture about a population parameter. This conjecture may or may not be true. We will take sample data and infer from the sample if there is evidence to support our claim about the unknown population parameter.
- The null hypothesis (H0, pronounced “H-naught” or “H-zero”) is a statistical hypothesis that states that there is no difference between a parameter and a specific value, or that there is no difference between two parameters. The null hypothesis is assumed true until there is sufficient evidence otherwise.
- The alternative hypothesis (H1 or Ha, pronounced “H-one” or “H-ā”) is a statistical hypothesis that states that there is a difference between a parameter and a specific value, or that there is a difference between two parameters. H1 is always the complement of H0.
- The level of significance is also called the significance level. We use the Greek letter \(\alpha\), pronounced “alpha,” to represent the significance level. The level of significance is the probability that the null hypothesis is rejected when it is true. Note: like in the previous chapter, 1 – \(\alpha\) is the confidence level.
Initial Steps of Hypothesis Testing
When doing your research, you should set up your hypotheses and choose the significance level before analyzing the sample data.
When reading a word problem, your first step is to identify the parameter(s), for example, μ, you are testing, and which direction (left, right, or two-tailed) test you are being asked to perform. For this course, the homework problems will state the researcher’s claim; usually, this is the alternative hypothesis.
The null hypothesis is always set up as a parameter equal to some value (called the test value) or equal to another parameter. The null hypothesis is assumed true unless there is strong evidence from the sample to suggest otherwise. Similar to our judicial system, a person is innocent until the prosecutor shows enough evidence that they are not innocent.
For example, an investment company wants to build a new food cart. They know from experience that food carts are successful if they have, on average, more than 100 people a day walk by the location. They have a potential site to build on, but before they begin, they want to see if they have enough foot traffic. They observe how many people walk by the site every day over a month. The investors want to be very careful about setting up in a bad location where the food cart will fail, rather than miss the opportunity in a prime location. We have two hypotheses. For an average of more than 100 people, we would write this in symbols as μ > 100. This claim needs to go into the alternative hypothesis since there is no equality, just strictly greater than 100. The complement of greater than is μ ≤ 100. This has a form of equality (≤), so it needs to go in the null hypothesis.
We then would set up the hypotheses as:
- H0: μ ≤ 100 (Do not build)
- H1: μ > 100 (Build).
When performing the hypothesis test, the test statistic assumes that the parameter is the null hypothesis is equal to some value. This still implies that the parameter could be any value less than or equal to 100, but our hypothesis test should be written as:
- H0: μ = 100
- H1: μ > 100
Either notation is fine, but most textbooks will always have the = sign in the null hypothesis. The null hypothesis is based on historical value, a claim, or a product specification.
Determining the Direction of a Hypothesis Test
When there is a greater than sign (>) in the alternative hypothesis, we call this a right-tailed test. If we had a less-than sign (<) in the alternative hypothesis, we would have a left-tailed test. If there were a no equal sign (≠) in the alternative hypothesis, we would have a two-tailed test. The tails will determine which side the critical region will fall on the sampling distribution. Note that you should never have an =, ≤, or ≥ sign appear in the alternative hypothesis.
There are three ways to set up the hypotheses for a population mean μ, where k is a placeholder for the numeric test value.
Format for a Two-tailed test:
\(H_0: \mu = \text{k}\)
\(H_1: \mu \neq \text{k}\)
Format for a Right-tailed test:
\(H_0: \mu = \text{k}\)
\(H_1: \mu > \text{k}\)
Format for a Left-tailed test:
\(H_0: \mu = \text{k}\)
\(H_1: \mu < \text{k}\)
Guidelines For Writing The Correct Hypothesis
- The null hypothesis of a two-tailed test states that the mean μ is equal to some value k.
- The null hypothesis of a right-tailed test implies that the mean μ is less than or equal to some value k.
- The null hypothesis of a left-tailed test implies that the mean μ is greater than or equal to some value k.
Look for key phrases in the research question to help you set up the hypotheses. Make sure that the =, ≤, and ≥ signs always go in the null hypothesis. The ≠,> and < signs always go in the alternative hypothesis. Look for these phrases in Figure 8-1 to help you decide if you are setting up a two-tailed test (first column), a right-tailed test (second column), or a left-tailed test (third column).
When you read a question, you must identify the parameter of interest. The parameter determines which distribution to use. Make sure that you can recognize and distinguish which parameter you are making a conjecture about: mean = µ, proportion = p, variance = σ2, standard deviation = σ. There will be more parameters in later chapters.
Do not use the sample statistics, like \(\overline{ x }\) or \(\hat{p}\), in the hypotheses. We are not making any inferences about the sample statistics. We know the value of the sample statistic. We use the sample statistics to infer if a change has occurred in the population.
For example, if we were making a conjecture about the percent or proportion in a population, we would have the following hypotheses:
H0: p = k
H1: p ≠ k.
Setting up the hypotheses correctly is the most important step in hypothesis testing. Here are some example research questions and how to set up the null and alternative hypotheses correctly; in a later section, we will perform the entire hypothesis test.
Use Figure 8-1 as a guide in setting up your hypotheses. The first column shows the hypotheses and how to shade in the distribution for a two-tailed test, with common phrases in the claim. The two-tailed test will always have a not equal ≠ sign in the alternative hypothesis, and both tails shaded. The second column is for a right-tailed test. Note that the greater than > sign will always be in the alternative hypothesis, and the right tail is shaded. The third column is for a left-tailed test. The left-tailed test will always have a less than < sign in the alternative hypothesis, and the left tail shaded in.
Hypothesis Testing Common Phrases

Figure \(\PageIndex{1}\): Table that provides several tails per test and keywords to translate to mathematics.
State the hypotheses in both words and symbols for the following claims.
The key phrase in the claim is “less than.” The less than sign < is only allowed in the alternative hypothesis, and we are testing against the national average.
H0: The national mean salary is $61,420.
H1: The GTEP director believes the mean salary in Oregon is less than $61,420.
Solution
H0: μ = 61420
H1: μ < 61420
State the hypotheses in both words and symbols for the following claims.
The key phrase in the claim is “more than.” The greater than sign > is only allowed in the alternative hypothesis. This is about a proportion, not a mean, so use the parameter p.
H0: The principal will not assign parking spaces if 30% or less of the students own a car.
H1: The principal will assign parking spaces if more than 30% of students own a car.
Solution
H0: p = 0.3
H1: p > 0.3
State the hypotheses in both words and symbols for the following claims.
The key word in the claim is “different.” The not equal sign ≠ is only allowed in the alternative hypothesis.
H0: The population mean age is 26 years old.
H1: The evening students’ mean age is believed to be different from 26 years old.
Solution
H0: μ = 26
H1: μ ≠ 26
To understand the process of a hypothesis test, you need to first understand what a hypothesis is, which is an educated guess about a parameter. Once you have the alternative hypothesis, you collect data and use the data to decide if there is enough evidence to show that the alternative hypothesis is true. However, in hypothesis testing you assume something else is true, the null hypothesis, and then you look at your data to see how likely it is to get an event that your data demonstrates with that assumption. If the event is very unusual, then you might think that your assumption is false. If you can say this assumption is false, then your alternative hypothesis could be true. You assume the opposite of your alternative hypothesis is true and show that it cannot be true. If this happens, then your alternative hypothesis is probably true. All hypothesis tests go through the same process. Once you have the process down, then the concept is much easier.
When setting up your hypotheses make sure the parameter, not the statistic, is used in the hypotheses. The equality always goes in the null hypothesis H0 and the alternative hypothesis H1 will be a left-tailed test with a less than sign <, a two-tailed test with a not equal sign \(\neq\), or a right-tailed test with a greater than sign >.
Authors
"8.1: Introduction to Hypothesis Testing" by Toros Berberyan, Tracy Nguyen, and Alfie Swan is licensed under CC BY-SA 4.0
Attributions
"8.1: Introduction" by Rachel Webb is licensed under CC BY-SA 4.0
"9.E: Hypothesis Testing with One Sample (Exercises)" by OpenStax is licensed under CC BY 4.0
Exercises
- The mean number of years Americans work before retiring is 34. State the null hypothesis, H0, and the alternative hypothesis, H1, in terms of the appropriate parameter (μ or p). If the parameter is p, express it as a decimal.
Scan the QR code or click on it to open the MyOpenMath version of the above question with step-by-step guidance.
MyOpenMath is a free online learning platform designed to support math instruction through automated homework, quizzes, and assessments. You must register for MyOpenMath and sign in to view the question.
- Less than 34% of Americans vote in presidential elections. State the null hypothesis, H0, and the alternative hypothesis, H1, in terms of the appropriate parameter (μ or p). If the parameter is p, express it as a decimal.
Scan the QR code or click on it to open the MyOpenMath version of the above question with step-by-step guidance.
MyOpenMath is a free online learning platform designed to support math instruction through automated homework, quizzes, and assessments. You must register for MyOpenMath and sign in to view the question.
- The mean starting salary for San Jose State University graduates is more than $100,000 per year. State the null hypothesis, H0, and the alternative hypothesis, H1, in terms of the appropriate parameter (μ or p). If the parameter is p, express it as a decimal.
Scan the QR code or click on it to open the MyOpenMath version of the above question with step-by-step guidance.
MyOpenMath is a free online learning platform designed to support math instruction through automated homework, quizzes, and assessments. You must register for MyOpenMath and sign in to view the question.
- Answers
-
If you are an instructor and want the solutions to all the exercise questions for each section, please email Toros Berberyan.





