Hypothesis Testing with the Binomial Distribution

Contents Toggle Main Menu 1 Hypothesis Testing 2 Worked Example 3 See Also

Hypothesis Testing

To hypothesis test with the binomial distribution, we must calculate the probability, $p$, of the observed event and any more extreme event happening. We compare this to the level of significance $\alpha$. If $p>\alpha$ then we do not reject the null hypothesis. If $p<\alpha$ we accept the alternative hypothesis.

Worked Example

A coin is tossed twenty times, landing on heads six times. Perform a hypothesis test at a $5$% significance level to see if the coin is biased.

First, we need to write down the null and alternative hypotheses. In this case

The important thing to note here is that we only need a one-tailed test as the alternative hypothesis says “in favour of tails”. A two-tailed test would be the result of an alternative hypothesis saying “The coin is biased”.

We need to calculate more than just the probability that it lands on heads $6$ times. If it landed on heads fewer than $6$ times, that would be even more evidence that the coin is biased in favour of tails. Consequently we need to add up the probability of it landing on heads $1$ time, $2$ times, $\ldots$ all the way up to $6$ times. Although a calculation is possible, it is much quicker to use the cumulative binomial distribution table. This gives $\mathrm{P}[X\leq 6] = 0.058$.

We are asked to perform the test at a $5$% significance level. This means, if there is less than $5$% chance of getting less than or equal to $6$ heads then it is so unlikely that we have sufficient evidence to claim the coin is biased in favour of tails. Now note that our $p$-value $0.058>0.05$ so we do not reject the null hypothesis. We don't have sufficient evidence to claim the coin is biased.

But what if the coin had landed on heads just $5$ times? Again we need to read from the cumulative tables for the binomial distribution which shows $\mathrm{P}[X\leq 5] = 0.021$, so we would have had to reject the null hypothesis and accept the alternative hypothesis. So the point at which we switch from accepting the null hypothesis to rejecting it is when we obtain $5$ heads. This means that $5$ is the critical value .

Selecting a Hypothesis Test

Binomial Hypothesis Testing ( Edexcel A Level Maths: Statistics )

Revision note.

Amber

Binomial Hypothesis Testing

How is a hypothesis test carried out with the binomial distribution.

  • The population parameter being tested will be the probability, p   in a binomial distribution B(n , p)
  • A hypothesis test is used when the assumed probability is questioned
  • Make sure you clearly define p before writing the hypotheses
  • The null hypothesis will always be H 0  : p = ...
  • The alternative hypothesis will depend on if it is a one-tailed or two-tailed test
  • The alternative hypothesis, H 1 will be H 1 : p > ...  or   H 1 : p < ...  
  • The alternative hypothesis,  H 1 will be H 1 : p ≠ ...  
  • To carry out a hypothesis test with the binomial distribution, the test statistic will be the number of successes in a defined number of trials
  • When defining the test statistic, remember that the value of p   is being tested, so this should be written as p in the original definition, followed by the null hypothesis stating the assumed value of p
  • The binomial distribution will be used to calculate the probability of the test statistic taking the observed value or a more extreme value
  • either calculating the probability of the test statistic taking the observed or a more extreme value ( p – value ) and comparing this with the significance level
  • Finding the critical region can be more useful for considering more than one observed value or for further testing

How is the critical value found in a hypothesis test with the binomial distribution?

  • The binomial distribution is a discrete distribution so the probability of the observed value being within the critical region, given a true null hypothesis may be less than the significance level
  • This is the actual significance level and is the probability of incorrectly rejecting the null hypothesis
  • Use the tables of the binomial distribution or your calculator to find the first value for which the probability of that or a more extreme value is less than half of the given significance level in both the upper and lower tails
  • Often one of the critical regions will be much bigger than the other

What steps should I follow when carrying out a hypothesis test with the binomial distribution?

  • Step 1. Define the probability, p
  • Step 2. Write the null and alternative hypotheses clearly using the form

H 0 : p = ...

H 1 : p = ...

  • Step 4. Calculate either the critical value(s) or the p – value for the test
  • Step 5. Compare the observed value of the test statistic with the critical value(s) or the p - value with the significance level
  • Step 6. Decide whether there is enough evidence to reject H 0 or whether it has to be accepted
  • Step 7. Write a conclusion in context

Worked example

Jacques, a breadmaker, claims that more than 80% of people that shop in a particular supermarket buy his brand of bread.  Jacques takes a random sample of 100 customers that have purchased bread and asks them which brand of bread they have purchased.  He records that 86 of them had purchased his brand of bread.  Test, at the 10% level of significance, whether Jacques’ claim is justified.

5-2-2-binomial-hypothesis-testing-we-solution-part-1

  • Make sure you are careful with the inequalities when finding critical values from the binomial tables or from your calculator.

You've read 0 of your 0 free revision notes

Get unlimited access.

to absolutely everything:

  • Downloadable PDFs
  • Unlimited Revision Notes
  • Topic Questions
  • Past Papers
  • Model Answers
  • Videos (Maths and Science)

Join the 100,000 + Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Author: Amber

Amber gained a first class degree in Mathematics & Meteorology from the University of Reading before training to become a teacher. She is passionate about teaching, having spent 8 years teaching GCSE and A Level Mathematics both in the UK and internationally. Amber loves creating bright and informative resources to help students reach their potential.

Binomial test

The binomial test is a hypothesis test used when there is a categorical variable with two expressions, e.g., gender with "male" and "female". The binomial test can then check whether the frequency distribution of the variable corresponds to an expected distribution, e.g.:

  • Men and women are equally represented.
  • The proportion of women is 54%.

This is a special case when you want to test whether the frequency distribution of the variables is random or not. In this case, the probability of occurrence is set to 50%.

The binomial test can therefore be used to test whether or not the frequency distribution of a sample is the same as that of the population.

The binomial test checks whether the frequency distribution of a variable with two values/categories in the sample corresponds to the distribution in the population.

Hypotheses in binomial test

The hypothesis of the binomial test results in the one tailed case to

  • Null hypothesis: The frequency distribution of the sample corresponds to that of the population.
  • Alternative hypothesis: The frequency distribution of the sample does not correspond to that of the population.

Thus, the non-directional hypothesis only tests whether there is a difference or not, but not in which direction this difference goes.

In the two sided case, the aim is to investigate whether the probability of occurrence of an expression in the sample is greater or less than a given or true percentage.

In this case, an expression is defined as "success" and it is checked whether the true "probability of success" is smaller or larger than that in the sample.

The alternative hypothesis then results in:

  • Alternative hypothesis: True probability of success is smaller/larger than specified value

Binomial test calculation

To calculate a binomial test you need the sample size, the number of cases that are positive of it, and the probability of occurrence in the population.

Alternative hypothesis p
True probability of success is less than 0.35
True probability of success is not equal to 0.35
True probability of success is greater than 0.35

Binomial test example

A possible example for a binomial test would be the question whether the gender ratio in the specialization marketing at the university XY differs significantly from that of all business students at the university XY (population).

Listed below are the students majoring in marketing; women make up 55% of the total business degree program.

Marketing student Gender
1 female
2 male
3 female
4 female
5 female
6 male
7 female
8 male
9 female
10 female

Binomial test with DATAtab:

Calculate the example in the statistics calculator. Simply add the upper table including the first row into the hypothesis test calculator .

DATAtab gives you the following result for this example data:

Binomial test example

Interpretation of a Binomial Test

With an expected test value of 55%, the p-value is 0.528. This means that the p-value is above the signification level of 5% and the result is therefore not significant. Consequently, the null hypothesis must not be rejected. In terms of content, this means that the gender ratio of the marketing specialization (=sample) does not differ significantly from that of all business administration students at XY University (=population).

Statistics made easy

  • many illustrative examples
  • ideal for exams and theses
  • statistics made easy on 412 pages
  • 5rd revised edition (April 2024)
  • Only 7.99 €

Datatab

"Super simple written"

"It could not be simpler"

"So many helpful examples"

Statistics Calculator

Cite DATAtab: DATAtab Team (2024). DATAtab: Online Statistics Calculator. DATAtab e.U. Graz, Austria. URL https://datatab.net

4.3 Binomial Distribution

There are three characteristics of a binomial experiment.

  • There are a fixed number of trials. Think of trials as repetitions of an experiment. The letter n denotes the number of trials.
  • There are only two possible outcomes, called "success" and "failure," for each trial. The letter p denotes the probability of a success on one trial, and q denotes the probability of a failure on one trial. p + q = 1.
  • The n trials are independent and are repeated using identical conditions. Because the n trials are independent, the outcome of one trial does not help in predicting the outcome of another trial. Another way of saying this is that for each individual trial, the probability, p , of a success and probability, q , of a failure remain the same. For example, randomly guessing at a true-false statistics question has only two outcomes. If a success is guessing correctly, then a failure is guessing incorrectly. Suppose Joe always guesses correctly on any statistics true-false question with probability p = 0.6. Then, q = 0.4. This means that for every true-false statistics question Joe answers, his probability of success ( p = 0.6) and his probability of failure ( q = 0.4) remain the same.

The outcomes of a binomial experiment fit a binomial probability distribution . The random variable X = the number of successes obtained in the n independent trials.

The mean, μ , and variance, σ 2 , for the binomial probability distribution are μ = np and σ 2 = npq . The standard deviation, σ , is then σ = n p q n p q .

Any experiment that has characteristics two and three and where n = 1 is called a Bernoulli Trial (named after Jacob Bernoulli who, in the late 1600s, studied them extensively). A binomial experiment takes place when the number of successes is counted in one or more Bernoulli Trials.

Example 4.9

At ABC College, the withdrawal rate from an elementary physics course is 30% for any given term. This implies that, for any given term, 70% of the students stay in the class for the entire term. A "success" could be defined as an individual who withdrew. The random variable X = the number of students who withdraw from the randomly selected elementary physics class.

The state health board is concerned about the amount of fruit available in school lunches. Forty-eight percent of schools in the state offer fruit in their lunches every day. This implies that 52% do not. What would a "success" be in this case?

Example 4.10

Suppose you play a game that you can only either win or lose. The probability that you win any game is 55%, and the probability that you lose is 45%. Each game you play is independent. If you play the game 20 times, write the function that describes the probability that you win 15 of the 20 times. Here, if you define X as the number of wins, then X takes on the values 0, 1, 2, 3, ..., 20. The probability of a success is p = 0.55. The probability of a failure is q = 0.45. The number of trials is n = 20. The probability question can be stated mathematically as P ( x = 15).

Try It 4.10

A trainer is teaching a rescued dolphin to catch live fish before returning it to the wild. The probability that the dolphin successfully catches a fish is 35%, and the probability that the dolphin does not successfully catch the fish is 65%. Out of 20 attempts, you want to find the probability that the dolphin succeeds 12 times. State the probability question mathematically.

Example 4.11

A coin is has been altered to weight the outcome from 0.5 to 0.25 and flipped 5 times. Each flip is independent. What is the probability of getting more than 3 heads? Let X = the number of heads in 5 flips of the fair coin. X takes on the values 0, 1, 2, 3, 4, 5. Since the coin is altered to result in p = 0.25, q is 0.75. The number of trials is n = 5. State the probability question mathematically.

