Logo for LOUIS Pressbooks

Chapter 8: Hypothesis Testing with One Sample

Introduction to Chapter 8: Hypothesis Testing with One Sample

This is a picture of a Dalmation dog covered in black spots. He is wearing a red color, appears to be in a nature setting, and there is a spout of water from a water fountain in the foreground.

One job of a statistician is to make statistical inferences about populations based on samples taken from the population. Confidence intervals are one way to estimate a population parameter. Another way to make a statistical inference is to make a decision about a parameter. For instance, a car dealer advertises that its new small truck gets 35 miles per gallon, on average. A tutoring service claims that its method of tutoring helps 90% of its students get an A or a B. A company says that women managers in their company earn an average of $60,000 per year.

A statistician will make a decision about these claims. This process is called “ hypothesis testing .” A hypothesis test involves collecting data from a sample and evaluating the data. Then, the statistician makes a decision as to whether or not there is sufficient evidence, based upon analyses of the data, to reject the null hypothesis.

In this chapter, you will conduct hypothesis tests on single means and single proportions. You will also learn about the errors associated with these tests.

Hypothesis testing consists of two contradictory hypotheses or statements, a decision based on the data, and a conclusion. To perform a hypothesis test, a statistician will:

  • Set up two contradictory hypotheses.
  • Collect sample data (in homework problems, the data or summary statistics will be given to you).
  • Determine the correct distribution to perform the hypothesis test.
  • Analyze sample data by performing the calculations that ultimately will allow you to reject or decline to reject the null hypothesis.
  • Make a decision and write a meaningful conclusion.

Collaborative Exercises

Collaborative exercise.

Bring to class a newspaper, some news magazines, and some Internet articles. In groups, find articles from which your group can write null and alternative hypotheses. Discuss your hypotheses with the rest of the class.

Media Attributions

  • Chapter 9 Introduction Figure © OpenStax Introductory Statistics is licensed under a CC BY (Attribution) license

Based on sample evidence, a procedure for determining whether the hypothesis stated is a reasonable statement and should not be rejected, or is unreasonable and should be rejected.

Introductory Statistics Copyright © 2024 by LOUIS: The Louisiana Library Network is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License , except where otherwise noted.

Share This Book

Introduction to Statistics

Chapter 8 hypothesis testing.

Learning Outcome

Perform hypotheses testing involving one population mean, one population proportion, and one population standard deviations/variance.

This chapter introduces the statistical method of hypothesis testing to test a given claim about a population parameter, such as proportion, mean, standard deviation, or variance. This method combines the concepts covered in the previous chapters, including sampling distribution, standard error, critical scores, and probability theory.

8.1 Hypothesis Testing

In statistics, a hypothesis is a claim or statement about a property of a population.

A hypothesis test (or test of significance) is a procedure for testing a claim about a property of a population.

The null hypothesis ( \(H_0\) ) is a statement that the value of a population parameter (such as proportion, mean, or standard deviation) is equal to some claimed value.

The alternative hypothesis ( \(H_A\) ) is a statement that the parameter has a value that somehow differs from the null hypothesis.

Purpose of a Hypothesis Test

The purpose of a hypothesis test is to determine how plausible the null hypothesis is. At the start of a hypothesis test, we assume that the null hypothesis is true. Then we look at the evidence, which comes from data that have been collected. If the data strongly indicate that the null hypothesis is false, we abandon our assumption that it is true and believe the alternate hypothesis instead. This is referred to as rejecting the null hypothesis.

The evidence comes in the form of a test statistic. When the difference between the test statistic (such as, \(z\) or \(t\) scores) and the value in the null hypothesis is sufficiently large, we reject the null hypothesis.

\[ \fbox{Assume the null hypothesis is true} \xrightarrow{} \fbox{consider the evidence} \xrightarrow{} \fbox{decide whether to accept or reject the null hypothesis} \]

Probability of getting head from a single toss of coin, \(p = 0.5\) .

Therefore, expected value of the number of heads from \(20\) tosses = \(10\) .

Suppose, on your first trial, you have tossed a coin \(20\) times and seen \(15\) heads, \(\hat p = 0.75\) . On your second trial, you have tossed a coin \(20\) times again and seen \(12\) heads, \(\hat p = 0.60\) .

Is the coin fair, or is it biased towards heads?

Null and Alternative Hypotheses

Null hypothesis \((H_0)\) : states that any deviation from what was expected is due to chance error (i.e. the coin is fair).

Alternative hypothesis \((H_A)\) : asserts that the observed deviation is too large to be explained by chance alone (i.e. the coin is biased towards heads).

\[ H_0: p = 0.5 \\ H_A: p > 0.5 \]

Now, what is the probability of \(p \ge 0.75?\) What is the probability of \(p \ge 0.60?\)

