# Is there a name for the test which is the simple statistical probability?

Let's say I observe 10 people going in an alley and I find out 100 % are men. Since there are 50 % of men in population, I'd expect this to happen at random for every 1 in $$\frac{1}{2^{10}}=0.00097$$ cases. Is there a name for the test where this number would represent the p-value?

• This is the p value of a one-sided exact binomial test. Commented Jul 5, 2021 at 15:54
• To me this looks like a one-tailed exact binomial test. The p-value will be $P(X \geq 10 \mid \pi_0 = 0.5) = 2^{-10}$. Since the number of successes is equal to the sample size, $P(X = 10) = P(X \geq 10)$ en.wikipedia.org/wiki/Binomial_test Commented Jul 5, 2021 at 15:57
• to add the R code that produces 0.00097 as p-value: binom.test(x=10,n=10,p=0.5,alternative="greater") Commented Jul 5, 2021 at 15:59

The test (first) mentioned by @MichaelM is implemented in R as binom.test as follows:

binom.test(10, 10, alt="g")

Exact binomial test

data:  10 and 10
number of successes = 10, number of trials = 10,
p-value = 0.0009766
alternative hypothesis:
true probability of success is greater than 0.5
95 percent confidence interval:
0.7411344 1.0000000
sample estimates:
probability of success
1


A similar test, using a normal approximation, is prop.test:

prop.test(10, 10, alte="g", cor=F)

1-sample proportions test
without continuity correction

data:  10 out of 10, null probability 0.5
X-squared = 10, df = 1, p-value = 0.0007827
alternative hypothesis: true p is greater than 0.5
95 percent confidence interval:
0.787058 1.000000
sample estimates:
p
1