View Single Post
  #3  
Old 10-20-2005, 01:35 PM
Toddy Toddy is offline
Senior Member
 
Join Date: Jun 2005
Posts: 280
Default 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.
Reply With Quote