From normal approximation of the sampling distribution of \(\hat p\) ,

\[ \begin{align} p &= 0.5 \\ se &= \sqrt{(0.5)(0.5)/20} = 0.112 \\ z_1 &= (0.75 - 0.50)/0.112 = 2.236 \\ \\ z_2 &= (0.60 - 0.50)/0.112 = 0.893 \\ \\ \text {p-value} &= \begin{cases} P(z\ge 2.236) &= 0.0127 \\ P(z\ge 0.893) &= 0.1860 \end{cases} \end{align} \]

We see that the farther the test statistic is from the values specified by \(H_0\) , the less likely the difference is due to chance - and the less plausible becomes. The question then is: How big should the difference be before we reject \(H_0\) ?

To answer this question, we need methods that enable us to calculate just how plausible \(H_0\) is. Hypothesis tests provide these methods taking into account things such as the size of the sample and the amount of spread in the distribution.

Interpretation of \(\text{p-value}\)

A \(\text{p-value}\) is the probability of obtaining the observed effect (or larger) under a “null hypothesis”. Thus, a \(\text{p-value}\) that is very small indicates that the observed effect is very unlikely to have arisen purely by chance, and therefore provides evidence against the null hypothesis.

It has been common practice to interpret a \(\text{p-value}\) by examining whether it is smaller than particular threshold values or “significance level”. In particular, \(\text{p-values}\) less than \(5\%\) are often reported as “statistically significant”, and interpreted as being small enough to justify rejection of the null hypothesis. By definition, the significance level \(\alpha\) is the probability of mistakenly rejecting the null hypothesis when it is true.

\[\textbf {Significance level } \alpha = P \textbf { (rejecting } H_0 \textbf { when } H_0 \textbf { is true)} \]

In common practice, \(\alpha\) is set at \(10\%, 5\%\) or \(1\%\) .

In the coin toss example:

p-value = \(1.27\%\) which is less than the \(5\%\) significance level.
Therefore, the result is statistically significant.
Conclusion: The coin is biased towards heads.

Type I and Type II Errors

When testing a null hypothesis, sometimes the test comes to a wrong conclusion by rejecting it or failing to reject it. There are two kinds of errors: type I and type II errors.

  • \(\textbf {Type I error} :\) The error of rejecting the null hypothesis when it is actually true.

\(\alpha = P (\textbf{type I error}) = P (\text{rejecting } H_0 \text{ when } H_0 \text{ is true } )\)

The probability of \(\text {Type I}\) can be minimized by choosing a smaller \(\alpha\) .
  • \(\textbf {Type II error} :\) The error of failing to reject the null hypothesis when it is actually false.

\(\beta = P (\textbf{type II error}) = P (\text{failing to reject } H_0 \text{ when } H_0 \text{ is false} )\)

The probability of \(\text {Type II}\) can be minimized by choosing a larger sample size \(n\) .

In general, a \(\text{Type I}\) error is more serious than a \(\text{Type II}\) error. This is because a \(\text{Type I}\) error results in a false conclusion, while a \(\text{Type II}\) error results only in no conclusion. Ideally, we would like to minimize the probability of both errors. Unfortunately, with a fixed sample size, decreasing the probability of one type increases the probability of the other.

Hypothesis tests are often designed so that the probability of a \(\text{Type I}\) error will be acceptably small, often \(0.05\) or \(0.01\) . This value is called the significance level of the test.

Significance Level

Notice that if \(H_0\) is actually true, but \(\hat p\) falls in the critical region, then a \(\text{Type I}\) Error occurs. We begin a hypothesis test by setting the probability of a \(\text{Type I}\) Error. This value is called the significance level and is denoted by \(\alpha\) . The area of critical region is equal to \(\alpha\) . The choice of \(\alpha\) is determined by how strong we require the evidence against \(H_0\) to be in order to reject it. The smaller the value of \(\alpha\) , the stronger we require the evidence to be.

Critical Value Method

In a hypothesis test, the critical value(s) separates the critical region (where we reject the null hypothesis) from the values of the test statistic that do not lead to rejection of the null hypothesis.

With the critical value method of testing hypothesis, we make a decision by comparing the test statistic to the critical value(s).

chapter 8 hypothesis testing

Stating the Conclusion in a Hypothesis Test

If the null hypothesis is rejected, the conclusion of the hypothesis test is straightforward: We conclude that the alternate hypothesis, \(H_0\) , is true.

If the null hypothesis is not rejected, we say that there is not enough evidence to conclude that the alternate hypothesis, \(H_a\) , is true. This is not saying the null hypothesis is true. What we are saying is that the null hypothesis might be true.

chapter 8 hypothesis testing

One-sided and two-sided tests

