I'm sure this has been asked before but I can't find the exact variant I'm looking for.
I have an infinite population of elements. I take a sample of those, say 10000, and make a measurement for each of them. The result could be "pass" or "fail". I get 3 "fail"s. Based on this information now I would like to know, what is the probability that another sample of 10000 elements, will give me the value of 10 "fail"s. How do i calculate this?
There are two parts to what you want.
First, you need to use your sample to estimate the proportion of fails.
On the basis of the fact that you have 3 fails out of 10000, the estimate of the proportion is given by $\hat p= \frac 3 {10000}$. There are ways to give bounds to this estimate. Have a look at:
http://www.ics.uci.edu/~jutts/8/Lecture20Compact.pdf
and
http://onlinestatbook.com/2/estimation/proportion_ci.html
for further details.
Second, you want to find the probability of achieving 10 fails in the next sample of 10000. For this you can use the Binomial distribution. If an event has probability of occurring $p$ and you perform $n$ trials, then we say that the number of times that it will occur has a Binomial distribution $X ~ B(n,p)$. You will use $n=10000$ and $p=\hat p$. Trying different values of $\hat p$ - remember you will have a set of possible values - will give slightly different results.
The probability of 10 fails is given by $P(X=10)$, for which there is a standard formula. Look at:
https://en.wikipedia.org/wiki/Binomial_distribution
If you want to use Excel, then have a look at this:
http://homepages.wmich.edu/~bwagner/StatReview/Binomial/binomia%20in%20excel.htm