# Probability of finding a defective

I'm testing products one by one that has a probability of 0.05 of being defective. 1) Probability of finding the first defective at 10th product tested

$0.05 * 0.95^9$

2) mean and variance of the number of units you need to test until you find your first defective

3) Probability that you'll find exactly 5 defectives from 100 products tested

$^{100}C_5 * 0.05^5 * 0.95^{95}$

4) If I test 100 units randomly from a batch of 1000 units known to have 50 defectives. What is the probability that you will find exactly 5 defectives among your 100 units

$^{50}C_5 * ^{950}C_{95} * 0.05^5 * 0.95^{95}$

Did I solve correctly? and what is the mean and variance in 2)?

The number of units you need to test until you find your first defective is a geometric distribution with parameter $0.05$. Thus, the mean will be $\frac{1}{0.05} = 20$ and variance will be $\frac{1 - 0.05}{0.05 * 0.05} = 380$. Read this for derivations of mean and variance formulas.