$\operatorname{Bin}{(n,U)}$, where $U$ is uniform on $(0,1)$

A question in my probability class:

Let $X$ have the binomial distribution $\operatorname{Bin}{(n,U)}$, where $U$ is uniform on $(0,1)$. Show that $X$ is uniformly distributed on $\{0,1,\dotsc, n\}$. (Hint: consider using one of the following tools: generating function, moment generating function, characteristic function.)

I'm having trouble understanding the question. Can someone first of all provide a reference for the meaning of $\operatorname{Bin}{(n,X)}$, where $X$ is a random variable? Then perhaps I can suss out how to proceed.

Update: My strategy is to use (for example) the characteristic function, and show it is the same as the characteristic function as if $X$ were uniform. I believe that random variables have the same distribution iff they have the same characteristic function, so that will solve it.

If I try to find the characteristic function $\varphi_{X}(t)$, I get

$$\varphi_X(t) = \mathbb{E}(e^{itX}) = \mathbb{E}(\mathbb{E}(e^{itX}\mid U))\\ = \mathbb{E} \left( \sum_{k=0}^n e^{itk} \binom{n}{k}u^k(1-u)^k \right)\\=\int_0^1 \left( \sum_{k=0}^n e^{itk} \binom{n}{k}u^k(1-u)^k \right) du\\ = \sum_{k=0}^n e^{itk}\binom{n-1}{k}\frac1k.$$

If $X$ were uniformly distributed, it should have characteristic function

$$\mathbb{E}(e^{itX}) = \sum_{k=0}^n \frac{1}{n}e^{itk},$$

so I must have made a mistake, since I understand that random variables have the same characteristic function iff they have the same distribution. (Unless there is some reason these two are equal that I'm not seeing.)

• A higher being has biased coins with every possible probability of head. She chooses one of these coins "at random" and hands it to us, tells us to toss it $20$ times. What is the probability we will get exactly $7$ heads? – André Nicolas Nov 14 '13 at 20:01
• I have updated my question, perhaps you have a comment. – Eric Auld Nov 14 '13 at 22:55
• It is basically OK in outline, there are a couple of typos, you want $u^k(1-u)^{n-k}$. You have the beta function wrong, the integral is not what you say it is. With the right thing, you should I think get that the integral is $\frac{k!(n-k)!}{(n+1)!}$, which will give you after the cancellation with $\binom{n}{k}$ the result $\frac{1}{n+1}$, which is what you want (not $\frac{1}{n}$). – André Nicolas Nov 14 '13 at 23:13

Roughly speaking, if $X = \operatorname{Bin}(n,U)$ then one intuitive way to understand this is that given that $U = u \in [0,1]$ then $X = \operatorname{Bin}(n,u)$. In other symbols, $$P(X=i ~|~ U=u) = {{n}\choose{i}}u^i (1-u)^{n-i}$$ In particular, if you wanted to try and directly calculate $P(X=i)$ you could use the tool $$P(X=i) = \int_{\mathbb{R}} P(X=i~|~U=u)f_U(u)du = \int_0^1 {{n}\choose{i}}u^i (1-u)^{n-i}\,du$$ where $f_U$ is the PDF of $U$. Now, I don't necessarily suggest directly calculating this since the hint would suggest another possibility that could be easier. However, hopefully this gives some insight in how to interpret and use $X$.
• The final integral is not hard using integration by parts: it is $\frac{1}{n+1}$ and so does not depend on $i$ (i.e. Eric Auld's $k$) – Henry Mar 8 '14 at 11:59
What you are looking for in a binomial distribution is repeating $n$ times an experiment with probability of success $p$, where both $n$ and $p$ are constant.
Imagine making determination of $p$ a part of the experiment. You first determine a uniform $p$ and then perform the experiment $n$ times and record the successes. $X$ is the number of those successes.