PDA

View Full Version : Method of Indicators for computing expectation


houston07
Sep28-10, 01:20 PM
Hi,

I have the following problem: Suppose you have a coin that has chance p of landing heads. Suppose you flip the coin n times and let X denote the number of 'head runs' in n flips. A 'head run' is defined as any sequence of heads. For example the sequence HHTHHHHHTTTTHHTHT contains 4 head runs. Given this information, compute E[X] and Var[X].

I cannot understand how to set up the indicator method that will allow me to solve this problem quickly.

awkward
Sep29-10, 08:39 PM
Hi,

I have the following problem: Suppose you have a coin that has chance p of landing heads. Suppose you flip the coin n times and let X denote the number of 'head runs' in n flips. A 'head run' is defined as any sequence of heads. For example the sequence HHTHHHHHTTTTHHTHT contains 4 head runs. Given this information, compute E[X] and Var[X].

I cannot understand how to set up the indicator method that will allow me to solve this problem quickly.
Define X_i = 1 if flip i is the start of a run of heads,
= 0 otherwise.

To find E[X] you will need to compute E[\sum X_i].

To find Var[X] you will need to compute, in addition, E[\sum X_i X_j], where the sum runs over all pairs i, j with i < j.

Eero
Sep30-10, 02:18 AM
Seems interesting, but hard problem. I suspect that the indicator method does not work in case of p \neq 1/2. It is easier to consider a fair coin with p=1/2 at the beginning.

Eero
Oct1-10, 06:04 AM
After a messy, lengthy calculations (not the indicator method) an unexpectedly simple formula for the E(x) occurred:

E(x)=p*(p+n*q) ; q=1-p

I was shocked!! Indeed, there must be a simple probabilistic approach that replaces involved calculations and hard analysis. Maybe really the indicator method. Still needs to think about this problem.

bpet
Oct1-10, 07:47 AM
After a messy, lengthy calculations (not the indicator method) an unexpectedly simple formula for the E(x) occurred:

E(x)=p*(p+n*q) ; q=1-p

I was shocked!! Indeed, there must be a simple probabilistic approach that replaces involved calculations and hard analysis. Maybe really the indicator method. Still needs to think about this problem.

E(X1)=p and E(Xi)=pq for i>1 so E(X) = p+(n-1)pq = p^2 + npq

Eero
Oct2-10, 04:15 AM
Nice one bpet!!!

I would not come into this as soon. Do you have a clue how to determine E(Xi*Xj) now, to calculate Var(X)?

bpet
Oct2-10, 05:53 AM
Nice one bpet!!!

I would not come into this as soon. Do you have a clue how to determine E(Xi*Xj) now, to calculate Var(X)?

Thanks! Similar way, more cases to consider e.g. j=i, j=i+1, j>i+1.