# How to derive this relation that I found intuitively?

By intuition, I found that the result of evaluating the following expression

$$\frac{1}{M} \frac{\sum_{N=0}^M \frac{M!}{(M-N)!N!} N e^{cN}}{\sum_{N=0}^M \frac{M!}{(M-N)!N!} e^{cN}}$$

does not depend on the positive value of the integer $$M$$, i.e. it only depends on $$c\in\mathbb R$$.

I corroborated this with the help of a simple Python script. How to show analytically that this is true?

## 3 Answers

By the Binomial Theorem, the denominator is $$(e^c+1)^M$$. The numerator can also be manipulated to apply the Binomial Theorem: \begin{align*} \sum_{N=0}^M \frac{M!}{(M-N)!N!} Ne^{cN} &= \sum_{N=1}^M \frac{M\cdot (M-1)!}{((M-1)-(N-1))!(N-1)!}e^{c(N-1)}\cdot e^c\\ &=Me^c \sum_{N=1}^M \binom{M-1}{N-1}e^{c(N-1)}\\ &=Me^c \sum_{K=0}^{M-1} \binom{M-1}{K}e^{cK}\\ &=Me^c (e^c+1)^{M-1}. \end{align*}

So the whole expression simplifies to: $$\frac{e^c}{e^c+1}.$$

By the binomial theorem we have $$\begin{eqnarray*} \sum_{N=0}^{M} \binom{M}{N} x^N =(1+x)^M. \end{eqnarray*}$$ Differentiate this and we have $$\begin{eqnarray*} \frac{d}{dx} \sum_{N=0}^{M} \binom{M}{N} x^N =\sum_{N=0}^{M} \binom{M}{N}N x^{N-1} =M (1+x)^{M-1}. \end{eqnarray*}$$ So your expression becomes $$\begin{eqnarray*} \frac{1}{M} \frac{ \sum_{N=0}^{M} N \binom{M}{N} x^N }{\sum_{N=0}^{M} \binom{M}{N} x^N} = \frac{x}{(1+x)} \end{eqnarray*}$$ and all the $$M$$ dependency has cancelled.

Let $$\phi(c) = \Bbb E[e^{cZ}]$$ denote the moment generating function of a standard bernoilli(1/2) random variable $$Z$$ taking values in $$\{0,1\}$$. Since the sum of $$M$$ independent copies gives the binomial distribution, the quantity in question is simply $$\frac1M \frac{\partial_c (\phi(c)^M)}{\phi(c)^M} = \frac1M \frac{M\phi(c)^{M-1}\phi'(c)}{\phi(c)^M} = \frac{\phi'(c)}{\phi(c)},$$ which only depends on $$c$$.

Note: I (perhaps unnecessarily) added the probability tag to this question.

• Thank you for your answer. +1, I need time to understand it. I get lost when you stated "Since the sum...", so I did not get how the LHS equals to my expression – user1420303 May 16 at 1:44
• Oh in that sentence we’re using the fact that the binomial distribution is the sum of $M$ independent Bernoulli trials, and then were using that the moment generating function of the sum of independent variables is just the product of the respective moment generating functions. I thought it was interesting because if you take $Z$ to be any random variable (not just Bernoulli) then the same proof applies, so you can generalize your identity and derive even more interesting formulas like this! @user1420303 – Shalop May 16 at 2:39
• Thank you. I really appreciate your answer. – user1420303 May 16 at 2:41