# All possible values of $p$ in a binomial distribution

Suppose that an urn contains a number of black and a number of white balls. We have drawn a random sample of $25$ with replacement and found $6$ of them are black balls. Then the distribution of $X$, number of black balls, is given by the binomial distribution

$$f(6;p)=\binom{25}{6}p^6(1-p)^{19},$$

where $0\le p\le 1.$ Now my question is what are the possible values of $p$ in the above binomial distribution? I am not looking for the maximum likelihood estimate of $p$ rather than the all possible values that $p$ can assume.

### EDIT:

In the book Mood, A. M., Graybill, F. A., & Boes, D. C. (1974). Introduction to the Theory of Statistics 1974. McGraw-Hill Kogakusha, it is written in chapter 7, section 2.2 that

if we found $x=6$ in a sample of 25 from a binomial population, we should substitute all possible values of $p$ in the expression $$f(6;p)=\binom{25}{6}p^6(1-p)^{19} \quad \text{for 0\le p\le 1}\quad (2)$$ and choose as our estimate that value of $p$ which maximized $f(6;p)$. For the given possible values of $p$ we should find our estimate to be $\frac{6}{15}.$

I am not understanding how are they getting the possible values of $p$?

• How do you define "all possible"? If p is not 0 or 1, still you can get any possible outcome, just some will be very unlikely. E.g. with probability of success 0.999 you can still get all failures with very small probability, same as you can die from lightning strike the same day you win in a national lottery... – Tim Jul 7 '18 at 11:42
• +! to @Tim 's comment. I think you are getting confused by the perhaps somewhat unusual verbiage "all possible values" The Mood, Graybill et al quote is describing maximum likelihood estimation of $p$. Consider this analogous optimization problem: maximize $x(1-x)$ subject to the constraint that $0 \le x \le 1$. The Mood, Graybill et all specification of this same problem could be "substitute all possible values of $x$ in the expression $x(1-x)$ for $0 \le x \le 1$, and choose that value of $x$ for which the expression is maximized" – Mark L. Stone Jul 7 '18 at 12:13

Well, your urn would need to have a finite natural number of balls $b \in \mathbb{N}$. Since you have drawn some black and some white balls, with replacement, we also know that there is at least one black ball and at least one white ball, so we must also have $b \geqslant 2$. In terms of what is possible, as opposed to probable, that is all the information we have.
Theoretically, if we were to allow any arbitrarily large finite value for $b$, then $p$ could be any rational number in the specified interval (i.e., any ratio of integers between zero and one exclusive, with a denominator of at least two). However, in practice, an actual urn would have some upper bound on the number of balls it can fit, so if you were to impose an upper bound on $b$ then $p$ would be the subset of the rational numbers in the interval that have a denominator no larger than the specified upper bound.
• @Ben I think the discussion about the number of balls and any rational number for p, etc, is off the mark. Regardless of the number of balls, p could take any real value in the range $0 < p < 1$ (given that 6 black out of 25 rules out p = 0 or 1). – Mark L. Stone Jul 7 '18 at 12:18
• @MarkStone: If there are 50 balls in the urn, then $p$ can't take the value $\frac{3}{100}$, say. – Scortchi - Reinstate Monica Jul 7 '18 at 15:06
• I think this is an insightful answer (+1). It raises an interesting point: $\hat p = 6/15$ cannot possibly be the correct solution--or even a valid solution at all--if there are, say, $7$ balls in the urn! – whuber Jul 7 '18 at 20:50
• @Mark: The value $p$ cannot be irrational, since there are only a finite number of balls in the urn. If there are $b \in \mathbb{N}$ balls in the urn, and $a \in \{ 1, 2, ..., b-1 \}$ of those balls is black, then $p=a/b$, so it is some rational number with denominator $b$. This rules out a value like $p=1/e$ for example. Since we don't know what $b$ is, there is a broad set of possible values, but it must still be an integer. – Ben - Reinstate Monica Jul 8 '18 at 2:36