Probability, Statistics - Whats the answer? Assume that a programmer makes on average two errors in every hundred lines of code
written and that errors occurring in different lines of code are independent. Suppose the
programmer writes a software application consisting of 75 lines of code.
a. What is the probability that the application contains no errors?
b. What is the probability that the application contains exactly one error? Show
your working
I don't even know how to start! 
Pls can someone help me!
 A: It is reasonable to suppose that you are expected to use a Poisson model. The mean number per $100$ lines of code is $2$, so the mean per $75$ lines of code is $(0.2)(75)=1.5$.
So we model the number $X$ of errors in $75$ lines by a Poisson with $\lambda=1.5$. 
The probability that $X=0$ should then be about $e^{-1.5}$. The probability that $X=1$ should be about $e^{-1.5}\frac{(1.5)^1}{1!}$. 
A: Hint:  First find the probability that a given line of code (say the first line, because it doesn't matter) contains an error.
A: Note: I am assuming in my answer that this is a question about binomial probability. I am assuming that there can be no more than one error per line.
I'm not too sure how to give a hint without giving it all away, so here are solutions (in spoilers - mouse over at your own risk!):
a.

 P(Error in One Line) = 0.02. (Multiply by 100: he makes two errors every 100 lines.) So P(No Error in One Line) = 0.98. So $0.98^{75}$ is the probability of no error in all 75 lines, because the events are independent, so you just multiply them.

b.

 We can do this with the binomial formula, which we use to calculate P(n successes in k trials). We're looking for $P(k=1)$. We have $n=75$ trials and a probability of 'success' $p =0.02$. The binomial formula is: $${n \choose k}p^k \cdot (1-p)^{n-k} = {75 \choose 1}\cdot 0.02^1 \cdot (1-0.02)^{74}$$ You can do the computation.