If the researchers are only interested in showing an increase or a decrease, but not both, use a one-sided test . If the researchers would be interested in any difference from the null value - an increase or decrease - then the test should be two-sided .

After observing data, it is tempting to turn a two-sided test into a one-sided test. Hypotheses must be set up before observing the data. If they are not, the test must be two-sided.

chapter 8 hypothesis testing

Steps of a Formal Test of Hypothesis

Follow these seven steps when carrying out a hypothesis test.

  • State the name of the test being used.
  • Verify conditions to ensure the standard error estimate is reasonable and the point estimate follows the appropriate distribution and is unbiased.
  • Write the hypotheses and set them up in mathematical notation.
  • Identify the significance level \(\alpha\) .
  • Calculate the test statistics (e.g.  \(z\) ), using an appropriate point estimate of the paramater of interest and its standard error. \[\text{test statistics} = \frac{\text{point estimate - null value}}{\text{SE of estimate}}\]
  • Find the \(\text{p-value}\) , compare it to \(\alpha\) , and state whether to reject or not reject the null hypothesis.
  • Write your conclusion in context.

8.2 Power of a Hypothesis Test (Optional)

The power of a hypothesis test is the probability \(1-\beta\) of rejecting a false null hypothesis. The value of the power is computed by using a particular significance level \(\alpha\) and a particular value of the population parameter that is an alternative to the value of assumed true in the null hypothesis.

In practice, statistical studies are commonly designed with a statistical power of at least \(80%\) .

Figure: Statistical Power

Post-hoc Power Calculation for One Study Group vs. Population

\[ H_0 : p = P_0 \\ H_A : p \ne P_0 \\ \] \[ \begin{align} P_0 &= \text{proportion of population} \\ P_1 &= \text{proportion observed from the data (an alternative population)} \\ N &= \text{sample size} \\ \alpha &= \text{probability of type I error} \\ \beta &= \text{probability of type II error} \\ z &= \text{critical z score for a given } \alpha \text { or } \beta \end{align} \]

Suppose, \(P_1\) is an alternative to the value assumed in \(H_0\) .

Under \(H_0\) ,

