+ Reply to Thread
Results 1 to 5 of 5

Thread: Came across a very difficult problem...

  1. #1
    Points: 56, Level: 1
    Level completed: 12%, Points required for next Level: 44

    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Came across a very difficult problem...




    I really thought hard over this problem for about a hour or two. Here's the problem:

    A coin has P(head) = p. Keep tossing until you finish a run of 5 heads (i.e., until you get a 5 heads in a row). Find the expected number of tosses it takes.

    So's here's my work. I don't know if I am doing it correctly.

    Using the definition of expected value:

    EX = sum(x*P(X=x))

    Where X is the number of tosses to get a run of 5 heads.

    The probability of getting a run of 5 heads at

    5 tosses (HHHHH): p^5
    6 tosses (THHHHH): q*p^5
    7 tosses (☐THHHHH) : (p+q)*q*p^5 = q*p^5 (since p+q=1)
    8 tosses (☐☐THHHHH): (p+q)^2*q*p^5 = q*p^5

    So, the expected value is:

    EX = 5*p^5 + 6*q*p^5 + 7*q*p^5 + 8*q*p^5 + ...

    Looks like the answer diverges, so I must be doing something wrong here.
    Last edited by vxs8122; 09-08-2013 at 09:00 AM.

  2. #2
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Re: Came across a very difficult problem...

    If you're assuming independence, then the number of replications (N) would be N = E{X)/p based on 5 tosses.

  3. #3
    Points: 56, Level: 1
    Level completed: 12%, Points required for next Level: 44

    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Came across a very difficult problem...

    Quote Originally Posted by Dragan View Post
    If you're assuming independence, then the number of replications (N) would be N = E{X)/p based on 5 tosses.
    I'm don't follow what you are trying to say. What I am looking for is the expected value, and I don't see how I can use the number of trials (N) in the equation.
    Last edited by vxs8122; 09-08-2013 at 12:58 AM.

  4. #4
    TS Contributor
    Points: 22,410, Level: 93
    Level completed: 6%, Points required for next Level: 940

    Posts
    3,020
    Thanks
    12
    Thanked 565 Times in 537 Posts

    Re: Came across a very difficult problem...

    This is a very well-known, commonly asked Markov Chain problem. The number of tosses itself will follows a discrete phase-type distribution.

    Without touching the notion of Markov Chain, you may just need the following "idea of regeneration" to solve this problem.

    1. Note that \{T, HT, HHT, HHHT, HHHHT, HHHHH\} forms a partition.

    X|T \stackrel {d} {=} X + 1
    X|HT \stackrel {d} {=} X + 2
    X|HHT \stackrel {d} {=} X + 3
    X|HHHT \stackrel {d} {=} X + 4
    X|HHHHT \stackrel {d} {=} X + 5
    X|HHHHH \stackrel {d} {=} 5

    \stackrel {d} {=} denotes equal in distribution; and those sequence are from results beginning from first toss.

    Now you may use Law of total expectation to calculate E[X].

  5. The Following User Says Thank You to BGM For This Useful Post:

    hlsmith (09-12-2013)

  6. #5
    Omega Contributor
    Points: 38,334, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,998
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: Came across a very difficult problem...


    BGM - answering probability problems, all day, everyday, with authority. I always look forward to your cryptic looking resolutions of countless (well maybe 2,500) probability problems. Some day I am going to invest some time and try to read all of your posts, so I can acquire a sound and well versed education in the ways.

    Keep up the solid work (of having me scratch my head and say "what now")!
    Stop cowardice, ban guns!

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats