# Which Formula do I Need?

#### 0hlie

##### New Member
Hi, I've been scouring the internet for answers but I have very little knowledge when it comes to probability so I need help.

I have 10 trials, each with a different probability of success. I need to figure out the probability of at least 5 successes out of these 10 trials. Which formula do I need to get this answer?

#### Dason

You're just going to need to brute force it. There are ways to get software to do this for you but if they really do all have different probabilities of success then the only way to do it is to write out all the possible ways to get at least 5 successes, the probability associated with each of those, and then add all of those probabilities together.

You can simplify this by doing things iteratively. Basically if you have the distribution for the number of successes when only looking at k trials then getting the distribution for looking at k+1 trials isn't too bad (think about the logic that would go into this). With this kind of thinking you could program it up in excel fairly easily. Otherwise if you're open to using other software I wrote a package in R that could do some stuff like this fairly easily.

#### 0hlie

##### New Member
OK I will try brute forcing it in excel but just in case I find it impractical for my uses maybe I'll try your solution in R. If you could provide me that package it would be greatly appreciated.