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)).
|