First develop fully the probability density function and graph the probability density function. With the fully developed probability density function we can simply read the solution to the question P x > 3 P x > 3 heads. P x > 3 = P x = 4 + P x = 5 = 0 . 0146 + 0 . 0007 = 0 . 0153 . P x > 3 = P x = 4 + P x = 5 = 0 . 0146 + 0 . 0007 = 0 . 0153 . We have added the two individual probabilities because of the addition rule from Probability Topics .

Figure 4.2 also allows us to see the link between the probability density function and probability and area. We also see in Figure 4.2 the skew of the binomial distribution when p is not equal to 0.5. In Figure 4.2 the distribution is skewed right as a result of μ = n p = 1 . 25 μ = n p = 1 . 25 because p = 0 . 25 p = 0 . 25 .

Try It 4.11

A fair, six-sided die is rolled ten times. Each roll is independent. You want to find the probability of rolling a one more than three times. State the probability question mathematically.

Example 4.12

Approximately 70% of statistics students do their homework in time for it to be collected and graded. Each student does homework independently. In a statistics class of 50 students, what is the probability that at least 40 will do their homework on time? Students are selected randomly.

a. This is a binomial problem because there is only a success or a __________, there are a fixed number of trials, and the probability of a success is 0.70 for each trial.

b. If we are interested in the number of students who do their homework on time, then how do we define X ?

c. What values does x take on?

d. What is a "failure," in words?

e. If p + q = 1, then what is q ?

f. The words "at least" translate as what kind of inequality for the probability question P ( x ____ 40).

b. X = the number of statistics students who do their homework on time

c. 0, 1, 2, …, 50

d. Failure is defined as a student who does not complete their homework on time.

The probability of a success is p = 0.70. The number of trials is n = 50.

e. q = 0.30

f. greater than or equal to (≥) The probability question is P ( x ≥ 40).

Try It 4.12

Sixty-five percent of people pass the state driver’s exam on the first try. A group of 50 individuals who have taken the driver’s exam is randomly selected. Give two reasons why this is a binomial problem.

Notation for the Binomial: B = Binomial Probability Distribution Function

X ~ B ( n , p )

Read this as " X is a random variable with a binomial distribution." The parameters are n and p ; n = number of trials, p = probability of a success on each trial.

Example 4.13

It has been stated that about 41% of adult workers have a high school diploma but do not pursue any further education. If 20 adult workers are randomly selected, find the probability that at most 12 of them have a high school diploma but do not pursue any further education. How many adult workers do you expect to have a high school diploma but do not pursue any further education?

Let X = the number of workers who have a high school diploma but do not pursue any further education.

X takes on the values 0, 1, 2, ..., 20 where n = 20, p = 0.41, and q = 1 – 0.41 = 0.59. X ~ B (20, 0.41)

Find P ( x ≤ 12). P ( x ≤ 12) = 0.9738. (calculator or computer)

Using the TI-83, 83+, 84, 84+ Calculator

Go into 2 nd DISTR. The syntax for the instructions are as follows:

To calculate ( x = value): binompdf( n , p , number) if "number" is left out, the result is the binomial probability table. To calculate P ( x ≤ value): binomcdf( n , p , number) if "number" is left out, the result is the cumulative binomial probability table. For this problem: After you are in 2 nd DISTR , arrow down to binomcdf . Press ENTER . Enter 20,0.41,12). The result is P ( x ≤ 12) = 0.9738.

If you want to find P ( x = 12), use the pdf (binompdf). If you want to find P ( x > 12), use 1 - binomcdf(20,0.41,12).

The probability that at most 12 workers have a high school diploma but do not pursue any further education is 0.9738.

The graph of X ~ B (20, 0.41) is as follows:

The y -axis contains the probability of x , where X = the number of workers who have only a high school diploma.

The number of adult workers that you expect to have a high school diploma but not pursue any further education is the mean, μ = np = (20)(0.41) = 8.2.

The formula for the variance is σ 2 = npq . The standard deviation is σ = n p q n p q . σ = ( 20 ) ( 0.41 ) ( 0.59 ) ( 20 ) ( 0.41 ) ( 0.59 ) = 2.20.

Try It 4.13

About 32% of students participate in a community volunteer program outside of school. If 30 students are selected at random, find the probability that at most 14 of them participate in a community volunteer program outside of school. Use the TI-83+ or TI-84 calculator to find the answer.

Example 4.14

In the 2013 Jerry’s Artarama art supplies catalog, there are 560 pages. Eight of the pages feature signature artists. Suppose we randomly sample 100 pages. Let X = the number of pages that feature signature artists.

  • What values does x take on?
  • the probability that two pages feature signature artists
  • the probability that at most six pages feature signature artists
  • the probability that more than three pages feature signature artists.
  • Using the formulas, calculate the (i) mean and (ii) standard deviation.
  • x = 0, 1, 2, 3, 4, 5, 6, 7, 8
  • P ( x = 2) = binompdf ( 100 , 8 560 , 2 ) ( 100 , 8 560 , 2 ) = 0.2466
  • P ( x ≤ 6) = binomcdf ( 100 , 8 560 , 6 ) ( 100 , 8 560 , 6 ) = 0.9994
  • P ( x > 3) = 1 – P ( x ≤ 3) = 1 – binomcdf ( 100 , 8 560 , 3 ) ( 100 , 8 560 , 3 ) = 1 – 0.9443 = 0.0557
  • Mean = np = (100) ( 8 560 ) ( 8 560 ) = 800 560 800 560 ≈ 1.4286
  • Standard Deviation = n p q n p q = ( 100 ) ( 8 560 ) ( 552 560 ) ( 100 ) ( 8 560 ) ( 552 560 ) ≈ 1.1867

Try It 4.14

According to a Gallup poll, 60% of American adults prefer saving over spending. Let X = the number of American adults out of a random sample of 50 who prefer saving to spending.

  • What is the probability distribution for X ?
  • the probability that 25 adults in the sample prefer saving over spending
  • the probability that at most 20 adults prefer saving
  • the probability that more than 30 adults prefer saving
  • Using the formulas, calculate the (i) mean and (ii) standard deviation of X .

Example 4.15

The lifetime risk of developing cancer is about one in 67 (1.5%). Suppose we randomly sample 200 people. Let X = the number of people who will develop cancer.

  • Use your calculator to find the probability that at most eight people develop cancer
  • Is it more likely that five or six people will develop cancer? Justify your answer numerically.
  • X   ~   B 200 , 0 . 015 X   ~   B 200 , 0 . 015
  • Mean = n p = 200 0 . 015   = 3 Mean = n p = 200 0 . 015   = 3 Standard   Deviation = n p q = 200 ( 0 . 015 ) ( 0 . 985 ) = 1 . 719 Standard   Deviation = n p q = 200 ( 0 . 015 ) ( 0 . 985 ) = 1 . 719
  • P x ≤ 8   = 0 . 9965 P x ≤ 8   = 0 . 9965
  • The probability that five people develop cancer is 0.1011. The probability that six people develop cancer is 0.0500.

Try It 4.15

During a certain NBA season, a player for the Los Angeles Clippers had the highest field goal completion rate in the league. This player scored with 61.3% of his shots. Suppose you choose a random sample of 80 shots made by this player during the season. Let X = the number of shots that scored points.

  • Use your calculator to find the probability that this player scored with 60 of these shots.
  • Find the probability that this player scored with more than 50 of these shots.

Example 4.16

The following example illustrates a problem that is not binomial. It violates the condition of independence. ABC College has a student advisory committee made up of ten staff members and six students. The committee wishes to choose a chairperson and a recorder. What is the probability that the chairperson and recorder are both students? The names of all committee members are put into a box, and two names are drawn without replacement . The first name drawn determines the chairperson and the second name the recorder. There are two trials. However, the trials are not independent because the outcome of the first trial affects the outcome of the second trial. The probability of a student on the first draw is 6 16 6 16 . The probability of a student on the second draw is 5 15 5 15 , when the first draw selects a student. The probability is 6 15 6 15 , when the first draw selects a staff member. The probability of drawing a student's name changes for each of the trials and, therefore, violates the condition of independence.

Try It 4.16

A lacrosse team is selecting a captain. The names of all the seniors are put into a hat, and the first three that are drawn will be the captains. The names are not replaced once they are drawn (one person cannot be two captains). You want to see if the captains all play the same position. State whether this is binomial or not and state why.

This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution License and you must attribute OpenStax.

Access for free at https://openstax.org/books/introductory-statistics-2e/pages/1-introduction
  • Authors: Barbara Illowsky, Susan Dean
  • Publisher/website: OpenStax
  • Book title: Introductory Statistics 2e
  • Publication date: Dec 13, 2023
  • Location: Houston, Texas
  • Book URL: https://openstax.org/books/introductory-statistics-2e/pages/1-introduction
  • Section URL: https://openstax.org/books/introductory-statistics-2e/pages/4-3-binomial-distribution

© Dec 6, 2023 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.

Treasure chest

Numbers & Quantities

Statistics and Probability

Statistics & Probability

Functions

More Learning Tools

Encyclopedia volume with math symbols on pages

Encyclopedia

Yellow math study tips lightbulb

Pen & Paper exercises

hypothesis test of binomial distribution

Excel / GeoGebra recipes

Bespectacled math expert wearing a purple tie

Tutor-on-Demand

All math

Junior Math

Multiplication Master

Multiplication Master

Treasure Trail

Treasure Trail

Wind Surfer

Wind Surfer

Stack n´load

Stack n´load

Language: English

How to Do Hypothesis Testing with Binomial Distribution

A hypothesis test has the objective of testing different results against each other. You use them to check a result against something you already believe is true. In a hypothesis test, you’re checking if the new alternative hypothesis  H A would challenge and replace the already existing null hypothesis  H 0 .

Hypothesis tests are either one-sided or two-sided. In a one-sided test, the alternative hypothesis is left-sided with p < p 0 or right-sided with p > p 0 . In a two-sided test, the alternative hypothesis is p ≠ p 0 . In all three cases, p 0 is the pre-existing probability of what you’re comparing, and p is the probability you are going to find.

Note! In hypothesis testing, you calculate the alternative hypothesis to say something about the null hypothesis.

Hypothesis Testing Binomial Distribution

For example, you would have a reason to believe that a high observed value of p , makes the alternative hypothesis H a : p > p 0 seem reasonable.

There is a drug on the market that you know cures 8 5 % of all patients. A company has come up with a new drug they believe is better than what is already on the market. This new drug has cured 92 of 103 patients in tests. Determine if the new drug is really better than the old one.

This is a classic case of hypothesis testing by binomial distribution. You now follow the recipe above to answer the task and select 5 % level of significance since it is not a question of medication for a serious illness.

The alternative hypothesis in this case is that the new drug is better. The reason for this is that you only need to know if you are going to approve for sale and thus the new drug must be better:

This result indicates that there is a 1 3 . 6 % chance that more than 92 patients would be cured with the old medicine.