\[ P'_0 = P_0 + z_{1-\alpha/2} \cdot \sqrt{\dfrac{P_0Q_0}{N}} \]

Under \(H_A\) ,

\[ \therefore z_{\beta} = \dfrac{P'_0 - P_1}{\sqrt{\dfrac{P_1Q_1}{N}}} = \dfrac{\Bigg( P_0 + z_{1-\alpha/2} \cdot \sqrt{\dfrac{P_0Q_0}{N}} \Bigg) - P_1}{\sqrt{\dfrac{P_1Q_1}{N}}} \\ \\ P(\textbf{Type II error}) = \beta = \Phi \left \{ \dfrac{\Bigg( P_0 + z_{1-\alpha/2} \cdot \sqrt{\dfrac{P_0Q_0}{N}} \Bigg) - P_1}{\sqrt{\dfrac{P_1Q_1}{N}}} \right \} \\ \]

\[ \begin{align} \text{where,} \\ Q_0 &= 1 - P_0 \\ Q_1 &= 1 - P_1 \\ \Phi &= \text{cumulative normal distribution function} \end{align} \]

Example: Calculate statistical power for various alternative hypotheses.

\[ Suppose, \begin{cases} H_0: p = 0.5 \\ H_A: p \ne 0.5 \\ P(\text{type I error}) = \alpha = 0.05 \\ \text{Critical z score, } z_{1 - \alpha/2} = 1.96 \\ N = 14 \\ \end{cases} \]

\[ \begin{array}{r|r|r} P_1 & \Phi(z_{\beta}) = \beta & 1-\beta \\ \hline 0.6 & \Phi(1.2367) = 0.8919 & 0.1081 \\ 0.7 & \Phi(0.5055) = 0.6934 & 0.3066 \\ 0.8 & \Phi(-0.3562) = 0.3608 & 0.6392 \\ 0.9 & \Phi(-1.7222) = 0.0425 & 0.9575 \\ \hline \end{array} \]

Example: Sample size calculation to achieve power (when \(P_0\) and \(P_1\) are known)

\[ \begin{align} z_{\beta} = \Phi^{-1}(\beta) &= \dfrac{\Bigg( P_0 + z_{1-\alpha/2} \cdot \sqrt{\dfrac{P_0Q_0}{N}} \Bigg) - P_1}{\sqrt{\dfrac{P_1Q_1}{N}}} \\ \\ z_{1-\alpha/2} &= 1.96 \\ 1- \beta &= 0.8 \\ \\ \Phi^{-1}(0.2) = -0.84 &= \dfrac{\Bigg( 0.5 + 1.96 \cdot \sqrt{\dfrac{(0.5) (0.5)}{N}} \Bigg) - 0.9}{\sqrt{\dfrac{(0.9)(0.1)}{N}}} \\ \implies N &= \Bigg( \dfrac{1.96\sqrt{0.25} + 0.84\sqrt{0.09}}{0.4} \Bigg)^2 \\ &\approx 10 \end{align} \]

Example: Sample size calculation to achieve power (when \(P_0\) and \(P_1\) are unknown)

\[ N = \Bigg( \dfrac{z_{1-\alpha/2} + z_{1-\beta}}{ES} \Bigg)^2 \\ \] where,

\[ \text{effect size, } ES = \dfrac{|P_1-P_0|}{\sqrt{P_0Q_0}} \]

Statistical power and design of experiment: When designing an experiment, it is essential to determine the minimize sample size that would be needed to detect an acceptable difference between the true value of the population parameter and what is observed from the data. A \(5\%\) significance level \((\alpha)\) and a statistical power of at least \(80\%\) are common requirements for determining that a hypothesis test is effective.

8.3 Inference for a Single Proportion

Conduct a formal hypothesis test of a claim about a population proportion \(p\) .

Requirements:

  • The sample observations are simple random sample.
  • The trials are independent with two possible outcomes.
  • The sampling distribution for \(\hat p\) , taken from a sample of size \(n\) from a population with a true proportion \(p\) , is nearly normal when the sample observations are independent and we expect to see at least \(10\) successes and \(10\) failures in our sample, i.e.  \(np \ge 10\) and \(n(1-p) \ge 10\) . This is called the success-failure condition. If the conditions are met, then the sampling distribution of \(\hat p\) is nearly normal with mean \(\mu_{\hat p} = p\) and standard deviation \(\sigma_{\hat p} = \sqrt {\dfrac{p(1-p)}{n}}\) .

\[ \begin{cases} n = \text {sample size } \\ \hat p = \dfrac{x}{n} \text { (sample proportion) } \\ p = \text {population proportion } \\ q = 1 - p \\ \end{cases} \]

Test Statistic for Testing a Claim About a Proportion

\[ z = \dfrac{\hat p - p}{\sqrt {\dfrac{pq}{n}} } \]

The DMV claims that \(80\%\) of all drivers pass the driving test. In a survey of \(90\) teens, only \(61\) passed. Is there evidence that teen pass rates are significantly below \(80\%?\)

Let’s say, \(p\) is the true population proportion.

\[ \begin{align} \text {One-tailed test} &:\\ H_0&: p = 0.80 \\ H_A&: p < 0.80 \end{align} \]

Verify success-failure condition: \[ \begin{align} np \ge 10 \rightarrow 90 \times 0.80 \ge 10 \\ n(1-p) \ge 10 \rightarrow 90 \times (1-0.80) \ge 10 \end{align} \]

Therefore, the conditions for a normal model are met.

Now, \[ \begin{align} \hat p &= \frac {61}{90} = 0.678 \\ \\ SE(\hat p) &= \sqrt \frac{pq}{n} = \sqrt \frac{(0.80)(0.20)}{90} = 0.042 \\ \\ z &= \frac {0.678-0.80}{0.042} = -2.90 \\ \\ p\text{-value} &= P(z < -2.90) = 0.002 < 0.05 \end{align} \]

Hence, we reject \(H_0\) . Teen pass rate is significantly below population pass rate.

Under natural conditions, \(51.7\%\) of births are male. In Punjab India’s hospital \(56.9\%\) of the \(550\) births were male. Is there evidence that the proportion of male births is significantly different for this hospital?

\[ \begin{align} \text {Two-tailed test} &:\\ H_0&: p = 0.517 \\ H_A&: p \ne 0.517 \end{align} \]

Verify success-failure condition: \[ \begin{align} np \ge 10 \rightarrow 550 \times 0.517 \ge 10 \\ n(1-p) \ge 10 \rightarrow 550 \times (1-0.517) \ge 10 \end{align} \]

\[ \begin{align} \hat p &= 0.569 \\ \\ SE(\hat p) &= \sqrt \frac{pq}{n} = \sqrt \frac{(0.517)(1-0.517)}{550} = 0.0213 \\ \\ z &= \frac {0.569-0.517}{0.0213} = 2.44 \\ \\ p\text{-value} &= 2 \times P(z > 2.44) = 2 \times 0.0073 = 0.0146 < 0.05 \end{align} \]

Hence, we reject \(H_0\) . Male birth rate is significantly higher at the hospital than the natural birth rate.

8.4 \(z \text {-test}\) | Testing Hypothesis About \(\mu\) with \(\sigma\) Known

The null hypothesis claims about a population mean \(\mu\) .

\[ \begin{cases} \mu_{\bar x} = \text {population mean } \\ \sigma = \text {population standard deviation } \\ n = \text {size of the sample drawn from the population } \\ \bar x = \text{sample mean} \\ \end{cases} \]

  • The sample is simple random sample.
  • The population is normally distributed or \(n > 30\) .

Test Statistic for Testing a Claim About a Mean

\[ z = \dfrac{\bar x - \mu_{\bar x}}{\dfrac{\sigma}{\sqrt n}} \]

The American Automobile Association reported that the mean price of a gallon of regular gasoline in the city of Los Angeles in July 2019 was \(\$4.07\) . A recently taken simple random sample of \(50\) gas stations had an average price of \(\$4.02\) . Assume that the standard deviation of prices is \(\$0.15\) . An economist is interested in determining whether the mean price is less than \(\$4.07\) . Perform a hypothesis test at the \(\alpha = 0.05\) level of significance.

\[ \begin{align} H_0&: \mu = 4.07 \\ H_A&: \mu < 4.07 \\ \\ \bar x &= 4.02 \\ \sigma &= 0.15 \\ SE(\bar x) &= 0.15/\sqrt {50} = 0.0212 \\ \\ z &= (4.02 - 4.07)/0.0212 = -2.36 \\ p-value &= 0.09\% < 5\% \end{align} \]

Therefore, we reject \(H_0\) at the \(\alpha = 0.05\) level. We conclude that the mean price of a gallon of regular gasoline in Los Angeles is less than \(\$4.07\) .

8.5 \(t \text {-test}\) | Testing Hypothesis About \(\mu\) with \(\sigma\) Not Known

\[ \begin{cases} \mu_{\bar x} = \text {population mean } \\ s = \text {sample standard deviation } \\ n = \text {size of the sample drawn from the population } \\ \bar x = \text{sample mean} \\ \end{cases} \]

\[ t_{n-1} = \dfrac{\bar x - \mu_{\bar x}}{\dfrac{s}{\sqrt n}} \]

Average weight of a mice population of a particular breed and age is \(30 \text{ gm}\) . Weights recorded from a random sample of \(5\) mice from that population are \({31.8, 30.9, 34.2, 32.1, 28.8}.\) Test whether the sample mean is significantly greater than the population mean.

\[ \begin{align} H_0&: \mu = 30 \\ H_A&: \mu > 30 \\ \\ \bar x &= 31.56 \\ s &= 1.9604 \\ SE(\bar x) &= 1.9604/\sqrt 5 = 0.8767 \\ \\ t &= (31.56 - 30)/0.8767 = 1.779 \\ df &= (5 -1) = 4 \\ p-value &= 7.5\% > 5\% \end{align} \]

Conclusion: \(H_0\) cannot be rejected. The sample mean is not significantly greater than the population mean.

EPA recommended mirex screening is 0.08 ppm. A study of a sample of 150 salmon found an average mirex concentration of 0.0913 ppm with a std. deviation of 0.0495 ppm. Are farmed salmon contaminated beyond the permitted EPA level? Also, find a \(95\%\) confidence interval for the mirex concentration in salmon.

\[ \begin{align} H_0&: \mu = 0.08 \\ H_A&: \mu > 0.08 \\ \\ \bar x &= 0.0913 \\ s &= 0.0495 \\ SE(\bar x) &= 0.0495/\sqrt {150} = 0.0040 \\ \\ t_{149} &= \dfrac{\bar x - \mu}{SE(\bar x)} = \dfrac{(0.0913 - 0.08)}{0.0040} = 2.795 \\ df &= (150 -1) = 149 \\ p-value &= P(t_{149}>2.795)= 0.29\% < 5\% \end{align} \]

Conclusion: Reject \(H_0\) . The sample mean mirex level significantly higher that the EPA screening level.

8.6 \(\chi^2 \text{-test}\) | Testing Hypothesis About a Variance

Caution: The method of this section applies only for samples drawn from a normal distribution. If the distribution differs even slightly from normal, this method should not be used.

Listed below are the heights (cm) for the simple random sample of female supermodels. Use a \(0.01\) significance level to test the claim that supermodels have heights with a standard deviation that is less than \(\sigma=7.5 \text { cm}\) for the population of women. Does it appear that heights of supermodels vary less than heights of women from the population?

\[ \text{178, 177, 176, 174, 175, 178, 175, 178} \\ \text{178, 177, 180, 176, 180, 178, 180, 176} \\ s^2 = 3.4 \]

chapter 8 hypothesis testing

From \(\chi^2\) table,

\[ \text {The critical value of } \chi^2 = 5.229 \text { at } \alpha = 0.01. \\ \] Hence, we reject \(H_0\) .

Confidence Interval Calculation:

\[ \sqrt{ \dfrac{(n-1)s^2}{\chi_R^2} } < \sigma < \sqrt{ \dfrac{(n-1)s^2}{\chi_L^2} } \\ \sqrt{ \dfrac{(16-1)3.4}{30.578} } < \sigma < \sqrt{ \dfrac{(16-1)3.4}{5.229} } \\ 1.3 \text{ cm } < \sigma < 3.1 \text { cm } \]

Have a language expert improve your writing

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

  • Knowledge Base

Hypothesis Testing | A Step-by-Step Guide with Easy Examples

Published on November 8, 2019 by Rebecca Bevans . Revised on June 22, 2023.

Hypothesis testing is a formal procedure for investigating our ideas about the world using statistics . It is most often used by scientists to test specific predictions, called hypotheses, that arise from theories.

There are 5 main steps in hypothesis testing:

  • State your research hypothesis as a null hypothesis and alternate hypothesis (H o ) and (H a  or H 1 ).
  • Collect data in a way designed to test the hypothesis.
  • Perform an appropriate statistical test .
  • Decide whether to reject or fail to reject your null hypothesis.
  • Present the findings in your results and discussion section.

Though the specific details might vary, the procedure you will use when testing a hypothesis will always follow some version of these steps.

Table of contents

Step 1: state your null and alternate hypothesis, step 2: collect data, step 3: perform a statistical test, step 4: decide whether to reject or fail to reject your null hypothesis, step 5: present your findings, other interesting articles, frequently asked questions about hypothesis testing.

After developing your initial research hypothesis (the prediction that you want to investigate), it is important to restate it as a null (H o ) and alternate (H a ) hypothesis so that you can test it mathematically.

The alternate hypothesis is usually your initial hypothesis that predicts a relationship between variables. The null hypothesis is a prediction of no relationship between the variables you are interested in.

  • H 0 : Men are, on average, not taller than women. H a : Men are, on average, taller than women.

Here's why students love Scribbr's proofreading services

Discover proofreading & editing

For a statistical test to be valid , it is important to perform sampling and collect data in a way that is designed to test your hypothesis. If your data are not representative, then you cannot make statistical inferences about the population you are interested in.

There are a variety of statistical tests available, but they are all based on the comparison of within-group variance (how spread out the data is within a category) versus between-group variance (how different the categories are from one another).

If the between-group variance is large enough that there is little or no overlap between groups, then your statistical test will reflect that by showing a low p -value . This means it is unlikely that the differences between these groups came about by chance.

Alternatively, if there is high within-group variance and low between-group variance, then your statistical test will reflect that with a high p -value. This means it is likely that any difference you measure between groups is due to chance.

Your choice of statistical test will be based on the type of variables and the level of measurement of your collected data .

  • an estimate of the difference in average height between the two groups.
  • a p -value showing how likely you are to see this difference if the null hypothesis of no difference is true.

Based on the outcome of your statistical test, you will have to decide whether to reject or fail to reject your null hypothesis.

In most cases you will use the p -value generated by your statistical test to guide your decision. And in most cases, your predetermined level of significance for rejecting the null hypothesis will be 0.05 – that is, when there is a less than 5% chance that you would see these results if the null hypothesis were true.

In some cases, researchers choose a more conservative level of significance, such as 0.01 (1%). This minimizes the risk of incorrectly rejecting the null hypothesis ( Type I error ).

Prevent plagiarism. Run a free check.

The results of hypothesis testing will be presented in the results and discussion sections of your research paper , dissertation or thesis .

In the results section you should give a brief summary of the data and a summary of the results of your statistical test (for example, the estimated difference between group means and associated p -value). In the discussion , you can discuss whether your initial hypothesis was supported by your results or not.

In the formal language of hypothesis testing, we talk about rejecting or failing to reject the null hypothesis. You will probably be asked to do this in your statistics assignments.

However, when presenting research results in academic papers we rarely talk this way. Instead, we go back to our alternate hypothesis (in this case, the hypothesis that men are on average taller than women) and state whether the result of our test did or did not support the alternate hypothesis.

If your null hypothesis was rejected, this result is interpreted as “supported the alternate hypothesis.”

These are superficial differences; you can see that they mean the same thing.

You might notice that we don’t say that we reject or fail to reject the alternate hypothesis . This is because hypothesis testing is not designed to prove or disprove anything. It is only designed to test whether a pattern we measure could have arisen spuriously, or by chance.

If we reject the null hypothesis based on our research (i.e., we find that it is unlikely that the pattern arose by chance), then we can say our test lends support to our hypothesis . But if the pattern does not pass our decision rule, meaning that it could have arisen by chance, then we say the test is inconsistent with our hypothesis .

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.

  • Normal distribution
  • Descriptive statistics
  • Measures of central tendency
  • Correlation coefficient

Methodology

  • Cluster sampling
  • Stratified sampling
  • Types of interviews
  • Cohort study
  • Thematic analysis

Research bias

  • Implicit bias
  • Cognitive bias
  • Survivorship bias
  • Availability heuristic
  • Nonresponse bias
  • Regression to the mean

Hypothesis testing is a formal procedure for investigating our ideas about the world using statistics. It is used by scientists to test specific predictions, called hypotheses , by calculating how likely it is that a pattern or relationship between variables could have arisen by chance.

A hypothesis states your predictions about what your research will find. It is a tentative answer to your research question that has not yet been tested. For some research projects, you might have to write several hypotheses that address different aspects of your research question.

A hypothesis is not just a guess — it should be based on existing theories and knowledge. It also has to be testable, which means you can support or refute it through scientific research methods (such as experiments, observations and statistical analysis of data).

Null and alternative hypotheses are used in statistical hypothesis testing . The null hypothesis of a test always predicts no effect or no relationship between variables, while the alternative hypothesis states your research prediction of an effect or relationship.

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). Hypothesis Testing | A Step-by-Step Guide with Easy Examples. Scribbr. Retrieved August 24, 2024, from https://www.scribbr.com/statistics/hypothesis-testing/

Is this article helpful?

Rebecca Bevans

Rebecca Bevans

Other students also liked, choosing the right statistical test | types & examples, understanding p values | definition and examples, what is your plagiarism score.

Mastering Hypothesis Testing: 8 Steps Decoded

IMAGES

  1. PPT

    chapter 8 hypothesis testing

  2. PPT

    chapter 8 hypothesis testing

  3. CHAPTER 8: Hypothesis Testing

    chapter 8 hypothesis testing

  4. PPT

    chapter 8 hypothesis testing

  5. PPT

    chapter 8 hypothesis testing

  6. Chapter 8

    chapter 8 hypothesis testing

COMMENTS

  1. PDF Introduction to Hypothesis Testing

    CHAPTER 8: INTRODUCTION TO HYPOTHESIS TESTING 5 Step 2: Set the criteria for a decision. To set the criteria for a decision, we state the level of significance for a test. This is similar to the criterion that jurors use in a criminal trial. Jurors decide whether the evidence presented shows guilt beyond a

  2. PDF Chapter 8 Introduction to Hypothesis Testing

    Chapter 8 Learning Outcomes 1 •Understand logic of hypothesis testing 2 •State hypotheses and locate critical region(s) 3 •Conduct z-test and make decision 4 •Define and differentiate Type I and Type II errors 5 •Understand effect size and compute Cohen's d 6 •Make directional hypotheses and conduct one-tailed test

  3. PDF Hypothesis Testing

    Chapter 8 Hypothesis Testing 8.1 Introduction Definition 8.1.1 A hypothesis is a statement about a population parameter. The goal of a hypothesis test is to decide, based on a sample from the population, which of two complementary hypotheses is true. Definition 8.1.2 The two complementary hypotheses in a hypothesis testing

  4. PDF Lecture #8 Chapter 8: Hypothesis Testing 8-2 Basics of hypothesis

    This chapter introduces another major topic of inferential statistics: testing claims (or hypothesis) made about population parameters. 8-2 Basics of hypothesis testing In this section, 1st we introduce the language of hypothesis testing, then we discuss the formal process of testing a hypothesis. A hypothesis is a statement or claim regarding ...

  5. PDF Hypothesis Testing (Two Sample)

    hypothesis testing, single sample. does a population parameter estimated from sample data differ from some claimed value. almost always results in the same answer as confidence intervals - exception possible with proportions due to difference in how standard errors are calculated in hypothesis testing versus confidence intervals. in either case ...

  6. PDF STAT 515 -- Chapter 8: Hypothesis Tests

    STAT 515 -- Chapter 8: Hypothesis Tests. CIs are possibly the most useful forms of inference because they give a range of "reasonable" values for a parameter. But sometimes we want to know whether one particular value for a parameter is "reasonable.". In this case, a popular form of inference is the hypothesis test.

  7. PDF Chapter 8: Hypothesis Testing

    8 -1: Steps in Hypothesis Testing (cont.) In this course, we are interested in statistical hypotheses that compare the population mean (i.e., 𝜇) to a specified number (e.g., k). Types of tests: The null and alternative hypotheses are stated together as follows: Two-tailed test Right-tailed test Left-tailed test Null Hypothesis 𝑯 :𝝁=𝒌 𝑯 :𝝁

  8. Introduction to Chapter 8: Hypothesis Testing with One Sample

    In this chapter, you will conduct hypothesis tests on single means and single proportions. You will also learn about the errors associated with these tests. Hypothesis testing consists of two contradictory hypotheses or statements, a decision based on the data, and a conclusion. To perform a hypothesis test, a statistician will:

  9. 8.1: Steps in Hypothesis Testing

    Figure 8.1.1 8.1. 1: You can use a hypothesis test to decide if a dog breeder's claim that every Dalmatian has 35 spots is statistically sound. (Credit: Robert Neff) A statistician will make a decision about these claims. This process is called "hypothesis testing." A hypothesis test involves collecting data from a sample and evaluating the data.

  10. PDF Chapter 8 Hypothesis-Testing Logic distribute

    cHaPter 8 Hypothesis-Testing Logic 159 The Distribution of Sample Means Revisited As I have described in previous chapters, the distribution of sample means is a special distribu-tion that contains all the sample means we would get if we were to draw all the possible samples

  11. Chapter 8 Hypothesis Testing

    8.1 Hypothesis Testing. In statistics, a hypothesis is a claim or statement about a property of a population.. A hypothesis test (or test of significance) is a procedure for testing a claim about a property of a population.. The null hypothesis (\(H_0\)) is a statement that the value of a population parameter (such as proportion, mean, or standard deviation) is equal to some claimed value.

  12. PDF Chapter 8-2: Basics of Hypothesis Testing Example Hypotheses

    Chapter 8-2: Basics of Hypothesis Testing Two main activities in statistical inference are using sample data to: 1. estimate a population parameter— forming confidence intervals 2. test a hypothesis or claim about a population parameter Hypothesis A claim or statement about a property of a population Hypothesis Test

  13. PDF Chapter 8 Hypothesis Testing

    Section 8 - 3 to Section 8 - 5 I. Test Statistic A test statistic is a quantity that is used to make a decision in a test of hypotheses. Test Statistic for Testing a Claim about a Mean If σ is known , If σ is unknown but n ≥ 30, If σ is unknown and n < 30, Test Statistic for Testing a Claim about a Proportion where n p=x ^ II.

  14. 8

    Example 8 - 1. State the Null and Alternative HypothesesThe average age of. rst-year medical school students is less than 29 years.The average numbe. of seasons in which an NBA player participates is 4.71.The average number of monthly sessions o. the Internet by a person at home has increased from 36.The av.

  15. PDF Chapter 8. Statistical Inference

    Chapter 8. Statistical Inference 8.3: Introduction to Hypothesis Testing (From \Probability & Statistics with Applications to Computing" by Alex Tsun) Hypothesis testing allows us to \statistically prove" claims. For example, if a drug company wants to claim that their new drug reduces the risk of cancer, they might perform a hypothesis test.

  16. PDF Chapter 8

    THE LOGIC OF HYPOTHESIS TESTING The logic behind the hypothesis testing is as follows: 1) State a hypothesis about a population. The hypothesis usually concerns the value of a population parameter. 2) Before we actually select a sample, we use the hypothesis to predict the characteristics that the sample should have.

  17. Hypothesis Testing

    Present the findings in your results and discussion section. Though the specific details might vary, the procedure you will use when testing a hypothesis will always follow some version of these steps. Table of contents. Step 1: State your null and alternate hypothesis. Step 2: Collect data. Step 3: Perform a statistical test.

  18. Introductory Statistics

    A video summary of chapter 8 in Perdisco's Introductory Statistics 360Textbook. To find out more, visit www.perdisco.com/introstats

  19. Chapter 8: Introduction to hypothesis testing

    1. state hypothesis and set alpha level. 2. locate critical region. 3. compute test statistic (in this case, z-score) for sample. 4. make decision about H0 based on result of step 3. - null hypothesis states no effect-->if you reject, you conclude that sample data provide evidence for treatment effect.

  20. PDF TESTING HYPOTHESES distribute

    at the left tail of the sampling distribution. Our example is a right-tailed test because the research hypothesis states that the mean gas prices in California are higher than $2.62 (see Figure 8.1). One-tailed test: A type of hypothesis test that involves a directional hypothesis. It specifies that the values of one group are either larger

  21. Chapter 8: Hypothesis Testing

    25 of 25. Quiz yourself with questions and answers for Chapter 8: Hypothesis Testing, so you can be ready for test day. Explore quizzes and practice tests created by teachers and students or create one from your course material.

  22. Chapter 8: Hypothesis Testing Flashcards

    Terms in this set (29) hypothesis testing. one of the most commonly used inferential procedures. hypothesis testing. a statistical method that uses sample data to evaluate the validity of a hypothesis about a population parameter. state a hypothesis about a population. the first step in hypothesis testing.

  23. Mastering Hypothesis Testing: 8 Steps Decoded

    Deliverable 04 Worksheet 1. Describe the 8 steps in the process for hypothesis testing. Explain the decision criteria for rejecting the null hypothesis for both the p-value method and the critical value method. Answer and Explanation: The remaining problems refer to the following scenario: A claim is made that the average salary for all jobs in Minnesota is less than $75,000.