#1
|
|||
|
|||
Trying to find a simple formula
Obviously I can do this with brute force. Suppose I have an independent event happening x% of the time. If I repeat the event through n trials, I have y successes.
Define events(x,n) as the number of successes with n trials with x% of a success. This will be a binomial distribution. If I know what x, n, and y are, is there an easy way to figure out p(events(x,n)<=y)? Obviously I can figure out Sum(p(events(x,n)==i),i = 0 to n). But in some cases, I have hundreds of trials. Otherwise, brute force it is. Which of course is: Sum( (x^i)*(1-x)^(n-i) * Choose(n,i), i = 0 to y) Example: 10 coin flips. I want to know the odds that I have 4 or fewer heads. So odds are Sum(Choose(10,i),i=0 to 4)). |
#2
|
|||
|
|||
Re: Trying to find a simple formula
[ QUOTE ]
Obviously I can do this with brute force. Suppose I have an independent event happening x% of the time. If I repeat the event through n trials, I have y successes. Define events(x,n) as the number of successes with n trials with x% of a success. This will be a binomial distribution. If I know what x, n, and y are, is there an easy way to figure out p(events(x,n)<=y)? Obviously I can figure out Sum(p(events(x,n)==i),i = 0 to n). But in some cases, I have hundreds of trials. Otherwise, brute force it is. Which of course is: Sum( (x^i)*(1-x)^(n-i) * Choose(n,i), i = 0 to y) Example: 10 coin flips. I want to know the odds that I have 4 or fewer heads. So odds are Sum(Choose(10,i),i=0 to 4)). [/ QUOTE ] odds of exactly 4 coin flips would be.. .2051 3 would be .1172 2 .044 1 .009 and 0 would be .0010 Formula to come.. |
#3
|
|||
|
|||
Re: Trying to find a simple formula
[ QUOTE ]
Obviously I can do this with brute force. Suppose I have an independent event happening x% of the time. If I repeat the event through n trials, I have y successes. Define events(x,n) as the number of successes with n trials with x% of a success. This will be a binomial distribution. If I know what x, n, and y are, is there an easy way to figure out p(events(x,n)<=y)? Obviously I can figure out Sum(p(events(x,n)==i),i = 0 to n). But in some cases, I have hundreds of trials. Otherwise, brute force it is. Which of course is: Sum( (x^i)*(1-x)^(n-i) * Choose(n,i), i = 0 to y) Example: 10 coin flips. I want to know the odds that I have 4 or fewer heads. So odds are Sum(Choose(10,i),i=0 to 4)). [/ QUOTE ] Trying to find an easy way to type it.. p(x 4 heads) = N! (number of flips)/(N-X)!X! (p (odds of success whch is 1/2) to the X power) (q (odds of failure 1/2) to the n-x power.. Hard to write this in text.. PM me if you have any ??s or type it here. |
#4
|
|||
|
|||
Re: Trying to find a simple formula
I think your formula is for exactly y. I want to know 0 to y.
It might be that summing all the exact ys together is the only way to do this (brute force). |
#5
|
|||
|
|||
Re: Trying to find a simple formula
[ QUOTE ]
I think your formula is for exactly y. I want to know 0 to y. It might be that summing all the exact ys together is the only way to do this (brute force). [/ QUOTE ] Yes if u look at my first note that is i think the only way to to do it.. get the sums and put them all together.. sorry if i was no help. |
#6
|
|||
|
|||
Re: Trying to find a simple formula
Just told me what I thought I already knew. Wasn't sure if there was a better way to do it.
Thanks! |
|
|