0

I am really stumped on how do do this question:

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?

I have no idea how to start this this off. Could you give a few hints please? I've learned about random variables if that is relevant.

Em.
  • 15,981
karambit
  • 171
  • 5
  • 17
  • show what you have done or thought process – Nebo Alex Jan 24 '16 at 03:07
  • When I first posted my answer, I hadn't solved Part D, but I've solved Part D now, so if you still want to find the answer by Part D and haven't figured it out yet, here's the answer. – Noble Mushtak Jan 24 '16 at 03:24

2 Answers2

1

a) What is the probability that one letter, independently of all others, has no error? It's $1-0.001=0.999$. One line has $80$ letters, so we simply need to calculate $0.999^{80}$, or about $0.923$.

b) If a line contains more than one error, than it contains at least two errors. This is the opposite of having zero errors or having exactly one error. The probability of having exactly one error can be found with binomial probability, or ${80 \choose 1}*0.001^1*0.999^{79}$, or about $0.0739$. Thus, the probability of having zero errors or exactly one error is $0.923+0.0739$, or about $0.997$. The probability of the opposite of this is $1-0.997=0.003$.

c) The page has $40$ lines with $80$ characters per line, or $3200$ characters. Therefore, we can calculate the probability of having exactly two errors with binomial probability, or ${3200 \choose 2}*0.001^2*0.999^{3198}$, or about $0.209$.

d) Given that there are exactly two errors, the errors are equally likely to appear anywhere. Think of it like this: There are $40$ lines. An non-negative integer ($0$, $1$, or $2$) number of errors can occur on one line, but if you add up all the errors that happen on all $40$ lines is, the answer is $2$. Therefore, we're adding $40$ non-negative integers that sum to $2$. The total number of ways to do this can be found with stars and bars, or ${40+2-1 \choose 2}={41 \choose 2}$.

Now, that's the total possible ways $40$ lines can have $2$ errors. We want to find the probability that the error occurs on separate lines. This means $2$ lines have one error and the other lines have no errors. This means we need to choose $2$ lines out of $40$ and there are $40 \choose 2$ ways to do this.

Thus, the probability we want to find is the number of ways to have the errors on separate lines given there are exactly two errors, $40 \choose 2$, divided by the number of ways to have exactly two errors overall, $41 \choose 2$. Thus, the probability that if there are exactly two errors, the errors are on separate lines is about $0.951$.

Noble Mushtak
  • 18,402
  • 28
  • 44
0

I am posting because I believe there is a subtle flaw in the posted answer to part $(d)$

The subtle flaw is that when you count the number of ways using stars and bars, each such way is not equiprobable You could have a look at the answers to a question here

Another point is that for such a problem, I would think that you may be expected to use the poisson distribution here , which would be sufficiently accurate, e.g.

$\lambda$ for line $=80\times0.001 = 0.08\;;$
$P(x) = e^{-\lambda}\cdot\lambda^x /x!$
P($0$ error in line) $= e^-0.08 = 0.9231$
P($1$ error in line) $= e^-0.08(0.08) = 0.0739$
which can be seen to tally with the binomial computation.

Similarly, for a line, $\lambda = 40\cdot 0.08 = 3.2$,
P(page has $2$ errors) = $e^-3.2*3.2^2/2! = 0.2087$


Coming back to part $(d)$, we needn't actually use numerical values, use $\lambda$ for the parameter for a line and $40\lambda$ as parameter for page. This will simplify computations, and also yield a more accurate result.

P($2$ lines have $1$ error, $38$ have $0$ error) $= \binom{40}{2}*Le^{-L}*Le^{-L}*e^{-38L} = 780L^2e^{-40L}$

P(one line has $2$ errors, $39$ have $0$ errors) $=\binom{40}1*(L^2/2)*e^{-L}*e^{-39L} = 20L^2e^{-40L}$

As a check, P(page has $2$ errors) $= 800L^2e^{-40L}$
[ If we put $P = 40L$, P(page has $2$ errors) $= e^{-P}* P^2/2 = 800L^2e^{-40L}$ ]

Finally, P(errors on separate lines | $2$ errors on page) $= \frac{780L^2e^{-40L}}{800L^2e^{-40L}} = 0.975$

  • Part $(d)$ is simply $\frac{39\cdot80}{3199}\approx0.9753$ – Logophobic Jan 25 '16 at 06:08
  • @Logophobic: Can you pl. explain ? – true blue anil Jan 25 '16 at 07:02
  • Let us assume that there is an error on the first line. There are $3199$ characters to choose from for the second error. Since the second error must be on another line, we are limited to $39$ lines times $80$ characters per line $=3120$ characters for the second error. The probability is therefore $\frac{39\cdot 80}{3199}$ that the two errors are on separate lines. – Logophobic Jan 25 '16 at 12:01
  • @Logophobic: Hmm..... my answer was based on the line as the unit, $^{40}P_2 / 40^2$ – true blue anil Jan 25 '16 at 14:33
  • 1
    I've given this a bit more thought, and found a more formal solution: $\require{cancel}P={40\choose2}{80\choose1}^2/{3200\choose2}=\frac{\cancel{40} \cdot39\cdot\cancel{80}\cdot80\cdot\cancel2}{\cancel2\cdot\cancel{3200}\cdot3199}=\frac{39\cdot80}{3199}$ – Logophobic Jan 25 '16 at 15:13
  • Yeah, nice (+1). – true blue anil Jan 25 '16 at 15:40
  • @Logophobic do you mind explainining how you got your numerator in the answer? I guess I understand why you chose 3200C2 for denominator because there are exactly 2 errors and it could be any 2 out of 3200 characters. Having trouble understanding the numerator. – Four Seasons Jan 26 '18 at 14:35