## The Binomial Test

**Purpose**When a random variable is dichotomous (only two possible outcomes) with a constant probability p (p – not to be confused with

*p*, the significance or

*p*-value) of success in the population, the binomial test can be used to determine the likelihood of obtaining a sample comprising a number of successes (X) for n independent trials. Typically, it is used to test a null hypothesis based on np successes or p.

**Research Question Examples**

*Is a coin fair – a coin is tossed 10 times and comes up heads three times – if the coin is fair, does this seem likely*? In this case,

n = 10 (number of trials), p = 0.5 (probability of success – heads), X = 3 (number of times heads occurs)

*Are women equally likely to become Prime Minister*?

At the time of writing, there have been two women prime ministers out of the the previous 76. If we assume that the probability of being a female prime minister is the same as that of a man, then p = 0.5, so

n =76, p = 0.5, X = 2

**Requirements**

- n identical trials
- trials are independent
- dichotomous response variable
- probability of success remains constant

Under these conditions, the number of successes (X) will be binomially distributed: X ~ Binom(285,0.5)

**Background**Jach and Moron (2020) Investigated whether women preferred men with beards or clean-shaven by asking 285 women to indicate whether they preferred men to be bearded or clean-shaven. 163 women preferred men with facial hair whilst 122 preferred men to be clean shaven. Given 57.2% (163/285) of women preferred men with beards their sample, as opposed to being clean shaven, should we conclude that the proportion of women in the population preferring clean shaven men is greater than 0.5, or is the sample proportion of 0.572 within the bounds of sampling error for a population proportion of 0.5?

We will evaluate the null hypothesis that in the population there is no preference for bearded men, that is the proportion or probability, of women preferring bearded men is 0.5 (H_{0}: p = 0.5) with the alternative hypothesis being that the probability is not equal to 0.5 (H_{1}: p <> 0.5) using the binomial test with n = 285, p = 0.5, and x = 163.

We use binom.test command specifying the number of successes in the sample as 163 (x=163), the number of trials as 285 (n=285) and the probability of success under the null hypothesis as 0.5 (p). Because we are employing a non-directional alternative hypothesis, that is the population proportion could be more or less than 0.5, we specify a two-tailed significance level using alternative=”two.sided”. The complete R command is shown below.

**R Command**Enter the following command (you can copy and paste into R-Studio).

binom.test(163,285,p=0.5,alternative = “two.sided”)

When executed, this command will generate the output shown below.

**Interpreting The Output & Reporting the Analysis**

**Notes**

- The
*p*-value is 0.01766, which is less than 0.05, so the finding in significant - This means we reject the null hypothesis and accept the alternative hypothesis; that is the population proportion is not equal to 0.5
- When reporting most statistical tests we need to indicate
- the statistic (
*T*=163) - The sample size (
*N*=285) - The
*p*-value

- the statistic (

- The reported
*p*-value is two sided, which is consistent with the non-directional hypothesis. - Additionally, the Confidence Interval might be given.

**References**

Jach, Ł., & Moroń, M. (2020). I can wear a beard, but you should shave… Preferences for men’s facial hair from the perspective of both sexes. *Evolutionary Psychology*, *18*(4), 1474704920961728.