so H 0 cannot be rejected. The new drug does not enter the market.

If the p value had been less than the level of significance, that would mean that the new drug represented by the alternative hypothesis is better, and that you are sure of this with statistical significance.

White arrow pointing to the right

OML Search

Binomial Distribution: Hypothesis Testing

Mathway Calculator Widget

We welcome your feedback, comments and questions about this site or page. Please submit your feedback or enquiries via our Feedback page.

Library homepage

  • school Campus Bookshelves
  • menu_book Bookshelves
  • perm_media Learning Objects
  • login Login
  • how_to_reg Request Instructor Account
  • hub Instructor Commons

Margin Size

  • Download Page (PDF)
  • Download Full Book (PDF)
  • Periodic Table
  • Physics Constants
  • Scientific Calculator
  • Reference & Cite
  • Tools expand_more
  • Readability

selected template will load here

This action is not available.

Statistics LibreTexts

8.1.3: Distribution Needed for Hypothesis Testing

  • Last updated
  • Save as PDF
  • Page ID 10975

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\( \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{\kernel}{\mathrm{null}\,}\)

\( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\)

\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\)

\( \newcommand{\norm}[1]{\| #1 \|}\)

\( \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}}}} \)

Earlier in the course, we discussed sampling distributions. Particular distributions are associated with hypothesis testing. Perform tests of a population mean using a normal distribution or a Student's \(t\)-distribution. (Remember, use a Student's \(t\)-distribution when the population standard deviation is unknown and the distribution of the sample mean is approximately normal.) We perform tests of a population proportion using a normal distribution (usually \(n\) is large or the sample size is large).

If you are testing a single population mean, the distribution for the test is for means :

\[\bar{X} \sim N\left(\mu_{x}, \frac{\sigma_{x}}{\sqrt{n}}\right)\]

The population parameter is \(\mu\). The estimated value (point estimate) for \(\mu\) is \(\bar{x}\), the sample mean.

If you are testing a single population proportion, the distribution for the test is for proportions or percentages:

\[P' \sim N\left(p, \sqrt{\frac{p-q}{n}}\right)\]

The population parameter is \(p\). The estimated value (point estimate) for \(p\) is \(p′\). \(p' = \frac{x}{n}\) where \(x\) is the number of successes and n is the sample size.

Assumptions

When you perform a hypothesis test of a single population mean \(\mu\) using a Student's \(t\)-distribution (often called a \(t\)-test), there are fundamental assumptions that need to be met in order for the test to work properly. Your data should be a simple random sample that comes from a population that is approximately normally distributed. You use the sample standard deviation to approximate the population standard deviation. (Note that if the sample size is sufficiently large, a \(t\)-test will work even if the population is not approximately normally distributed).

When you perform a hypothesis test of a single population mean \(\mu\) using a normal distribution (often called a \(z\)-test), you take a simple random sample from the population. The population you are testing is normally distributed or your sample size is sufficiently large. You know the value of the population standard deviation which, in reality, is rarely known.

When you perform a hypothesis test of a single population proportion \(p\), you take a simple random sample from the population. You must meet the conditions for a binomial distribution which are: there are a certain number \(n\) of independent trials, the outcomes of any trial are success or failure, and each trial has the same probability of a success \(p\). The shape of the binomial distribution needs to be similar to the shape of the normal distribution. To ensure this, the quantities \(np\) and \(nq\) must both be greater than five \((np > 5\) and \(nq > 5)\). Then the binomial distribution of a sample (estimated) proportion can be approximated by the normal distribution with \(\mu = p\) and \(\sigma = \sqrt{\frac{pq}{n}}\). Remember that \(q = 1 – p\).

In order for a hypothesis test’s results to be generalized to a population, certain requirements must be satisfied.

When testing for a single population mean:

  • A Student's \(t\)-test should be used if the data come from a simple, random sample and the population is approximately normally distributed, or the sample size is large, with an unknown standard deviation.
  • The normal test will work if the data come from a simple, random sample and the population is approximately normally distributed, or the sample size is large, with a known standard deviation.

When testing a single population proportion use a normal test for a single population proportion if the data comes from a simple, random sample, fill the requirements for a binomial distribution, and the mean number of successes and the mean number of failures satisfy the conditions: \(np > 5\) and \(nq > 5\) where \(n\) is the sample size, \(p\) is the probability of a success, and \(q\) is the probability of a failure.

Formula Review

If there is no given preconceived \(\alpha\), then use \(\alpha = 0.05\).

Types of Hypothesis Tests

  • Single population mean, known population variance (or standard deviation): Normal test .
  • Single population mean, unknown population variance (or standard deviation): Student's \(t\)-test .
  • Single population proportion: Normal test .
  • For a single population mean , we may use a normal distribution with the following mean and standard deviation. Means: \(\mu = \mu_{\bar{x}}\) and \(\\sigma_{\bar{x}} = \frac{\sigma_{x}}{\sqrt{n}}\)
  • A single population proportion , we may use a normal distribution with the following mean and standard deviation. Proportions: \(\mu = p\) and \(\sigma = \sqrt{\frac{pq}{n}}\).
  • It is continuous and assumes any real values.
  • The pdf is symmetrical about its mean of zero. However, it is more spread out and flatter at the apex than the normal distribution.
  • It approaches the standard normal distribution as \(n\) gets larger.
  • There is a "family" of \(t\)-distributions: every representative of the family is completely defined by the number of degrees of freedom which is one less than the number of data items.

Hypothesis Testing Using the Binomial Distribution

  • First Online: 04 June 2021

Cite this chapter

hypothesis test of binomial distribution

  • Alese Wooditch 6 ,
  • Nicole J. Johnson 6 ,
  • Reka Solymosi 7 ,
  • Juanjo Medina Ariza 8 &
  • Samuel Langton 9  

783 Accesses

Many people involved in criminology and criminal justice research spend time making predictions about populations in the real world. These predictions tend to be based on a theoretical framework and are formally stated as hypotheses in order to answer a specific research question. Using inferential statistics (see Chap. 6 ), we can test to what extent our data support these hypotheses and provide empirical evidence to support (or reject) our expectations in R . This chapter uses a simulated dataset of results from a crime reduction intervention for at-risk youth to explore how the binomial distribution allows us to generalize from a sample of 100 participants in a study to the wider population.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
  • Available as EPUB and PDF
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
  • Durable hardcover edition

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Agresti, A., & Coull, B. A. (1998). Approximate is better than “exact” for interval estimation of binomial proportions. The American Statistician, 52 (2), 119–126.

Google Scholar  

Brown, L. D., Cai, T. T., & DasGupta, A. (2001). Interval estimation for a binomial proportion. Statistical Science, 16 (2), 101–117.

Article   Google Scholar  

Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22 (158), 209–212.

Download references

Author information

Authors and affiliations.

Department of Criminal Justice, Temple University, Philadelphia, PA, USA

Alese Wooditch & Nicole J. Johnson

School of Social Sciences, University of Manchester, Manchester, UK

Reka Solymosi

Department of Criminal Law and Crime Science, School of Law, University of Seville, Seville, Spain

Juanjo Medina Ariza

Netherlands Institute for the Study of Crime and Law Enforcement, Amsterdam, The Netherlands

Samuel Langton

You can also search for this author in PubMed   Google Scholar

The probability or sampling distribution for an event that has only two possible outcomes.

A research hypothesis that indicates a specific type of outcome by specifying the nature of the relationship that is expected.

The extent to which a study sample is reflective of the population from which it is drawn. A study is said to have high external validity when the sample used is representative of the population to which inferences are made.

A research hypothesis that does not indicate a specific type of outcome, stating only that there is a relationship or a difference.

Tests that do not make an assumption about the distribution of the population, also called distribution-free tests.

A statement that reduces the research question to a simple assertion to be tested by the researcher. The null hypothesis normally suggests that there is no relationship or no difference.

Tests that make an assumption about the shape of the population distribution.

Also known as alpha error and false-positive. The mistake made when a researcher rejects the null hypothesis on the basis of a sample statistic (i.e., claiming that there is a relationship) when in fact the null hypothesis is true (i.e., there is actually no such relationship in the population).

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Wooditch, A., Johnson, N.J., Solymosi, R., Medina Ariza, J., Langton, S. (2021). Hypothesis Testing Using the Binomial Distribution. In: A Beginner’s Guide to Statistics for Criminology and Criminal Justice Using R. Springer, Cham. https://doi.org/10.1007/978-3-030-50625-4_8

Download citation

DOI : https://doi.org/10.1007/978-3-030-50625-4_8

Published : 04 June 2021

Publisher Name : Springer, Cham

Print ISBN : 978-3-030-50624-7

Online ISBN : 978-3-030-50625-4

eBook Packages : Law and Criminology Law and Criminology (R0)

Share this chapter

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

  • Publish with us

Policies and ethics

  • Find a journal
  • Track your research

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Test if two binomial distributions are statistically different from each other

I have three groups of data, each with a binomial distribution (i.e. each group has elements that are either success or failure). I do not have a predicted probability of success, but instead can only rely on the success rate of each as an approximation for the true success rate. I have only found this question , which is close but does not seem to exactly deal with the this scenario.

To simplify down the test, let's just say that I have 2 groups (3 can be extended from this base case).

Group Trials $n_i$ Successes $k_i$ Percentage $p_i$
Group 1 2455 1556 63.4%
Group 2 2730 1671 61.2%

I don't have an expected success probability, only what I know from the samples.

The success rate of each of the sample is fairly close. However my sample sizes are also quite large. If I check the CDF of the binomial distribution to see how different it is from the first (where I'm assuming the first is the null test) I get a very small probability that the second could be achieved.

1-BINOM.DIST(1556,2455,61.2%,TRUE) = 0.012

However, this does not take into account any variance of the first result, it just assumes the first result is the test probability.

Is there a better way to test if these two samples of data are actually statistically different from one another?

  • statistical-significance
  • binomial-distribution
  • bernoulli-distribution

kjetil b halvorsen's user avatar

  • $\begingroup$ Another question I came across that didn't really help much: stats.stackexchange.com/questions/82059/… $\endgroup$ –  Scott Aug 28, 2014 at 17:15
  • $\begingroup$ Does this question help? stats.stackexchange.com/questions/25299/… $\endgroup$ –  Eric Aug 28, 2014 at 17:32
  • 4 $\begingroup$ In R, you could use prop.test : prop.test(c(1556, 1671), c(2455, 2730)) . $\endgroup$ –  COOLSerdash Aug 28, 2014 at 17:48
  • 3 $\begingroup$ Could be done as a two-sample (binomial) proportions test, or a 2x2 chi-square $\endgroup$ –  Glen_b Aug 28, 2014 at 17:58
  • 4 $\begingroup$ Extending the base case from two groups to three could be problematic, because the tests will be interdependent: you will need a binomial version of ANOVA to handle that. $\endgroup$ –  whuber ♦ Mar 21, 2016 at 1:42

6 Answers 6

The solution is a simple google away: http://en.wikipedia.org/wiki/Statistical_hypothesis_testing

So you would like to test the following null hypothesis against the given alternative

$H_0:p_1=p_2$ versus $H_A:p_1\neq p_2$

So you just need to calculate the test statistic which is

$$z=\frac{\hat p_1-\hat p_2}{\sqrt{\hat p(1-\hat p)\left(\frac{1}{n_1}+\frac{1}{n_2}\right)}}$$

where $\hat p=\frac{n_1\hat p_1+n_2\hat p_2}{n_1+n_2}$ .

So now, in your problem, $\hat p_1=.634$ , $\hat p_2=.612$ , $n_1=2455$ and $n_2=2730.$

Once you calculate the test statistic, you just need to calculate the corresponding critical region value to compare your test statistic too. For example, if you are testing this hypothesis at the 95% confidence level then you need to compare the absolute value of your test statistic against the critical region value of $z_{\alpha/2}=1.96$ (for this two tailed test).

Now, if $|z|>z_{\alpha/2}$ then you may reject the null hypothesis, otherwise you must fail to reject the null hypothesis.

Well this solution works for the case when you are comparing two groups, but it does not generalize to the case where you want to compare 3 groups.

You could however use a Chi Squared test to test if all three groups have equal proportions as suggested by @Eric in his comment above: " Does this question help? stats.stackexchange.com/questions/25299/ … – Eric"

Community's user avatar

  • 14 $\begingroup$ Thanks @Dan. As many times with Google, knowing the right term to search for is the first hurdle. I did take a look at the chi-squared test. The problem there, as with where I was first getting stuck, is that my expected calculation is based on the sample. I can't therefore provide an expected value, because my samples are used to determine that expected value. $\endgroup$ –  Scott Aug 28, 2014 at 18:33
  • 2 $\begingroup$ A related explanation of using this test can be found here: itl.nist.gov/div898/handbook/prc/section3/prc33.htm (currently, the Wikipedia page does not provide a walk-through example). $\endgroup$ –  wwwilliam Apr 18, 2017 at 3:29
  • 2 $\begingroup$ Can someone help me prove the standard deviation of the difference between the two binomial distributions, in other words prove that : $$\sqrt{\hat p (1-\hat p)(\frac{1}{n_1} + \frac{1}{n_2})} = \sqrt{\frac{\hat p_1 (1-\hat p_1)}{n_1} + \frac{\hat p_2 (1-\hat p_2)}{n_2}}$$ $\endgroup$ –  Tanguy Aug 4, 2018 at 9:36
  • 2 $\begingroup$ answer to my question can be found here: stats.stackexchange.com/questions/361015/… $\endgroup$ –  Tanguy Aug 8, 2018 at 10:22
  • 1 $\begingroup$ FYI, this test can be described as a "two-tailed two-proportion pooled z-test". The calculation is described in detail here: stattrek.com/hypothesis-test/difference-in-proportions.aspx $\endgroup$ –  user2739472 Sep 13, 2020 at 15:01

In R the answer is calculated as:

David Makovoz's user avatar

  • 20 $\begingroup$ Would you consider writing a little bit more than providing the R function? Naming the function does not help in understanding the problem and not everyone use R, so it would be no help for them. $\endgroup$ –  Tim Dec 8, 2014 at 13:52
  • 2 $\begingroup$ This is the most exact statistical answer, and works for small numbers of observations (see the following: itl.nist.gov/div898/handbook/prc/section3/prc33.htm ). $\endgroup$ –  Andrew Mao Mar 30, 2015 at 19:36
  • 1 $\begingroup$ Fishers exact test en.wikipedia.org/wiki/Fisher's_exact_test $\endgroup$ –  Keith May 22, 2015 at 23:59

Just a summary:

Dan and Abaumann's answers suggest testing under a binomial model where the null hypothesis is a unified single binomial model with its mean estimated from the empirical data. Their answers are correct in theory but they need approximation using normal distribution since the distribution of test statistic does not exactly follow Normal distribution. Therefore, it's only correct for a large sample size.

But David's answer is indicating a nonparametric test using Fisher's test.The information is here: https://en.wikipedia.org/wiki/Fisher%27s_exact_test And it can be applied to small sample sizes but hard to calculate for big sample sizes.

Which test to use and how much you trust your p-value is a mystery. But there are always biases in whichever test to choose.

Code42's user avatar

  • 2 $\begingroup$ Are you trying to suggest that sample sizes in the thousands, with likely parameter values near $1/2$, are not large for this purpose? $\endgroup$ –  whuber ♦ May 3, 2016 at 1:03
  • 1 $\begingroup$ For this case, I think you could use Dan's method but compute the p value in an exact way (binomial) and approxiamte way (normal Z>Φ−1(1−α/2)Z>Φ−1(1−α/2) and Z<Φ−1(α/2) ) to compare whether they are close enough. $\endgroup$ –  Code42 May 6, 2016 at 4:39
  • 1 $\begingroup$ +1 Not because sample sizes weren't large enough, but because the answer fits the title question and answers it for any sample size - therefore being useful for readers arriving here guided by title text (or Google) and having an smaller sample size in mind. $\endgroup$ –  Pere Jul 10, 2021 at 10:45

As suggested in other answers and comments, you can use an exact test that takes into account the origin of the data. Under the null hypothesis that the probability of success $\theta$ is the same in both experiments,

$$P \bigl(\begin{smallmatrix}k_1 & k_2 \\ n_1-k_1 & n_2-k_2\end{smallmatrix}\bigr) = \binom{n_1}{k_1}\binom{n_2}{k_2}\theta^{{k_1 + k_2}}\left({1-\theta}\right)^{{\left(n_1-k_1\right)+\left(n_2-k_2\right)}} $$ Notice that $P$ is not the p value, but the probability of this result under the null hypothesis. To calculate the p value, we need to consider all the cases whose $P$ is not higher than for our result. As noted in the question, the main problem is that we do not know the value of $\theta$ . This is why it is called a nuisance parameter.

Fisher's test solves this problem by making the experimental design conditional, meaning that the only contingency tables that are considered for the calculation are those where the sum of the number of successes is the same as in the example ( $1556 + 1671 = 3227$ ). This condition may not be in accordance with the experimental design, but it also means that we do not need to deal with the nuisance parameter.

There are also unconditional exact tests. For instance, Barnard's test estimates the most likely value of the nuisance parameter and directly uses the binomial distribution with that parameter. Obviously, the problem here is how to calculate $\theta$ , and there may be more than one answer for that. The original approach is to find the value of $\theta$ that maximizes $P$ . Here you can find an explanation of both tests.

I have recently uploaded a preprint that employs a similar strategy to that of Barnard's test. However, instead of estimating $\theta$ , this method (tentatively called m-test) considers every possible value of this parameter and integrates all the results. Using the same notation as in the question,

$P \bigl(\begin{smallmatrix}k_1 & k_2 \\ n_1-k_1 & n_2-k_2\end{smallmatrix}\bigr) = \binom{n_1}{k_1}\binom{n_2}{k_2}\int_{0}^{1}\theta^{{k_1 + k_2}}\left({1-\theta}\right)^{{\left(n_1-k_1\right)+\left(n_2-k_2\right)}}d\theta$

The calculation of the p value can be simplified using the properties of the integral, as shown in the article. Preliminary tests with Monte Carlo simulations suggest that the m-test is more powerful than the other extact tests at different significance levels. As a bonus, this test can be easily extended to more than two experiments, and also to more than two outcomes. The only limitation is in the speed, as many cases need to be considered. I have also prepared an R package to use the test ( https://github.com/vqf/mtest ). In this example,

In my computer, this takes about 20 seconds, whereas Barnard's test takes much longer.

vqf's user avatar

Original post: Dan's answer is actually incorrect, not to offend anyone. A z-test is used only if your data follows a standard normal distribution. In this case, your data follows a binomial distribution, therefore a use a chi-squared test if your sample is large or fisher's test if your sample is small.

Edit: My mistake, apologies to @Dan. A z-test is valid here if your variables are independent. If this assumption is not met or unknown, a z-test may be invalid.

Ryan's user avatar

  • 4 $\begingroup$ The "only if" part is an extreme position unlikely to be shared by many. No data actually follow a normal distribution. Few data actually behave as if drawn randomly and independently from a normal distribution. Nevertheless, z tests continue to be effective because the distributions of statistics (such as the difference of means) to which they apply can be extremely well approximated by normal distributions. In fact, the appeal to a $\chi^2$ test relies on the same asymptotic assumptions as a z test does! $\endgroup$ –  whuber ♦ Mar 21, 2016 at 1:44
  • $\begingroup$ If you believe in the CLT, then the normal distribution does commonly exist. $\endgroup$ –  Ryan Mar 21, 2016 at 2:49
  • 5 $\begingroup$ @Ryan Well, I believe in the CLT but it doesn't say anything about n=30 or n=300 or n=5000. You don't actually get normality unless you somehow manage to have infinite sample sizes, or you somehow started with normality. Questions about how close we are to normality when taking averages are not addressed by the CLT.. (We can consider those questions but we don't use the CLT to find out if the approximation is any good.) $\endgroup$ –  Glen_b Jul 26, 2016 at 5:12

Your test statistic is $Z = \frac{\hat{p_1}-\hat{p_2}}{\sqrt{\hat{p}(1-\hat{p})(1/n_1+1/n_2)}}$, where $\hat{p}=\frac{n_1\hat{p_1}+n_2\hat{p_2}}{n_1+n_2}$.

The critical regions are $Z > \Phi^{-1}(1-\alpha/2)$ and $Z<\Phi^{-1}(\alpha/2)$ for the two-tailed test with the usual adjustments for a one-tailed test.

abaumann's user avatar

Not the answer you're looking for? Browse other questions tagged statistical-significance binomial-distribution bernoulli-distribution excel or ask your own question .

Hot network questions.

  • What do humans do uniquely, that computers apparently will not be able to?
  • Build the first 6 letters of an Italian codice fiscale (tax identification number)
  • Can LLMs have intention?
  • Could a 200m diameter asteroid be put into a graveyard orbit and not be noticed by people on the ground?
  • How can/do I find the "main root" for wild grape vine in my yard?
  • What role does CaCl2 play in a gelation medium?
  • Are there any jobs that are forbidden by law to convicted felons?
  • Have I ruined my AC by running it with the outside cover on?
  • Why is killing even evil brahmins categorized as 'brahma hatya'?
  • Power series representation of 1/(2+x)
  • Is it rational for heterosexuals to be proud that they were born heterosexual?
  • What is the U.N. list of shame and how does it affect Israel which was recently added?
  • Added an element in forest
  • Is a porch light with integrated outlet safe / to code?
  • Clash between breakable tcolorbox with tikz externalize
  • Inductance after core saturation
  • How to Adjust Comparator Output Voltage for Circuit to Work at 3.3V Instead of 5V?
  • Divergence of light rays - parallel approximation
  • Is obeying the parallelogram law of vector addition sufficient to make a physical quantity qualify as a vector?
  • I'm looking for a series where there was a civilization in the Mediterranean basin, which got destroyed by the Atlantic breaking in
  • Advice on DIY Adjusting Rheem Water Heater Thermostat
  • Does it make sense for giants to use clubs or swords when fighting non-giants?
  • Calculate the volume of intersection sphere and cone using triple integral
  • Which program is used in this shot of the movie "The Wrong Woman"

hypothesis test of binomial distribution

Section 10.2: Hypothesis Tests for a Population Proportion

  • 10.1 The Language of Hypothesis Testing
  • 10.2 Hypothesis Tests for a Population Proportion
  • 10.3 Hypothesis Tests for a Population Mean
  • 10.4 Hypothesis Tests for a Population Standard Deviation
  • 10.5 Putting It Together: Which Method Do I Use?

By the end of this lesson, you will be able to...

  • explain the logic of hypothesis testing
  • test hypotheses about a population proportion
  • test hypotheses about a population proportion using the binomial probability distribution

For a quick overview of this section, watch this short video summary:

The Logic of Hypothesis Testing

Once we have our null and alternative hypotheses chosen, and our sample data collected, how do we choose whether or not to reject the null hypothesis? In a nutshell, it's this:

If the observed results are unlikely assuming that the null hypothesis is true, we say the result is statistically significant , and we reject the null hypothesis. In other words, the observed results are so unusual, that our original assumption in the null hypothesis must not have been correct.

There are generally three different methods for testing hypotheses:

  • the classical approach
  • confidence intervals

Because P -values are so much more widely used, we will be focusing on this method. You will be required to include P -values for your homework and exams. We will also frequently look at both P -values and confidence intervals to make sure the two methods align.

In general, we define the P -value this way:

The P -value is the probability of observing a sample statistic as extreme or more extreme than the one observed in the sample assuming that the null hypothesis is true.

The Sample Proportion

In Section 8.2, we learned about the distribution of the sample proportion, so let's do a quick review of that now.

We also learned some information about how the sample proportion is distributed:

Sampling Distribution of

For a random sample of size n such that n≤0.05N (in other words, the sample is less than 5% of the population),

So what we do is create a test statistic based on our sample, and then use a table or technology to find the probability of what we observed. Here are the details.

Testing Claims Regarding the Population Proportion Using P -Values

In this first section, we assume we are testing some claim about the population proportion. As usual, the following two conditions must be true:

  • np(1-p)≥10, and

Step 1 : State the null and alternative hypotheses.

H : p = p
H : p ≠ p
H : p = p
H : p < p
H : p = p
H : p > p

Step 2 : Decide on a level of significance, α , depending on the seriousness of making a Type I error. ( α will often be given as part of a test or homework question, but this will not be the case in the outside world.)

Step 4 : Determine the P -value.

Step 5 : Reject the null hypothesis if the P -value is less than the level of significance, α.

Step 6 : State the conclusion.

Calculating P -Values

Right-tailed tests.

right-tailed P-value

Left-Tailed Tests

left-tailed P-value

Two-Tailed Tests

In a two-tailed test, the P -value = 2P(Z > |z o |).

two-tailed p-value

It may seem odd to multiply the probability by two, since "or more extreme" seems to imply the area in the tail only. The reason why we do multiply by two is that even though the result was on one side, we didn't know before collecting the data , on which side it would be.

The Strength of the Evidence

Since the P -value represents the probability of observing our result or more extreme, the smaller the P -value, the more unusual our observation was. Another way to look at it is this:

The smaller the P -value, the stronger the evidence supporting the alternative hypothesis. We can use the following guideline:

  • P -value < 0.01: very strong evidence supporting the alternative hypothesis
  • 0.01 ≤ P -value < 0.05: strong evidence supporting the alternative hypothesis
  • 0.05 ≤ P -value < 0.1: some evidence supporting the alternative hypothesis
  • P -value ≥ 0.1: weak to no evidence supporting the alternative hypothesis

These values are not hard lines, of course, but they can give us a general idea of the strength of the evidence.

But wait! There is an important caveat here, which was mentioned earlier in the section about The Controversy Regarding Hypothesis Testing . The problem is that it's relatively easy to get a large p-value - just get a really large sample size! So the chart above is really with the caveat " assuming equal sample sizes in comparable studies , ... "

This isn't something every statistics text will mention, nor will every instructor mention, but it's important.

According to the Elgin Community College website , approximately 56% of ECC students are female. Suppose we wonder if the same proportion is true for math courses. If we collect a sample of 200 ECC students enrolled in math courses and find that 105 of them are female, do we have enough evidence at the 10% level of significance to say that the proportion of math students who are female is different from the general population?

Note: Be sure to check that the conditions for performing the hypothesis test are met.

[ reveal answer ]

Before we begin, we need to make sure that our sample is less than 5% of the population, and that np 0 (1-p 0 )≥10.

Since there are roughly 16,000 students at ECC (source: www.elgin.edu ), our sample of 200 is clearly less than 5% of the population. Also, np 0 (1-p 0 ) = 200(0.56)(1-0.56) = 49.28 > 10

Step 1 : H 0 : p = 0.56 H 1 : p ≠ 0.56

Step 2 : α = 0.1

Step 4 : P -value = 2•P(Z < -1.00) ≈ 0.3187 (Note that this is a 2-tailed test.)

Step 5 : Since P -value > α , we do not reject H 0 .

Step 6 : There is not enough evidence at the 5% level of significance to support the claim that the proportion of students in math courses who are female is different from the general population.

Hypothesis Testing Regarding p Using StatCrunch

> > > and H , then click .

> > > and H , then click .

* To get the counts, first create a frequency table. If you have a grouping variable, use a contingency table.

Consider the excerpt shown below (also used in Example 1 , in Section 9.3) from a poll conducted by Pew Research:

Stem cell, marijuana proposals lead in Mich. poll A recent poll shows voter support leading opposition for ballot proposals to loosen Michigan's restrictions on embryonic stem cell research and allow medical use of marijuana. The EPIC-MRA poll conducted for The Detroit News and television stations WXYZ, WILX, WOOD and WJRT found 50 percent of likely Michigan voters support the stem cell proposal , 32 percent against and 18 percent undecided. The telephone poll of 602 likely Michigan voters was conducted Sept. 22 through Wednesday. It has a margin of sampling error of plus or minus 4 percentage points. (Source: Associated Press )

Suppose we wonder if the percent of Elgin Community College students who support stem cell research is different from this. If 61 of 100 randomly selected ECC students support stem cell research, is there enough evidence at the 5% level of signficance to support our claim?

Since there are roughly 16,000 students at ECC (source: www.elgin.edu ), our sample of 100 is clearly less than 5% of the population. Also, np 0 (1-p 0 ) = 100(0.50)(1-0.50) = 25 > 10

Step 1 : H 0 : p = 0.5 H 1 : p ≠ 0.5

Step 2 : α = 0.05

Step 3 : We'll use StatCrunch.

Step 4 : Using StatCrunch:

StatCrunch calculation

Step 5 : Since P -value < α , we reject H 0 .

Step 6 : Based on this sample, there is enough evidence at the 5% level of significance to support the claim that the proportion of ECC students who support stem cell research is different from the Michigan poll.

One question you might have is, "What do we do if the conditions for the hypothesis test about p aren't met?" Great question!

A Binomial Refresher

The binomial probability distribution function.

The probability of obtaining x successes in n independent trials of a binomial experiment, where the probability of success is p, is given by

Where x = 0, 1, 2, ... , n

Using Technology to Calculate Binomial Probabilities

Here's a quick overview of the formulas for finding binomial probabilities in StatCrunch.

Click on > >

Enter n, p, the appropriate equality/inequality, and x. The figure below shows P(X≥3) if n=4 and p=0.25.

Hypothesis Testing Using the Binomial Distribution

Traditionally, about 70% of students in a particular Statistics course at ECC are successful. If only 15 students in a class of 28 randomly selected students are successful, is there enough evidence at the 5% level of significance to say that students of that particular instructor are successful at a rate less than 70%?

Step 1 : H 0 : p = 0.7 H 1 : p < 0.7

Step 4 : If we let X = the number of students who were successful, X follows the binomial distribution. For this example, n=28 and p=0.70, and we want P(X≤15). Using StatCrunch:

Step 5 : Since P -value < α (though it's very close), we reject H 0 .

Step 6 : Based on this sample, there is enough evidence at the 5% level of significance to support the claim that the proportion of students who are successful in this professor's classes are less than 70%. (Keep in mind that this assumes the students were randomly assigned to that class, which is never the case in reality!)

<< previous section | next section >>

Creative Commons License

Find Study Materials for

  • Explanations
  • Business Studies
  • Combined Science
  • Computer Science
  • Engineering
  • English literature
  • Environmental Science
  • Human Geography
  • Macroeconomics
  • Microeconomics
  • Social Studies
  • Browse all subjects
  • Textbook Solutions
  • Read our Magazine

Create Study Materials

  • Flashcards Create and find the best flashcards.
  • Notes Create notes faster than ever before.
  • Study Sets Everything you need for your studies in one place.
  • Study Plans Stop procrastinating with our smart planner features.
  • Binomial Hypothesis Test

When calculating probabilities using binomial expansions, we can calculate these probabilities  for an individual value (\(P(x = a)\))  or a cumulative value \(P(x<a), \space P(x\leq a), \space P(x\geq a)\) .

Binomial Hypothesis Test

Create learning materials about Binomial Hypothesis Test with our free learning app!

  • Instand access to millions of learning materials
  • Flashcards, notes, mock-exams and more
  • Everything you need to ace your exams
  • Applied Mathematics
  • Decision Maths
  • Discrete Mathematics
  • Logic and Functions
  • Mechanics Maths
  • Probability and Statistics
  • Bayesian Statistics
  • Bias in Experiments
  • Binomial Distribution
  • Biostatistics
  • Bivariate Data
  • Categorical Data Analysis
  • Categorical Variables
  • Causal Inference
  • Central Limit Theorem
  • Chi Square Test for Goodness of Fit
  • Chi Square Test for Homogeneity
  • Chi Square Test for Independence
  • Chi-Square Distribution
  • Cluster Analysis
  • Combining Random Variables
  • Comparing Data
  • Comparing Two Means Hypothesis Testing
  • Conditional Probability
  • Conducting A Study
  • Conducting a Survey
  • Conducting an Experiment
  • Confidence Interval for Population Mean
  • Confidence Interval for Population Proportion
  • Confidence Interval for Slope of Regression Line
  • Confidence Interval for the Difference of Two Means
  • Confidence Intervals
  • Correlation Math
  • Cox Regression
  • Cumulative Distribution Function
  • Cumulative Frequency
  • Data Analysis
  • Data Interpretation
  • Decision Theory
  • Degrees of Freedom
  • Discrete Random Variable
  • Discriminant Analysis
  • Distributions
  • Empirical Bayes Methods
  • Empirical Rule
  • Errors In Hypothesis Testing
  • Estimation Theory
  • Estimator Bias
  • Events (Probability)
  • Experimental Design
  • Factor Analysis
  • Frequency Polygons
  • Generalization and Conclusions
  • Geometric Distribution
  • Geostatistics
  • Hierarchical Modeling
  • Hypothesis Test for Correlation
  • Hypothesis Test for Regression Slope
  • Hypothesis Test of Two Population Proportions
  • Hypothesis Testing
  • Inference For Distributions Of Categorical Data
  • Inferences in Statistics
  • Item Response Theory
  • Kaplan-Meier Estimate
  • Kernel Density Estimation
  • Large Data Set
  • Lasso Regression
  • Latent Variable Models
  • Least Squares Linear Regression
  • Linear Interpolation
  • Linear Regression
  • Logistic Regression
  • Machine Learning
  • Mann-Whitney Test
  • Markov Chains
  • Mean and Variance of Poisson Distributions
  • Measures of Central Tendency
  • Methods of Data Collection
  • Mixed Models
  • Multilevel Modeling
  • Multivariate Analysis
  • Neyman-Pearson Lemma
  • Non-parametric Methods
  • Normal Distribution
  • Normal Distribution Hypothesis Test
  • Normal Distribution Percentile
  • Ordinal Regression
  • Paired T-Test
  • Parametric Methods
  • Path Analysis
  • Point Estimation
  • Poisson Regression
  • Principle Components Analysis
  • Probability
  • Probability Calculations
  • Probability Density Function
  • Probability Distribution
  • Probability Generating Function
  • Product Moment Correlation Coefficient
  • Quantile Regression
  • Quantitative Variables
  • Random Effects Model
  • Random Variables
  • Randomized Block Design
  • Regression Analysis
  • Residual Sum of Squares
  • Robust Statistics
  • Sample Mean
  • Sample Proportion
  • Sampling Distribution
  • Sampling Theory
  • Scatter Graphs
  • Sequential Analysis
  • Single Variable Data
  • Spearman's Rank Correlation
  • Spearman's Rank Correlation Coefficient
  • Standard Deviation
  • Standard Error
  • Standard Normal Distribution
  • Statistical Graphs
  • Statistical Inference
  • Statistical Measures
  • Stem and Leaf Graph
  • Stochastic Processes
  • Structural Equation Modeling
  • Sum of Independent Random Variables
  • Survey Bias
  • Survival Analysis
  • Survivor Function
  • T-distribution
  • The Power Function
  • Time Series Analysis
  • Transforming Random Variables
  • Tree Diagram
  • Two Categorical Variables
  • Two Quantitative Variables
  • Type I Error
  • Type II Error
  • Types of Data in Statistics
  • Variance for Binomial Distribution
  • Venn Diagrams
  • Wilcoxon Test
  • Zero-Inflated Models
  • Theoretical and Mathematical Physics

In hypothesis testing , we are testing as to whether or not these calculated probabilities can lead us to accept or reject a hypothesis.

We will be focusing on regions of binomial distribution ; therefore, we are looking at cumulative values.

Types of hypotheses

There are two main types of hypotheses:

The null hypothesis (H 0 ) is the hypothesis we assume happens, and it assumes there is no difference between certain characteristics of a population. Any difference is purely down to chance.

The alternative hypothesis (H 1 ) is the hypothesis we can try to prove using the data we have been given.

We can either:

Accept the null hypothesis OR

Reject the null hypothesis and accept the alternative hypothesis.

What are the steps to undertake a hypothesis test?

There are some key terms we need to understand before we look at the steps of hypothesis testing :

Critical value – this is the value where we go from accepting to rejecting the null hypothesis.

Critical region – the region where we are rejecting the null hypothesis.

Significance Level – a significance level is the level of accuracy we are measuring, and it is given as a percentage . When we find the probability of the critical value, it should be as close to the significance level as possible.

One-tailed test – the probability of the alternative hypothesis is either greater than or less than the probability of the null hypothesis.

Two-tailed test – the probability of the alternative hypothesis is just not equal to the probability of the null hypothesis.

So when we undertake a hypothesis test, generally speaking, these are the steps we use:

STEP 1 – Establish a null and alternative hypothesis, with relevant probabilities which will be stated in the question.

STEP 2 – Assign probabilities to our null and alternative hypotheses.

STEP 3 – Write out our binomial distribution .

STEP 4 – Calculate probabilities using binomial distribution. (Hint: To calculate our probabilities, we do not need to use our long-winded formula, but in the Casio Classwiz calculator, we can go to Menu -> Distribution -> Binomial CD and enter n as our number in the sample, p as our probability, and X as what we are trying to calculate).

STEP 5 – Check against significance level (whether this is greater than or less than the significance level).

STEP 6 – Accept or reject the null hypothesis.

Let's look at a few examples to explain what we are doing.

One-tailed test example

As stated above a one-tailed hypothesis test is one where the probability of the alternative hypothesis is either greater than or less than the null hypothesis.

A researcher is investigating whether people can identify the difference between Diet Coke and full-fat coke. He suspects that people are guessing. 20 people are selected at random, and 14 make a correct identification. He carries out a hypothesis test.

a) Briefly explain why the null hypothesis should be H 0 , with the probability p = 0.5 suggesting they have made the correct identification.

b) Complete the test at the 5% significance level.

)

\(\begin{align} H_0: p = 0.5 \\ H_1: p > 0.5\end{align}\)
\(X \sim B(20,0.5)\)
\(0.05765914916 > 0.05\)

Two-tailed test example

In a two-tailed test, the probability of our alternative hypothesis is just not equal to the probability of the null hypothesis.

A coffee shop provides free espresso refills. The probability that a randomly chosen customer uses these refills is stated to be 0.35. A random sample of 20 customers is chosen, and 9 of them have used the free refills.

Carry out a hypothesis test to a 5% significance level to see if the probability that a randomly chosen customer uses the refills is different to 0.35.

of people will use the free espresso refills.
\(\begin{align} H_0: p = 0.35 \\ H_1: p \ne 0.35 \end{align}\)

\(X \sim B(20,0.35)\)

So our key difference with two-tailed tests is that we compare the value to half the significance level rather than the actual significance level.

Critical values and critical regions

Remember from earlier critical values are the values in which we move from accepting to rejecting the null hypothesis. A binomial distribution is a discrete distribution; therefore, our value has to be an integer.

You have a large number of statistical tables in the formula booklet that can help us find these; however, these are inaccurate as they give us exact values not values for the discrete distribution.

Therefore the best way to find critical values and critical regions is to use a calculator with trial and error till we find an acceptable value:

STEP 1 - Plug in some random values until we get to a point where for two consecutive values, one probability is above the significance level, and one probability is below.

STEP 2 - The one with the probability below the significance level is the critical value.

STEP 3 - The critical region, is the region greater than or less than the critical value.

Let's look at this through a few examples.

Worked examples for critical values and critical regions

A mechanic is checking to see how many faulty bolts he has. He is told that 30% of the bolts are faulty. He has a sample of 25 bolts. He believes that less than 30% are faulty. Calculate the critical value and the critical region.

Let's use the above steps to help us out.

A teacher believes that 40% of the students watch TV for two hours a day. A student disagrees and believes that students watch either more or less than two hours. In a sample of 30 students, calculate the critical regions.

As this is a two-tailed test, there are two critical regions, one on the lower end and one on the higher end. Also, remember the probability we are comparing with is that of half the significance level.

\(\begin{align} H_0: p = 0.4 \\ H_1: p \ne 0.4 \end{align}\) \(\begin{align}&P(X \leq a): \\ &P(X \leq 5) = 0.005658796379 \\ &P(X \leq 6) = 0.01718302499 \\ &P(X \leq 7) = 0.0435241189 \end{align}\).

Binomial Hypothesis Test - Key takeaways

  • Hypothesis testing is the process of using binomial distribution to help us reject or accept null hypotheses.
  • A null hypothesis is what we assume to be happening.
  • If data disprove a null hypothesis, we must accept an alternative hypothesis.
  • We use binomial CD on the calculator to help us shortcut calculating the probability values.
  • The critical value is the value where we start rejecting the null hypothesis.
  • The critical region is the region either below or above the critical value.
  • Two-tailed tests contain two critical regions and critical values.

Flashcards in Binomial Hypothesis Test 8

What is a hypothesis test?

A hypothesis test is a test to see if a claim holds up, using probability calculations.

What is a null hypothesis?

A null hypothesis is what we assume to be true before conducting our hypothesis test.

What is an alternative hypothesis?

An alternative hypothesis is what we go to accept if we have rejected our null hypothesis.

What is a one-tailed test?

A one tailed test is a test where the probability of the alternative hypothesis can be either greater than or less than the probability of the null hypothesis.

What is a two-tailed test?

A two tailed test is a hypothesis test where the probability of the alternative hypothesis can be both greater than and less than the probability of the null hypothesis (simply the probability of the alternative hypothesis is not equal to that of the null hypothesis).

What is a significance level?

A significance level is the level we are testing to. The smaller the significance level, the more difficult it is to disprove the null hypothesis.

Binomial Hypothesis Test

Learn with 8 Binomial Hypothesis Test flashcards in the free Vaia app

We have 14,000 flashcards about Dynamic Landscapes.

Already have an account? Log in

Frequently Asked Questions about Binomial Hypothesis Test

How many samples do you need for the binomial hypothesis test?

There isn't a fixed number of samples, any sample number you are given you will use as n in X-B(n , p).

What is the null hypothesis for a binomial test?

The null hypothesis is what we assume is true before we conduct our hypothesis test.

What does a binomial test show?

It shows us the probability value is of undertaking a test, with fixed outcomes.

What is the p value in the binomial test?

The p value is the probability value of the null and alternative hypotheses.

Discover learning materials with the free Vaia app

1

Vaia is a globally recognized educational technology company, offering a holistic learning platform designed for students of all ages and educational levels. Our platform provides learning support for a wide range of subjects, including STEM, Social Sciences, and Languages and also helps students to successfully master various tests and exams worldwide, such as GCSE, A Level, SAT, ACT, Abitur, and more. We offer an extensive library of learning materials, including interactive flashcards, comprehensive textbook solutions, and detailed explanations. The cutting-edge technology and tools we provide help students create their own learning materials. StudySmarter’s content is not only expert-verified but also regularly updated to ensure accuracy and relevance.

Binomial Hypothesis Test

Vaia Editorial Team

Team Binomial Hypothesis Test Teachers

  • 11 minutes reading time
  • Checked by Vaia Editorial Team

Study anywhere. Anytime.Across all devices.

Create a free account to save this explanation..

Save explanations to your personalised space and access them anytime, anywhere!

By signing up, you agree to the Terms and Conditions and the Privacy Policy of Vaia.

Sign up to highlight and take notes. It’s 100% free.

Join over 22 million students in learning with our Vaia App

The first learning app that truly has everything you need to ace your exams in one place

  • Flashcards & Quizzes
  • AI Study Assistant
  • Study Planner
  • Smart Note-Taking

Join over 22 million students in learning with our Vaia App

Privacy Overview

Statology

Statistics Made Easy

How to Perform a Binomial Test in R

A  binomial test  compares a sample proportion to a hypothesized proportion. The test has the following null and alternative hypotheses:

H 0 : π = p (the population proportion π is equal to some value p)

H A : π ≠ p (the population proportion π is not equal to some value p)

The test can also be performed with a one-tailed alternative that the true population proportion is greater than or less than some value p.

To perform a binomial test in R, you can use the following function:

binom.test(x, n, p)
  • x: number of successes
  • n: number of trials
  • p: probability of success on a given trial

The following examples illustrate how to use this function in R to perform binomial tests.

Example 1: Two-tailed Binomial Test

You want to determine whether or not a die lands on the number “3” during 1/6 of the rolls so you roll the die 24 times and it lands on “3” a total of 9 times.  Perform a Binomial test to determine if the die actually lands on “3” during 1/6 of rolls.

The p-value of the test is  0.01176 . Since this is less than 0.05, we can reject the null hypothesis and conclude that there is evidence to say the die does  not  land on the number “3” during 1/6 of the rolls.

Example 2: Left-tailed Binomial Test

You want to determine whether or not a coin is less likely to land on heads compared to tails so you flip the coin 30 times and find that it lands on heads just 11 times. Perform a Binomial test to determine if the coin is actually less likely to land on heads compared to tails.

The p-value of the test is  0.1002 . Since this is not less than 0.05, we fail to reject the null hypothesis. We do not have sufficient evidence to say that the coin is less likely to land on heads compared to tails.

Example 3: Right-tailed Binomial Test

A shop makes widgets with 80% effectiveness. They implement a new system that they hope will improve the rate of effectiveness. They randomly select 50 widgets from a recent production run and find that 46 of them are effective. Perform a binomial test to determine if the new system leads to higher effectiveness.

The p-value of the test is  0.0185 . Since this is less than 0.05, we reject the null hypothesis. We have sufficient evidence to say that the new system produces effective widgets at a higher rate than 80%.

Featured Posts

hypothesis test of binomial distribution

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.

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.

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Test of Hypothesis with Binomial Distribution

It is known that 40% of a certain species of birds have characteristic B. Twelve birds of this species are captured in an unusual environment and 4 of them are found to have characteristic B.

Is it reasonable to assume that the birds in this environment have a smaller probability than that the species in general has?

I assumed that this is a binomial case with $p=0.4$ and $n=12.$ Then to figure out if the assumption of the birds having smaller probability than the species is correct, I tried to do it using hypothesis testing and finding the P-value, but I got confused. Any help will be appreciated!
  • probability
  • computational-mathematics
  • hypothesis-testing

BruceET's user avatar

  • 2 $\begingroup$ Well, under the null hypothesis the probability that you'd see at most $4$ type B birds is $0.438178222$...the probability that you'd see exactly $4$ is $0.21284094$ so I don't see how you could reject the null hypothesis. $\endgroup$ –  lulu Feb 18, 2017 at 15:39
  • $\begingroup$ Not reasonable because your sample has 4 whereas the expected value is 3, so this is hardly evidence that this sample has fewer than expected. $\endgroup$ –  David Quinn Feb 18, 2017 at 15:49

Null and Alternative Hypotheses. You want to test $H_0: p = .4$ against $H_a: p < .4.$

In $n = 12$ observations you observe $X = 4$ birds of Type B. If the null hypothesis is true $E(X) = np = 12(.4) = 4.8.$

While it is true that you observed fewer than the 'expected' number of birds of Type B, the question is whether 4 is enough smaller than 4.8 to reject $H_0,$ calling this a 'statistically significant' result.

Finding the P-value. The P-value is the probability (assuming $H_0$ to be true) of a result as extreme or more extreme (in the direction of the alternative) than the observed $X = 4.$

If $X \sim \mathsf{Binom}(n = 12,\, p = .4),$ then the P-value is $P(X \le 4) = 0.4382.$

This can be computed with a calculator using the PDF of $\mathsf{Binom}(12, .4),$ and evaluating $P(X \le 4) = P(X=0) + P(X=1) + \cdots + P(X=4),$ or by using software. The computation in R statistical software is as follows:

Conclusion. So the P-value of the test is about 0.44, which is not surprisingly small. Testing at the 5% level of significance, one would not reject $H_0$ unless the P-value is less than 0.05. Thus, seeing 4 birds of Type B is consistent with $H_0$ by the usual standards of statistical significance. (This is the same as the conclusion in the Comments of @lulu and @DavidQuinn, even if perhaps not for precisely the same reasons.)

P-value by Normal Approximation. Alternatively, an approximate value of this probability can be found by using the normal approximation to the binomial distribution (with continuity correction): $\mu = E(X) = 4.8,$ as above, and $\sigma = SD(X) = \sqrt{np(1-p)} = 1.6971.$ Then the 'best-fitting' normal distribution is $\mathsf{Norm}(\mu = 4.8, \sigma = 1.6971).$ The approximation is as follows:

$$P(X \le 4.5) = P\left(\frac{X-\mu}{\sigma} \le \frac{4.5-4.8}{1.6971} = -0.1768\right) \approx P(Z \le -0.18) = 0.4286,$$

where $Z$ has a standard normal distribution, so that the approximate probability can be found using printed normal tables. Slightly more accurately (without rounding to use tables), the normal approximation of the P-value can be found using software:

Sketch of Null Binomial Distribution. Below is a plot of $\mathsf{Binom}(12, .4)$ (black bars) compared with the PDF of the 'best fitting' normal distribution (blue curve). The P-value is the sum of the heights of the bars to the left of the vertical red line.

enter image description here

  • $\begingroup$ @Pawalek: The 'continuity correction' for normal aprx. calls for using 4.5 instead of 4.0. Using 4.0 would lead to inaccurate computation pnorm((4-4.8)/1.6971) , which returns 0.3186803 (rather far from exact 0.4381782, and not a good as approx 0.4298419). In any case this is not an ideal situation for normal approx: n = 12 is too small. $\endgroup$ –  BruceET Jun 13, 2019 at 18:09
  • $\begingroup$ I was under the impression that the normal approximation to the binomial distribution can only be used when np and n(1-p) are both sufficiently large (both greater than 5). Here, np=12(0.4) = 4.8 and n(1-p)=12(0.6)=7.2, so I don't think the normal approximation to the binomial distribution can be used here. What do you think? $\endgroup$ –  StatsSorceress Nov 14, 2019 at 18:39
  • $\begingroup$ @StatsSorceress. Already noted that $n=12$ is a bit too small. The "rule" that $\min(np,n(1-p))\ge 5$ (or $4$ or $10$ or whatever) is only a rough guide. If $p$ is near $1/2,$ sometimes normal approximation with continuity correction works OK, even if 'rule' violated. Example: If $X \sim \mathsf{Binom}(3, 1/2),$ then $P(X \le 1) = 1/2$ exactly, and norm aprx w/ cc gives $P(X\le 1) = P(X\le 1.5) = .5000.$ $\endgroup$ –  BruceET Nov 14, 2019 at 21:33
  • $\begingroup$ Thanks @BruceET! $\endgroup$ –  StatsSorceress Nov 15, 2019 at 0:17

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged probability computational-mathematics hypothesis-testing ., hot network questions.

  • Are there any jobs that are forbidden by law to convicted felons?
  • How to make Bash remove quotes after parameter expansion?
  • Added an element in forest
  • A phrase that means you are indifferent towards the things you are familiar with?
  • How can/do I find the "main root" for wild grape vine in my yard?
  • An application of the (100/e)% rule applied to postdocs: moving on from an academic career, perhaps
  • Best way to halve 12V battery voltage for 6V device, while still being able to measure the battery level?
  • Asterisk in violin sheet music
  • Converting NEMA 10-30 to 14-30 using ground from adjacent 15 amp receptacle
  • Regarding upper numbering of ramification groups
  • What percentage of light gets scattered by a mirror?
  • Movie I saw in the 80s where a substance oozed off of movie stairs leaving a wet cat behind
  • Which program is used in this shot of the movie "The Wrong Woman"
  • Is a porch light with integrated outlet safe / to code?
  • Why do we say "he doesn't know him from Adam"?
  • NES Emulator in C
  • Python matrix class
  • XeLaTeX+polyglossia+french+biblatex complain about missing character (U+200B)
  • Why is killing even evil brahmins categorized as 'brahma hatya'?
  • Transformer with same size symbol meaning
  • How can I hang heavy bikes under a thick wooden shelf?
  • How might a physicist define 'mind' using concepts of physics?
  • What scientific evidence there is that keeping cooked meat at room temperature is unsafe past two hours?
  • Moving after copying in assignment of conditional operator result

hypothesis test of binomial distribution

Library homepage

  • school Campus Bookshelves
  • menu_book Bookshelves
  • perm_media Learning Objects
  • login Login
  • how_to_reg Request Instructor Account
  • hub Instructor Commons

Margin Size

  • Download Page (PDF)
  • Download Full Book (PDF)
  • Periodic Table
  • Physics Constants
  • Scientific Calculator
  • Reference & Cite
  • Tools expand_more
  • Readability

selected template will load here

This action is not available.

Mathematics LibreTexts

10.3: Distribution Needed for Hypothesis Testing

  • Last updated
  • Save as PDF
  • Page ID 155549

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\( \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{\kernel}{\mathrm{null}\,}\)

\( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\)

\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\)

\( \newcommand{\norm}[1]{\| #1 \|}\)

\( \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}}}} \)

