PDA

View Full Version : Trying to find a simple formula


TomCollins
10-20-2005, 01:26 PM
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)).

Toddy
10-20-2005, 01:31 PM
[ 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..

Toddy
10-20-2005, 01:35 PM
[ 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.

TomCollins
10-20-2005, 02:18 PM
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).

Toddy
10-20-2005, 02:31 PM
[ 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.

TomCollins
10-20-2005, 03:35 PM
Just told me what I thought I already knew. Wasn't sure if there was a better way to do it.

Thanks!