+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17

Thread: simple coin flip problem

  1. #1
    Points: 4,341, Level: 41
    Level completed: 96%, Points required for next Level: 9

    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    simple coin flip problem




    hi, I recently discovered this forum and I think this could help me with my stats courses...

    I havent received the text book yet, so my first assignment is more difficult without anything to consult... heres the question:

    you flip a coin with probability p unknown, you keep flipping until you get a pattern of TTH landing in a row, then u stop. let X be the # of flips, calculate E(X).

    I know flipping a coin is binomial. I just need something to help me get started, I calculated that P(TTH) = (1-p)(1-p)p = p(1-p)^2 but am unsure if this helps any and am not sure where to start.

    i know that E(X) = SUM x*p(x) in this case we sum from x = 3 to x = infinite

    but how do i go about calculating p(x)

  2. #2
    Points: 4,393, Level: 42
    Level completed: 22%, Points required for next Level: 157

    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If the random experiment is ' tosing the coin till the first head turns up and noting the number of tosses ', then the distribution is not binomial but geometric. f(x)=q^x.p; x=0,1,2,...
    where p is the probability of getting head.
    Expected value of the no. of tosses is q/p.

  3. #3
    Points: 5,768, Level: 49
    Level completed: 9%, Points required for next Level: 182

    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    its not quite geometric if you are required to have two tails in a row followed by a head. a success for this problem is when three tosses yields TTH in exactly that sequence. a success for a geometric would be "the first instance of a head" example:

    thththtth would be x = 9 in this problem but would be x = 2 for a geometric distribution.

    I don't have an answer for your question, but its not geometric. I would have to take a brute force approach to this problem and see what came out of it.

    i hope that helps,
    jerry

  4. #4
    Points: 4,341, Level: 41
    Level completed: 96%, Points required for next Level: 9

    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    apparently not all coin flipping questions are simple...

    the assignment was extended until wednesday, someone said theres an example similar in the book, however i have not received the book in the mail yet

  5. #5
    Points: 5,768, Level: 49
    Level completed: 9%, Points required for next Level: 182

    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm still working on it....

  6. #6
    Points: 4,341, Level: 41
    Level completed: 96%, Points required for next Level: 9

    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    rumour is it has to do with conditioning so E(X) = E[E(X|Y)]

    but i didnt know what to condition on, and we never did conditioning last year in stats, so i have no idea what it does or how it works

  7. #7
    Points: 5,768, Level: 49
    Level completed: 9%, Points required for next Level: 182

    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    LOL,

    logman that is funny, because here i am trying to solve your problem as stated. and i don't think it is that simple.

    what i did was to write out several of the possible successful sequences, eg: tth, htth, ttth, thtth, tttth... you get the idea. then i used your formula "P(TTH) = (1-p)(1-p)p = p(1-p)^2" and did a series of computations of the probabilities.

    so for the list above:

    P(TTH) = (1-p)(1-p)p = p(1-p)^2
    P(htth) =p^2(1-p)^2
    P(ttth)= p(1-p)^3
    etc.

    If you plug those probabilities into a comutation fo expected value it appears that the result is an infinite series with coefficients that follow the binomial theorem (ie pascal's triangle). I suspect that the series will be a collapsing series though i had not continued to work on it since then. I was simply waiting to see if you were still working on this or not. its an interesting problem, but i don't see a solution using a conditional unless the original problem was mis-stated.

    cheers
    jerry

  8. #8
    Points: 4,341, Level: 41
    Level completed: 96%, Points required for next Level: 9

    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the solution hasnt been posted on the website yet, but i stated the question properly, and it involves conditioning, it would be impossible to calculate it using a brute force method similar to what u were trying

  9. #9
    Points: 5,768, Level: 49
    Level completed: 9%, Points required for next Level: 182

    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What makes you so sure that "it would be impossible to calculate" using my approach? Have you tried and shown it to fail, or is there a flaw in what i posted?

    I'm certainly not infallible, but if you are going to claim that my approach cannot yield a solution you should offer your reasoning.

    I'll take an honest shot at solving it using a conditional, why don't you take a shot at proving my original attemp invalid....

    jerry

  10. #10
    Points: 4,341, Level: 41
    Level completed: 96%, Points required for next Level: 9

    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well I'm not sure exactly what you are doing, but there is obviously an infinite number of possibilities to get this sequence ending TTH, you couldnt possibly calculate the probability of each..

  11. #11
    Points: 4,341, Level: 41
    Level completed: 96%, Points required for next Level: 9

    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    3-27. Condition on the outcome of the first flip to obtain
    E[X] = E[X|H]p + E[X|T](1 − p)
    = (1 + E[X])p + E[X|T](1 − p).
    Condition on the outcome of the next flip gives
    E[X|T] = E[X|TH]p + E[X|TT](1 − p)
    = (2 + E[X])p + (2 + 1/p)(1 − p),
    where the final equality follows since given that the first two flips are tails the number of additional
    flips is just the number of flips needed to obtain a head. Putting the preceding together yields
    E[X] = (1 + E[X])p + (2 + E[X])p(1 − p) + (2 + 1/p)(1 − p)2
    or
    E[X] = 1 / [p(1 − p)^2]

  12. #12
    Points: 5,768, Level: 49
    Level completed: 9%, Points required for next Level: 182

    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Logman,

    that solution does not match the question you posted. that solution is for working with a geometric distribution. you posed the question as being when you could first expect to see the exact sequence TTH, which is what i was working on. i did try to solve it using a conditional but i was unsuccessful. while trying i did find a counting solution that leads tot he same colapsing series that i found on my first try.

    cheers
    jerry

  13. #13
    Points: 5,768, Level: 49
    Level completed: 9%, Points required for next Level: 182

    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Logman
    well I'm not sure exactly what you are doing, but there is obviously an infinite number of possibilities to get this sequence ending TTH, you couldnt possibly calculate the probability of each..
    no, i could not compute an infinite number of probability values. but i can, and did, discover a pattern that can be generalized to uncover an infinite series that sums to give the probability. that series turns out to be a collapsing series as well, so the value can be found.

    It is a moot point at this point since the question that i was working on is not the one you were given the solution to.

    cheers
    jerry

  14. #14
    Points: 4,341, Level: 41
    Level completed: 96%, Points required for next Level: 9

    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    3-27. A coin that comes up heads with probability p is continually flipped until the pattern T, T, H appears. (That is, you stop flipping when the most recent flip lands heads, and the two immediately preceding it lands tails.) Let X denote the number of flips made, and find E[X].

    thats the question copied straight from the assignment, i dont know what you mean how/if I stated it differently

  15. #15
    Points: 5,768, Level: 49
    Level completed: 9%, Points required for next Level: 182

    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    well that is what you originally posted, i guess then that i disagree that the solution that you were provided is the correct solution tot hat problem.

    given that the first two flips are tails the number of additional
    flips is just the number of flips needed to obtain a head
    this part of the solution is saying "from here on out its geometric" because the claim is made that the number of additional flips is the number to obtain a head, that is clearly a geometric distribution. however the way the problem is written the following sequence is one possible outcome whose probability is not consdered in the solution that you posted: thththtth the posted solution only allows flipping until the first head is obtained after the third flip. seems like the solver is allowing for all possible combinations in the first two flips but then disallowing anything but a geometric situation for all following flips.

    my opinion is the solution does not match the problem,

    cheers
    jerry

+ Reply to Thread
Page 1 of 2 1 2 LastLast

           




Similar Threads

  1. Yet another "flipping" coin problem
    By ramrad in forum Probability
    Replies: 4
    Last Post: 04-12-2011, 08:15 PM
  2. unfair coin problem
    By sajee3a in forum Probability
    Replies: 8
    Last Post: 09-14-2010, 01:46 AM
  3. Simple Problem
    By tnind in forum Statistics
    Replies: 0
    Last Post: 12-03-2009, 06:34 AM
  4. Flip a coin probability problem
    By lespaul in forum Probability
    Replies: 2
    Last Post: 03-05-2009, 03:12 AM
  5. problem of tossing a coin -- plz help
    By masim in forum Probability
    Replies: 1
    Last Post: 10-05-2008, 11:36 PM

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