Answer:
The probability that it takes more than 30 lines of code until Joe finds his first bug is 0.2821.
Explanation:
Let X = number of bugs in every 25 lines of code.
The probability of the random variable X is,
.
The random variable X follows a Geometric distribution.
A Geometric distribution is the probability distribution of the number of Bernoulli trials needed before the first success.
The probability mass function of Geometric distribution is:
Compute the probability that it takes more than 30 lines of code until Joe finds his first bug as follows:
P (X > 30) = 1 - P (X ≤ 30)
Thus, the probability that it takes more than 30 lines of code until Joe finds his first bug is 0.2821.