If a bug is known to cause failure in a software module with a probability of 0.3, and you test the module 5 times, what is the probability of the module failing at least once?

Instruction: Assume five independent tests each have failure probability 0.3. Calculate the chance of at least one failure and explain why repeatedly running the same real test may not satisfy that model.

Context: This question evaluates understanding of failure probability and the binomial distribution.

Updated

Official answer

Under the stated independent, constant-probability model, a test passes with probability 0.7. All five tests pass with probability 0.7^5 = 0.16807.

The complement is at least one failure: 1−0.7^5 = 0.83193, or 83.193%. This is not the probability of exactly one failure.

Real repeated software tests can be strongly dependent, especially with the same input or shared state. The calculation requires independent attempts with the stated failure probability; five executions alone do not establish this detection probability or prove the module reliable.

Related Questions