Results 1 to 6 of 6

Math Help - Coin tossing, Expected values N and N^2

  1. #1
    Newbie
    Joined
    Sep 2011
    Posts
    14

    Coin tossing, Expected values N and N^2

    Here's the problem I'm working with, what I'm stumped on is below:
    A biased coin has probability p of coming up Heads. The coin is tossed repeatedly. Let N be the number of tosses until Heads appears for the first time. By conditioning on the outcome of the first toss, find the expected values of N and N^2. Use this to find the variance of N.

    So, I know how to compute E[N] & E[N^2] here without conditioning on the first toss (i.e. I know what the answers are), but I'm a little stumped on how to get E[N^2] via that route. I know I can utilize E[N^2]=E[E[N^2|Y]], but I'm not sure how to solve E[N^2|Y]. I think a little nudge in the right direction is all I need! Thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: Coin tossing, Expected values N and N^2

    Quote Originally Posted by puggles View Post
    Here's the problem I'm working with, what I'm stumped on is below:
    A biased coin has probability p of coming up Heads. The coin is tossed repeatedly. Let N be the number of tosses until Heads appears for the first time. By conditioning on the outcome of the first toss, find the expected values of N and N^2. Use this to find the variance of N.

    So, I know how to compute E[N] & E[N^2] here without conditioning on the first toss (i.e. I know what the answers are), but I'm a little stumped on how to get E[N^2] via that route. I know I can utilize E[N^2]=E[E[N^2|Y]], but I'm not sure how to solve E[N^2|Y]. I think a little nudge in the right direction is all I need! Thanks
    E(N^2|Y=y)=\sum_n n^2 p(n|y)

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor chisigma's Avatar
    Joined
    Mar 2009
    From
    near Piacenza (Italy)
    Posts
    2,162
    Thanks
    5

    Re: Coin tossing, Expected values N and N^2

    Quote Originally Posted by puggles View Post
    Here's the problem I'm working with, what I'm stumped on is below:
    A biased coin has probability p of coming up Heads. The coin is tossed repeatedly. Let N be the number of tosses until Heads appears for the first time. By conditioning on the outcome of the first toss, find the expected values of N and N^2. Use this to find the variance of N.

    So, I know how to compute E[N] & E[N^2] here without conditioning on the first toss (i.e. I know what the answers are), but I'm a little stumped on how to get E[N^2] via that route. I know I can utilize E[N^2]=E[E[N^2|Y]], but I'm not sure how to solve E[N^2|Y]. I think a little nudge in the right direction is all I need! Thanks
    The probability that a head appears for the first time at the k-th toss is...

    p_{k}= \frac{1}{2^{k}} (1)

    ... and from (1) You derive...

    E \{n\} = \sum_{k=1}^{\infty} \frac{k}{2^{k}} (2)

    E \{n^{2}\} = \sum_{k=1}^{\infty} \frac{k^{2}}{2^{k}} (3)

    For the series (2) You can consider that for |x|<1 is...

    \sum_{k=0}^{\infty} x^{k}= \frac{1}{1-x} \implies \sum_{k=1}^{\infty} k\ x^{k-1}= \frac{1}{(1-x)^{2}} \implies\sum_{k=1}^{\infty} k\ x^{k}= \frac{x}{(1-x)^{2}} (4)

    ... and inserting in (4) x=\frac{1}{2} You obtain...

    E \{n\}= 2 (5)

    For the series (3) You can consider that for |x|<1 is...

    \sum_{k=2}^{\infty} k\ (k-1)\ x^{k-2}= \frac{2}{(1-x)^{3}} \implies \sum_{k=2}^{\infty} k\ (k-1)\ x^{k}= \frac{2\ x^{2}}{(1-x)^{3}} (6)

    ... and combining (4), (6) and a bit of patience You arrive to write...

    \sum_{k=1}^{\infty} k^{2}\ x^{k} = \frac{x\ (1+x)}{(1-x)^{3}} (7)

    ... ... and inserting in (7) x=\frac{1}{2} You obtain...

    E \{n^{2}\}= 6 (8)

    The computation of variance using (5) and (8) is left to You...

    Kind regards

    \chi \sigma
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Sep 2011
    Posts
    14

    Re: Coin tossing, Expected values N and N^2

    Hmmm, I don't think that's how I'm supposed to approach the problem here (we've already worked out this problem in my class doing the above method). I solved for E[N] by conditioning on the first toss:
    let Y = 0 If first toss is tails & 1 if first toss is heads
    then E[N|Y=1] = 1 because the first toss would give you heads
    and E[N|Y=0] = 1 + E[N]

    then: E[N]=E[N|Y=0]P(Y=0) + E[N|Y=1]P(Y=1) = 1/p

    I was hoping that E[N^2]=E[N^2|Y=0]P(Y=0) + E[N^2|Y=1]P(Y=1)
    would be just as easy, but like I said earlier, E[N^2|Y] doesn't jump out right away like the earlier work I did.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: Coin tossing, Expected values N and N^2

    OK time to be explicit: The conditional probabilities are:

    Pr(N=1|Y=1)=1

    Pr(N > 1|Y=1)=0

    Pr(N=n|Y=0)=Pr(N=n-1);\ \ n>1

    Pr(N=1|Y=0)=0.

    E(N^2|Y=0)= \sum_{n=1}^{\infty}n^2 Pr(n|Y=0)

    E(N^2|Y=1)=1

    CB
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Sep 2011
    Posts
    14

    Re: Coin tossing, Expected values N and N^2

    Thanks for the clarification!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. coin tossing
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: November 22nd 2010, 08:55 AM
  2. tossing a fair coin
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: May 10th 2010, 06:31 PM
  3. Tossing a coin
    Posted in the Statistics Forum
    Replies: 5
    Last Post: March 7th 2010, 12:05 AM
  4. coin tossing
    Posted in the Statistics Forum
    Replies: 8
    Last Post: January 30th 2010, 02:08 PM
  5. Coin Tossing
    Posted in the Statistics Forum
    Replies: 1
    Last Post: January 6th 2010, 04:09 AM

Search Tags


/mathhelpforum @mathhelpforum