Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If the probability of hitting a target is $1/5$, and 10 shots are fired independently, what is the probability of the target being hit at least twice?

Let $X$ be the number of times the target is hit. We want to find $P(X \geq 2)$. So $$P(X \geq 2) = 1-P(X < 2)$$

$$ = 1- \binom{10}{0} (0.2)^{0} (0.8)^{10}-\binom{10}{1} (0.2)^{1}(0.8)^{9}$$

Would that be correct?


share|cite|improve this question
Yes, that is correct, and I am pleased that you figured out that it is easier to calculate the complementary probability instead of adding up $P\{X = 2\} + P\{X = 3\} + \cdots + P\{X = 10\}$ – Dilip Sarwate Dec 29 '11 at 1:20

One way to check theory is to simulate the problem. The code snippet below (using Octave) gives the empirical value of $0.62980$ which is comparable to the answer you have: $0.62419$ (See computation at Wolfram Alpha).

Of course, simulations like the one below are no guarantee that your theoretical answer is correct. However, at the very least they can help rule out incorrect answers and serve as a secondary check to your theoretical analysis.

function ev = ProbEst()

# Probability of hit is 1/5
probHit = 1/5;

totalIter = 10000;
noShots = 10;

# Counter to track if the event of interest
# has occurred 
eventOccurred = 0;

# Set seed of random number generator

for iter =1:totalIter
    targetHit = 0;
    for shot = 1:noShots
        if (rand(1,1) < probHit)
            targetHit += 1;
    if (targetHit >= 2)  
        eventOccurred += 1;

# Output empirical probability to console

share|cite|improve this answer
So this does nothing except say "I can't say your result is wrong". – msh210 Dec 29 '11 at 22:44
It is a reality check, or would be if tards had bothered to estimate the size of the sampling error in his/her estimate (looks as though it ought to be $\sim \pm 1$ in the second digit). When you have to do this sort of thing for real it is always a good idea to conduct some sort of reality check. It also shows a horrible example of Octave/Matlab un-vectorised code, but I suppose that could be to make it comprehensible to the uninitiated. – Conrad Turner Jan 6 '15 at 21:45


share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.