Exercise: Surgical Strike | Random Variable | Binomial distribution
You are in the Indian Air Force and your assignment is to conduct a surgical strike on a terrorist camp in Pakistan.
Given your training credentials and the nature of a surgical strike, you have a 50% chance of correctly throwing the bomb on the target. 2 bomb hits are required to completely eliminate the target
Q.1) What is the probability that your surgical strike is a success if you throw 4 bombs?
This is a Binomial Distribution. Each trial (bomb throw) has a binary outcome (hit or miss).
Probability of Hit (p) = 0.5
Probability of Miss (q = 1-p) = 0.5
Number of bombs (n) = 4
For the surgical strike to be a success, you should hit at least 2 bombs.
So, the probability of success:
P(Success) = P(2 bombs Hits) + P(3 Bomb Hits) + P(4 bomb Hits)
P(Success) = 4C2 (1/2)?+ 4C3 (1/2)? + 4C4 * (1/2)?
P(Success) = 0.375 + 0.25 + 0.0625 = 0.6875
Therefore, if you carry only 4 bombs, you only have 68% chance of success.
领英推荐
Q.2) It is not nice to fail in a surgical strike. You got to be sure. How many bombs should you throw from your fighter jet so that you can be 99% sure that the terrorist camp is eliminated?
Now, n is unknown.
Probability of getting atleast 2 hits = 1 — Probability of 0 hits — Probability of 1 hit
0.99 = 1 — nC0*(1/2)^n —nC1*(1/2)^n
Solve it, or code it.
Ps = []
for n in range(2,20):
#Probability of getting atleast 2 hits = 1 - Probability of 0 hits - Probability of 1 hit
P_2hits = 1 - math.comb(n, 0) * (1/2**n) - math.comb(n, 1) * (1/2**n)
Ps.append(P_2hits)
import matplotlib.pyplot as plt
plt.plot(range(2,20),Ps,'g')
plt.xlabel('Number of Bombs')
plt.ylabel('Probability')
plt.axhline(0.99)
plt.show()
At n =11, the probability of getting at least 2 hits crosses 99%
You should thus carry 11 bombs for 99% success.
This question is inspired from Cengage publication.