# finding mode in Binomial distribution

suppose $X$ has the Binomial distribution with parameters $n,p$ . how can show that if $((n+1)p)$ is integer then $X$ has two mode that is $((n+1)p)$ or $((n+1)p-1)?$

-
Hint: compute the ratio $b(n,p;k+1)/b(n,p;k)$ and check that this ratio is $\gt1$ for every $k\lt k^*$ and $\leqslant1$ for every $k\geqslant k^*$, for some integer $k^*$. –  Did Mar 8 '12 at 16:27
Does your acceptance rate mean that you were satisfied by none of the answers you received on the site? –  Did Mar 8 '12 at 16:29

## 1 Answer

Let $a_k=P(X=k)$. We have $$a_k=\binom{n}{k}p^kq^{n-k},\qquad\text{and}\qquad \binom{n}{k+1}p^{k+1}q^{n-k- 1},$$ where as usual $q=1-p$. We calculate the ratio $\dfrac{a_{k+1}}{a_k}$. Note that $$\frac{\binom{n}{k+1}}{\binom{n}{k}}$$ simplifies to $$\frac{n-k}{k+1},$$ and therefore $$\frac{a_{k+1}}{a_k}=\frac{n-k}{k+1}\frac{p}{q}=\frac{n-k}{k+1}\frac{p}{1-p}.$$ This is $\ge 1$ if $k \le np+p-1$. Thus if $k< np-p+1$, then $a_{k+1}>a_k$, and if $k>np-p+1$, then $a_{k+1}<a_k$.

The calculation (almost) says that we have equality of two consecutive probabilities precisely if $a_{k+1}=a_k$, that is, if $k=np+p-1$. Note that $k=np+p-1$ implies that $np+p-1$ is an integer.

So unless $k=np+p-1$, there is a single mode, and if $k=np+p-1$ there are two modes, at $np+p-1$ and at $np+p$.

Not quite! We have been a little casual in our algebra. We have not paid attention to whether we might be multiplying or dividing by $0$. We also have casually accepted what the algebra seems to say, without doing a reality check.

Suppose that $p=0$. Then $np+p-1$ is an integer, namely $-1$. But whatever $n$ is, there is a single mode, namely $k=0$. In all other situations where $np+p-1$ is an integer, the $k$ we have identified is non-negative.

However, suppose that $p=1$. Again, $np+p-1$ is an integer, and again there is no double mode. The largest $a_k$ occurs at one place only, namely $k=n$, since $np+p$ is in this case beyond our range.

That completes the analysis when $np+p-1$ is an integer. When it is not, the analysis is simple. There is a single mode, at $\lfloor np+p\rfloor$.

-
I am solving a similar exercise and I have some doubts: why taking the ratio $\frac{p_X(k+1)}{p_X(k)}$ gives you the mode (most probable value), which is defined as $\sup_{x \in R_X} p_X(x)$? –  user16924 Sep 7 at 23:26
The sup is in this case a max, since the random variable takes on integer values. Apart from a couple of "degenerate" cases pointed out in the answer, the probabilities rise and then fall. The ratio of consecutive terms is therefore $\gt 1$ for a while, then $\lt 1$, except that in somewhat unusual cases we can have ratio $1$, so two consecutive values each qualify as a mode. Looking at the ratios tells us when the probability has reached a maximum. –  André Nicolas Sep 8 at 1:38
Thanks very much for the explanation. –  user16924 Sep 8 at 2:47
You are welcome. That was an overview. The detail is in the answer above. –  André Nicolas Sep 8 at 2:48