Earlier in the course, we discussed sampling distributions. Particular distributions are associated with hypothesis testing. Perform tests of a population mean using a normal distribution or a Student's \(t\)-distribution. (Remember, use a Student's \(t\)-distribution when the population standard deviation is unknown and the distribution of the sample mean is approximately normal.) We perform tests of a population proportion using a normal distribution (usually \(n\) is large or the sample size is large).

If you are testing a single population mean, the distribution for the test is for means :

\[\bar{X} \sim N\left(\mu_{x}, \frac{\sigma_{x}}{\sqrt{n}}\right)\]

The population parameter is \(\mu\). The estimated value (point estimate) for \(\mu\) is \(\bar{x}\), the sample mean.

If you are testing a single population proportion, the distribution for the test is for proportions or percentages:

\[P' \sim N\left(p, \sqrt{\frac{p-q}{n}}\right)\]

The population parameter is \(p\). The estimated value (point estimate) for \(p\) is \(p′\). \(p' = \frac{x}{n}\) where \(x\) is the number of successes and n is the sample size.

Assumptions

When you perform a hypothesis test of a single population mean \(\mu\) using a Student's \(t\)-distribution (often called a \(t\)-test), there are fundamental assumptions that need to be met in order for the test to work properly. Your data should be a simple random sample that comes from a population that is approximately normally distributed. You use the sample standard deviation to approximate the population standard deviation. (Note that if the sample size is sufficiently large, a \(t\)-test will work even if the population is not approximately normally distributed).

When you perform a hypothesis test of a single population mean \(\mu\) using a normal distribution (often called a \(z\)-test), you take a simple random sample from the population. The population you are testing is normally distributed or your sample size is sufficiently large. You know the value of the population standard deviation which, in reality, is rarely known.

When you perform a hypothesis test of a single population proportion \(p\), you take a simple random sample from the population. You must meet the conditions for a binomial distribution which are: there are a certain number \(n\) of independent trials, the outcomes of any trial are success or failure, and each trial has the same probability of a success \(p\). The shape of the binomial distribution needs to be similar to the shape of the normal distribution. To ensure this, the quantities \(np\) and \(nq\) must both be greater than five \((np > 5\) and \(nq > 5)\). Then the binomial distribution of a sample (estimated) proportion can be approximated by the normal distribution with \(\mu = p\) and \(\sigma = \sqrt{\frac{pq}{n}}\). Remember that \(q = 1 – p\).

In order for a hypothesis test’s results to be generalized to a population, certain requirements must be satisfied.

When testing for a single population mean:

  • A Student's \(t\)-test should be used if the data come from a simple, random sample and the population is approximately normally distributed, or the sample size is large, with an unknown standard deviation.
  • The normal test will work if the data come from a simple, random sample and the population is approximately normally distributed, or the sample size is large, with a known standard deviation.

When testing a single population proportion use a normal test for a single population proportion if the data comes from a simple, random sample, fill the requirements for a binomial distribution, and the mean number of successes and the mean number of failures satisfy the conditions: \(np > 5\) and \(nq > 5\) where \(n\) is the sample size, \(p\) is the probability of a success, and \(q\) is the probability of a failure.

Formula Review

If there is no given preconceived \(\alpha\), then use \(\alpha = 0.05\).

Types of Hypothesis Tests

  • Single population mean, known population variance (or standard deviation): Normal test .
  • Single population mean, unknown population variance (or standard deviation): Student's \(t\)-test .
  • Single population proportion: Normal test .
  • For a single population mean , we may use a normal distribution with the following mean and standard deviation. Means: \(\mu = \mu_{\bar{x}}\) and \(\\sigma_{\bar{x}} = \frac{\sigma_{x}}{\sqrt{n}}\)
  • A single population proportion , we may use a normal distribution with the following mean and standard deviation. Proportions: \(\mu = p\) and \(\sigma = \sqrt{\frac{pq}{n}}\).
  • It is continuous and assumes any real values.
  • The pdf is symmetrical about its mean of zero. However, it is more spread out and flatter at the apex than the normal distribution.
  • It approaches the standard normal distribution as \(n\) gets larger.
  • There is a "family" of \(t\)-distributions: every representative of the family is completely defined by the number of degrees of freedom which is one less than the number of data items.

IMAGES

  1. Hypothesis testing using the binomial distribution (2.05a)

    hypothesis test of binomial distribution

  2. Hypothesis Testing with Binomial Distribution

    hypothesis test of binomial distribution

  3. Hypothesis Testing (Binomial Distribution proportion)

    hypothesis test of binomial distribution

  4. Hypothesis Testing

    hypothesis test of binomial distribution

  5. Binomial Distribution Probability and Hypothesis Testing

    hypothesis test of binomial distribution

  6. [Math] Test of Hypothesis with Binomial Distribution

    hypothesis test of binomial distribution

VIDEO

  1. Mean and variance of binomial distribution

  2. Binomial Distribution

  3. Binomial Distribution Hypothesis Testing

  4. Hypothesis Testing with Binomial Distribtion

  5. Binomial distribution of probability

  6. Binomial Distribution

COMMENTS

  1. Hypothesis Testing with the Binomial Distribution

    Although a calculation is possible, it is much quicker to use the cumulative binomial distribution table. This gives P[X ≤ 6] = 0.058 P [ X ≤ 6] = 0.058. We are asked to perform the test at a 5 5 % significance level. This means, if there is less than 5 5 % chance of getting less than or equal to 6 6 heads then it is so unlikely that we ...

  2. Binomial test

    The binomial test is useful to test hypotheses about the probability ( ) of success: where is a user-defined value between 0 and 1. If in a sample of size there are successes, while we expect , the formula of the binomial distribution gives the probability of finding this value: If the null hypothesis were correct, then the expected number of ...

  3. Binomial Distribution Hypothesis Tests

    Binomial Distribution Hypothesis Tests Example Questions. Question 1: A disease is moving through a population. On Tuesday, it is believed that nationally around 6\% of people have the disease. In the village of Hammerton, 5 out of 200 residents have the disease. Test, at the 5\% significance level if the prevalence of the disease differs in ...

  4. 5.2.1 Binomial Hypothesis Testing

    How is a hypothesis test carried out with the binomial distribution? The population parameter being tested will be the probability, p in a binomial distribution B(n , p); A hypothesis test is used when the assumed probability is questioned ; The null hypothesis, H 0 and alternative hypothesis, H 1 will always be given in terms of p. Make sure you clearly define p before writing the hypotheses

  5. Binomial Test • Simply explained

    The binomial test is a hypothesis test used when there is a categorical variable with two expressions, e.g., gender with "male" and "female". The binomial test can then check whether the frequency distribution of the variable corresponds to an expected distribution, e.g.: Men and women are equally represented.

  6. Binomial Hypothesis Testing

    We now give some examples of how to use the binomial distribution to perform one-sided and two-sided hypothesis testing.. One-sided Test. Example 1: Suppose you have a die and suspect that it is biased towards the number three, and so run an experiment in which you throw the die 10 times and count that the number three comes up 4 times.Determine whether the die is biased.

  7. 4.3 Binomial Distribution

    The outcomes of a binomial experiment fit a binomial probability distribution. The random variable X = the number of successes obtained in the n independent trials. The mean, μ, and variance, σ 2, for the binomial probability distribution are μ = np and σ 2 = npq. The standard deviation, σ, is then σ = n p q n p q.

  8. How to Do Hypothesis Testing with Binomial Distribution

    Hypothesis Testing Binomial Distribution. 1. You formulate a null hypothesis and an alternative hypothesis. H 0: p = p 0 against H a: p > p 0 (possibly H a: p < p 0 or H a: p ≠ p 0 ). For example, you would have a reason to believe that a high observed value of p, makes the alternative hypothesis H a: p > p 0 seem reasonable.

  9. Hypothesis Testing Using the Binomial Distribution

    In step 3, the underlying distribution (here it was a binomial distribution) has to be determined (which, admittedly, can sometimes be tricky or even unclear). In step 5, we have to draw the right conclusions. This might be a bit tricky at times. At the end of the day (or the research paper) hypothesis testing always follows the same 5 steps.

  10. Binomial Distribution: Hypothesis Testing

    The example looks at a one tailed test in the lower tail. Statistics : Hypothesis Testing for the Binomial Distribution (Example) In this tutorial you are shown an example that tests the upper tail of the proportion p from a Binomial distribution. The example is In Luigi's restaurant, on average 1 in 10 people order a bottle of Chardonay.

  11. PDF Fundamentals of Hypothesis Testing

    2 The Binomial Distribution De nition and an Example Derivation of the Binomial Distribution Formula The Binomial Distribution as a Sampling Distribution 3 Hypothesis Testing 4 One-Tailed vs. Two-Tailed Tests 5 Power of a Statistical Test 6 A General Approach to Power Calculation Factors A ecting Power: A General Perspective

  12. PDF Hypothesis Testing Using the Binomial Distribution

    Hypothesis Testing Using the Binomial Distribution So, we have our null/alternative hypotheses, we have our α/desired con-dence level, and, nally, we have obtained sample data from the experi-ment to test our hypotheses. How can we now use the binomial distribution to test our hypotheses? Well, in R, we can make use of the prop.test() function.

  13. 9.4: Distribution Needed for Hypothesis Testing

    When testing a single population proportion use a normal test for a single population proportion if the data comes from a simple, random sample, fill the requirements for a binomial distribution, and the mean number of successes and the mean number of failures satisfy the conditions: \(np > 5\) and \(nq > 5\) where \(n\) is the sample size, \(p ...

  14. 8.1.3: Distribution Needed for Hypothesis Testing

    If you are testing a single population mean, the distribution for the test is for means: X¯ ∼ N(μx, σx n−−√) (8.1.3.1) (8.1.3.1) X ¯ ∼ N ( μ x, σ x n) or. tdf (8.1.3.2) (8.1.3.2) t d f. The population parameter is μ μ. The estimated value (point estimate) for μ μ is x¯ x ¯, the sample mean. If you are testing a single ...

  15. Hypothesis Testing Using the Binomial Distribution

    Hypothesis Testing Using the Binomial Distribution. When we carry out hypothesis testing, we want to be able to understand whether a particular statistic in our sample can be used to generalize to the population parameter that it is thought to represent. In a hypothesis test, our aim is to reject our null hypothesis.

  16. 10. Hypothesis Testing: p-values, Exact Binomial Test, Simple one-sided

    The Exact Binomial Test. A simple one-sided claim about a proportion is a claim that a proportion is greater than some percent or less than some percent. The symbol for proportion is $\rho$. The name of the hypothesis test that we use for this situation is "the exact binomial test". Binomial because we use the binomial distribution.

  17. statistical significance

    Dan and Abaumann's answers suggest testing under a binomial model where the null hypothesis is a unified single binomial model with its mean estimated from the empirical data. Their answers are correct in theory but they need approximation using normal distribution since the distribution of test statistic does not exactly follow Normal ...

  18. PDF AS/A Level Mathematics The Binomial Distribution and Hypothesis Testing

    The Binomial Distribution and Hypothesis Testing Instructions • Use black ink or ball-point pen. • If pencil is used for diagrams/sketches/graphs it must be dark (HB or B). • Fill in the boxes at the top of this page with your name. • Answer all questions and ensure that your answers to parts of questions are clearly labelled..

  19. Section 10.2: Hypothesis Tests for a Population Proportion

    What we do instead is return to the binomial distribution, and just consider x, the number of successes. Let's do a quick review of binomial probabilities. ... Hypothesis Testing Using the Binomial Distribution. Example 3. Traditionally, about 70% of students in a particular Statistics course at ECC are successful. If only 15 students in a ...

  20. Binomial Hypothesis Test: Explanation, Example, Assumptions

    STEP 2 - Assign probabilities to our null and alternative hypotheses. H 0: p = 0.35 H 1: p ≠ 0.35 As this is a two-tailed test, the probability of the alternative hypothesis is just different to 0.35. STEP 3 - Write out our binomial distribution. STEP 4 - Calculate probabilities using binomial distribution.

  21. How to Perform a Binomial Test in R

    To perform a binomial test in R, you can use the following function: binom.test (x, n, p) where: x: number of successes. n: number of trials. p: probability of success on a given trial. The following examples illustrate how to use this function in R to perform binomial tests. Example 1: Two-tailed Binomial Test.

  22. probability

    Test of Hypothesis with Binomial Distribution. Ask Question Asked 7 years, 3 months ago. Modified 4 years, 1 month ago. Viewed 21k times 5 $\begingroup$ It is known that 40% of a certain species of birds have characteristic B. Twelve birds of this species are captured in an unusual environment and 4 of them are found to have characteristic B. ...

  23. 10.4: Distribution Needed for Hypothesis Testing

    When testing a single population proportion use a normal test for a single population proportion if the data comes from a simple, random sample, fill the requirements for a binomial distribution, and the mean number of successes and the mean number of failures satisfy the conditions: \(np > 5\) and \(nq > 5\) where \(n\) is the sample size, \(p ...