I was just wondering if a formula existed that gave a number of expected successes over a number of trials.
For example:
If there is a 1 in 50,000 chance of something happening, and you run 1 million trials, how often would you expect a 'success' to happen! I looked online but wasn't able to find this and I don't really have a background in mathematics, I was just interested in knowing if a formula for this existed is all.
If the probability $p$ of a success does not change between independent trials, then the number of 'successes' are given by a binomial distribution; that is, the probability of getting $k$ successes in $n$ trials is:
$$ P(k \text{ success in } n \text{ trials}) = \binom{n}{k}p^k(1-p)^{n-k}. $$
where
$$ \binom{n}{k} = \frac{n!}{k!(n-k)!}. $$
In your case, you would use $p = 1/50000$ and $n = 1000000$.
The expected number of successes is $pn$, so using your numbers, we would expect $1/50000 \cdot 1000000 = 20$ successes.