# Homework Help: Characteristic function of the binomial distribution

1. Aug 24, 2012

### fluidistic

1. The problem statement, all variables and given/known data
Hey guys, I'm self studying some probability theory and I'm stuck with the basics.
I must find the characteristic function (also the moments and the cumulants) of the binomial "variable" with parameters n and p.
I checked out wikipedia's article http://en.wikipedia.org/wiki/Characteristic_function_(probability_theory), apparently the solution is $(1-p+pe^{it})^n$ though I didn't really understand what t stand for (number of successes?).

2. Relevant equations
Characteristic function: $\int e^{ikX} P(x)dx$.

3. The attempt at a solution
I'm guessing that I must simply apply the given formula. The k would be wikipedia's t variable. I'm stuck at finding P(x) and X. I've searched and found out the binomial distribution's article in wikipedia and $P(K=k)=\frac{n!p^k (1-p)^{n-k}}{k!(n-k)!}$ which is called the probability mass function. I don't know how how I could "plug" this into the given formula.
Thanks for any tip.

2. Aug 24, 2012

### jbunniii

The definition of the characteristic function of a random variable X is

$$E[e^{ikX}]$$

How you calculate this expectation depends on what kind of random variable you are dealing with.

The equation you listed is for a continuous random variable, i.e. one that has a probability density function.

For a discrete random variable, with probability mass function P(X = n), the characteristic function would be

$$E[e^{ikX}] = \sum_{n} e^{ikn} P(X = n)$$

3. Aug 25, 2012

### Ray Vickson

First tip: do more than consult Wikipedia. Get a good *book*.

Anyway, the characteristic function of the Binomial random variable $X$ is
$$\text{ch}_{X}(t) \equiv E\left(e^{iX}\right) = \sum_{k=0}^n {n \choose k} e^{i t k} p^k (1-p)^{n-k} \\ = \sum_{k=0}^n {n \choose k} (pe^{it})^k (1-p)^{n-k} = (1-p + pe^{it})^n,$$
using the binomial expansion
$$(a+b)^n = \sum_{k=1}^n {n \choose k} a^k b^{n-k}.$$
The "t" has nothing to do with numbers of successes, or anything; it is just a parameter used in the characteristic function.

RGV

4. Aug 26, 2012

### fluidistic

Ok thank you very much guys.
By the way which book(s) would you recommend me? Because I'm totally stuck at finding the moments (I know they are the coefficients of the Taylor's expansion of the characteristic function and the cumulants which are just the logarithm of the moments). Should I just calculate the Taylor's series of $(1-p + pe^{it})^n$ with respect to t? Is this the way to go?

5. Aug 27, 2012

### fluidistic

The n'th moment around the point "a" is definied as $\mu _ n (a)=\sum (x-a)^n P(x)$ where P is the probability mass function.
So if I take the binomial distribution where there is N tries with each a probability of "p" to occur, then $\mu _ N (a)= \sum _{k=1}^{N} (x-a)^N {N \choose k} p ^k (1-p)^{N-k}$.
I'm sure I've messed up some variables here. I'm kind of confused. Any help is appreciated.

6. Aug 28, 2012

### Ray Vickson

It is a bit easier to use the moment-generating function (mgf) instead of the characteristic function. The mgf of any discrete random variable X is
$$m_X(t) = \sum_{x} p(x) e^{tx} = E\, e^{tX}.$$ To get moments of X about 'a', you need to find $E(X-a)^k$, and the easiest way is to use
$$m_{X,a} (t) \equiv E\, e^{(X-a)t} = \sum_{x} p(x) e^{(x-a)t} = e^{-at} m_X(t).$$
We have
$$E\,(X-a)^k = \left. \left( \frac{\partial}{\partial t}\right)^k m_{X,a}(t)\right|_{t=0}.$$
For the binomial B(n,p) we have $m_{X,a}(t) = e^{-at} (1-p + pe^t)^n.$ For 'a' different from the mean the computation of the kth moment gets complicated (but do-able) for k > 2.

RGV

Last edited: Aug 28, 2012
7. Aug 31, 2012

### fluidistic

I've had my second class in this course, the professor helped us a bit for this exercise.
He uses a different notation than in this thread; to get the first moment I think he chose your way (let me know).
From the characteristic function $\phi _X (k)=(pe^{ik}+1-p)^N$, one gets the moments via the formula $<X^n>=\frac{1}{i^n} \frac{d^n}{dk^n} \phi _X (k) \big | _{k=0}$. (*)
Where in my case $X=n_1$ where $P_N(n_1)=\frac{N!}{n_1!(N-n_1)!}p^{n_1} (1-p)^{N-1}$. So in a way I think he expect us to use the formula (*) where our "a" would be 0. Is there a link with the moment generating function you suggested to use?
I'm wondering if I can get a general expression for the nth derivative of the characteristic function. I'll work on this.

8. Aug 31, 2012

### Ray Vickson

That formula is the same one I use, but in a different variable (k instead of t). The reason I use the moment-generating function instead of the characteristic function is just to avoid the annoying factor 1/i^k in front. As to a link: just Google "moment generating function", which turns up numerous articles.

RGV

9. Sep 6, 2012

### fluidistic

Some news about this. I've found the first 2 moments (I used the formula in my previous post) and I'd like to find the first 2 cumulants.
What I've done so far is $N \ln (pe^{ik}+1-p)=\sum _{n=1}^{\infty } C_n \frac{(ik)^n}{n!}$. I'm stuck here. I know I want $C_1$ and $C_2$ but I don't know how to proceed; at all. Any tip is welcome.