+ Reply to Thread
Results 1 to 7 of 7

Thread: Calculating probability of the expected number of runs needed

  1. #1
    Points: 16, Level: 1
    Level completed: 31%, Points required for next Level: 34

    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Calculating probability of the expected number of runs needed




    Hello, I'm working on a personal project but I've hit a bit of a wall in working out an equation. I'd like to find the probability of a result given certain constraints so I can estimate the expected number of runs needed to get a certain number of a result. In this case, I have a chain of probabilities where I have the probability of a result I'm hoping for. For each part of the chain, there is a probability of it returning something at all, then a probability of it being the result I want.

    The first three will always return a result, 100% chance of a result, but there's only a 5% chance that this is the result I want. After these first three, I have five additional results. Each of these five have a 69% chance of occurring at all. They also will only occur if the previous result occurred. Along with that, they also only have a 5% chance of being the result I want. Now I have the equation to find the probability of getting my result that I want at least once, but I can't figure out the probability that it will occur any number of times, such as twice, or three times.

    Hopefully I can explain this a bit clearer.

    The first, second, and third result will always occur with a 5% chance of being the result I want.
    The fourth result has a 69% chance of occurring, with a 5% chance of being the result I want.
    The fifth, sixth, seventh, and eighth result will only occur if the the result before it has as well, with a 69% chance of occurring, with a 5% chance of being the result I want.

    I don't often work with probabilities, so I hope I explained this clearly. Thanks in advance for any help, and please let me know if I should clarify myself on any part of this.

  2. #2
    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: Calculating probability of the expected number of runs needed

    Let

    X be the number of successes in the first 3 trials.

    Y be the number of successes on the possible next 5 trials.

    With the assumptions of independence of the trials, we have X follows a binomial distribution and Y follows a truncated geometric distribution.

    And you would like to find the distribution of X + Y, which is the number of total successes.

    The pmf of this is not very nice and I guess you need to calculate for each support point.

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

    Zackley (09-28-2015)

  4. #3
    Points: 16, Level: 1
    Level completed: 31%, Points required for next Level: 34

    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Calculating probability of the expected number of runs needed

    I was hoping that wasn't the case. I could calculate each probability manually, but in my personal project the probability of the result being the one I want is variable. There is always a 69% chance of the last 5 trials of occurring dependent on the previous success, but it's not always a 5% chance for it to be the result I want. I don't necessarily need the equation for those, as I'm working with a specific set of data, but it would have sped up the process.

    Anyway, thank you for the help.

  5. #4
    Devorador de queso
    Points: 95,781, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,933
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: Calculating probability of the expected number of runs needed

    In the possible additional five rounds does it continue to go if anything occurred or only if the desired event occurs.
    I don't have emotions and sometimes that makes me very sad.

  6. #5
    Points: 16, Level: 1
    Level completed: 31%, Points required for next Level: 34

    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Calculating probability of the expected number of runs needed

    So long as any result occurs the rounds continue.

  7. #6
    Devorador de queso
    Points: 95,781, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,933
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: Calculating probability of the expected number of runs needed

    In those additional 5 rounds you say there is a 5% chance of getting what you want. Is that 5% of the time when something returns you'll get what you want or is it 5% chance to get what you want total?

    Either way the approach will be like BGM said - we'd need to calculate for each support point. That actually isn't too bad though since we can get the pmf of X and Y fairly easily and getting the pmf of the sum is tedious to do by hand but isn't too bad to have a computer do it for you. I do these kinds of things in R a lot and that's not too bad but for others that don't like code I've shown how to do it in excel.
    I don't have emotions and sometimes that makes me very sad.

  8. #7
    Points: 16, Level: 1
    Level completed: 31%, Points required for next Level: 34

    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Calculating probability of the expected number of runs needed


    It's a 5% chance for each round. I'll code a function to figure out the probability of different amounts. Thank you for the help working this out though.

+ 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