# Probability: Given a page has 2 errors, what is p s.t. they are on separate lines

1. Jun 5, 2012

### juanma101285

Hi, I have the following problem, but I am stuck on question D. I would really appreciate if someone could give me a hand! I think I have to use Bayes' theorem, but I don't know how :/. Thanks!

1. The problem statement, all variables and given/known data
"A page of typescript contains 40 lines, with 80 characters per line. Each character has probability p=0.001 (independently of the others) of being erroneous.

A) What is the probability that a particular line contains no errors (i.e., no erroneous characters)?
B) What is the probability that a particular line contains more than one error?
C) What is the probability that the page contains exactly two errors?
D) Given that the page contains exactly two errors, what is the probability that they occur on separate lines?"

2. Relevant equations
Bayes Theorem (I think)

3. The attempt at a solution
A)
p(x=0)=80C0*(0.001^0)*(0.999^80)=0.9231

B)
p(x=1)=80C1*(0.001^1)*(0.999^79)=0.0739
So,
p(x>1)=1-p(x=0)-p(x=1)=0.003

C)
p(x=2)=3200C2*(0.001^2)*(0.999^3198)=0.2087

D)
I do not know how to work out p(errors are on separate lines|page contains 2 errors). If Bayes' theorem is not needed, it would then be with the formula:

p(errors on separate lines|page has 2 errors)=p(errors on separate lines AND page has 2 errors)/p(page has 2 errors)... but how do I get the numerator for this division? :/

2. Jun 5, 2012

### Ray Vickson

Re: Probability: Given that a page has 2 erors, what is p s.t. they are on separate l

When you are GIVEN that the page has two errors, the probabilities 0.001 and 0.999 are now irrelevant (do you see why?). You now just have two things that are to be distributed randomly among 40 lines.

RGV

3. Jun 5, 2012

### D H

Staff Emeritus
Sometimes it helps to look at the "opposite" problem. In this case, there are two ways that two errors on a page can be distributed over the lines that comprise that page: (1) The two errors can be on two separate lines, or (2) both errors can be on the same line. These are mutually exclusive and collectively exhaustive events. So, given that there are two errors on the page, can you calculate the probability they are on the same line? Here the numerator in the conditional probability expression is the probability that one line contains two errors and that the remaining 39 lines are error-free. Note that there are 40 ways this can happen.