Exercise Set 16 Answers

  1. You throw five fair dice and count the number of sixes you get. Let \(X\) be the number of sixes. Tabulate \(P(X=x)\) for \(x=0, 1,\dots,5\).

    Answers:

    Here \(X\) is a binomial random variable with \(n = 5\) and \(p = \frac{1}{6}\). Hence we have p.m.f. \[ P(X = x) = {n \choose x}p^x(1-p)^{n - x} \qquad \mbox{for}~x = 0, 1, 2, \dots, 5. \] This gives (to 3 s.f.):

    \(X\) \(P(X = x)\)
    0 0.402
    1 0.402
    2 0.161
    3 0.0322
    4 0.00322
    5 0.000129
  2. A random variable \(X\) has Poisson distribution with rate parameter \(\lambda=2\). Find:

    1. \(P(X \le 2)\)
    2. \(P(X=3)\)
    3. \(P(X \ge 4)\)

    Answers:

    Here \(X\) is a Poisson random variable with rate \(\lambda = 2\) and p.m.f. \[ P(X = x) = \frac{2^x e^{-2}}{x!} \qquad \mbox{for}~x = 0, 1, 2, \dots \]

    1. \(P(X \le 2) = e^{-2} + 2 \times e^{-2} + \frac{4 \times e^{-2}}{2} = 0.677\text{ to 3 s.f.}\)
    2. \(P(X=3) = \frac{2^3 e^{-2}}{3!} = \frac{8 \times e^{-2}}{6} = 0.180\text{ to 3 s.f.}\)
    3. \(P(X \ge 4) = 1 - P(X < 4) = 1 - \left(e^{-2} + 2 \times e^{-2} + \frac{4 \times e^{-2}}{2} + \frac{8 \times e^{-2}}{6}\right) = 1 - 0.857 = 0.143\text{ to 3 s.f.}\)
  3. A discrete random variable \(X\) takes values in the set \(\{1,2,3,4\}\) and has \(P(X=x)=x/10\) for each \(x\) in this set. Find:

    1. \(E(X)\)
    2. \(E(X^2)\)
    3. \(\operatorname{Var}(X)\)

    Answers:

    1. \(E(X) = \sum_{x = 1}^4 \frac{x^2}{10} = \frac{1}{10}(1 + 4 + 9 + 16) = \frac{30}{10} = 3\);
    2. \(E(X^2) = \sum_{x = 1}^4 \frac{x^3}{10} = \frac{1}{10}(1 + 8 + 27 + 64) = \frac{100}{10} = 10\);
    3. \(\operatorname{Var}(X) = E(X^2) - E^2(X) = 10 - 3^2 = 1\);
  4. A discrete random variable \(X\) takes values in the set \(\{1,2,3\}\) and has \(P(X=x)=c/x\) for each \(x\) in this set, where \(c\) is some suitable constant. Find \(c\) and so find

    1. \(E(X)\)
    2. \(E(X^2)\)
    3. \(\operatorname{Var}(X)\)

    Answers:

    By the axioms of probability we know that \[\begin{eqnarray*} \sum_{x = 1}^3 \frac{c}{x} &=& 1\\ c\left(1 + \frac{1}{2} + \frac{1}{3}\right) &=& 1 \\ c\left(\frac{6}{6} + \frac{3}{6} + \frac{2}{6}\right) &=& 1 \\ c\left(\frac{11}{6}\right) &=& 1 \\ c &=& \frac{6}{11} \end{eqnarray*}\]

    Therefore,

    1. \(E(X) = \sum_{x = 1}^3 \frac{6}{11} = 3 \times \frac{6}{11} = 1.64~\text{ to 3 s.f.}\);
    2. \(E(X^2) = \sum_{x = 1}^3 \frac{6x}{11} = \frac{6}{11}\left( 1 + 2 + 3\right) = 3.27~\text{ to 3 s.f.}\);
    3. \(\operatorname{Var}(X) = E(X^2) - E^2(X) = 0.595~\text{ to 3 s.f.}\);
  5. You throw two fair dice. Let \(X\) denote the sum of the two numbers thrown. Find:

    1. \(E(X)\)
    2. \(E(X^2)\)
    3. \(\operatorname{Var}(X)\)

    Answers:

    Let \(X_1\) be the score on the first die, and \(X_2\) be the score on the second die, therefore \(X = X_1 + X_2\) and \(E(X_1) = E(X_2) = \frac{1 + 2 + 3 + \dots + 6}{6} = \frac{7}{2}\). Also, \(E(X_1^2) = E(X_2^2) = \frac{1 + 4 + 9 + \dots + 36}{6} = \frac{91}{6}\)

    1. \(E(X) = E(X_1 + X_2) = E(X_1) + E(X_2) = 7\);
    2. \[\begin{eqnarray*} E(X^2) &=& E\left[(X_1 + X_2)^2\right]\\ &=& E\left(X_1^2 + 2 X_1 X_2 + X_2^2\right)\\ &=& E\left(X_1^2\right) + 2 E\left(X_1 X_2\right) + E\left(X_2^2\right) \\ &=& E\left(X_1^2\right) + 2 E\left(X_1\right)E\left(X_2\right) + E\left(X_2^2\right) \quad \mbox{since $X_1$, $X_2$ independent}\\ &=& 2\cdot\frac{91}{6} + 2 \left(\frac{7}{2}\right)^2\\ &=& \frac{91}{3} + \frac{49}{2}\\ &=& 54.8~\text{ to 3 s.f.}. \end{eqnarray*}\]
    3. \(\operatorname{Var}(X) = E(X^2) - E^2(X) = 54.8 - 49 = 5.83~\text{ to 3 s.f.}\).
  6. 2% of packages produced by a packaging machine have defective seals. What is the probability that a batch will contain more than 2 defective packages if the batch size is (a) 20 (b) 50?

    Answers:

    Here we will use the binomial distribution. Let a defective seal be a “success”, then \(p=0.02\), \(q=1-p=0.98\) and the number of trials are (a) \(n=20\) and (b) \(n=50\). We want to find \(P(X>2)\), but it is simpler to calculate this via the complement as \(1-P(X\leq 2)\). We have

    1. \[\begin{align*} P(X=0)&={20 \choose 0}0.02^0 0.98^{20}=0.6676\\ P(X=1)&={20 \choose 1}0.02^1 0.98^{19}=0.2725\\ P(X=2)&={20 \choose 2}0.02^2 0.98^{18}=0.0528 \end{align*}\]

      \(P(X\le 2)=0.6676 + 0.2725 + 0.0528 = 0.9929\)

      and

      \(P(X>2)=1-0.9929=0.0071\) or \(0.71\%\)

    2. A similar calculation with \(n=20\) replaced by \(n=50\) gives \(0.078\).

  7. A rifle range competitor scores one hit in every 4 shots, on the average. Assuming that the binomial distribution is applicable, if they have four shots in a session what is:

    1. the probability that they will get exactly one hit?
    2. the probability that they will get at least one hit?

    Answer:

    Let a hit correspond to a “success”, then \(p=0.25\) and \(q=1-p=0.75\). The number of trials is \(n=4\). We have

    \[P(X=x)={4 \choose x}0.25^x 0.75^{4-x}\]

    1. \(P(X=1)={4 \choose 1}0.25^1 0.75^{3}=0.422\).

    2. \(P(X\ge 1)=P(X=1)+P(X=2)+P(X=3)+P(X=4)\) or it will be simpler to calculate via the complement: \(P(X\ge 1)=1-P(X<1)\) =1 - P(X=0)$

      \[P(X=0)={4 \choose 0}0.25^0 0.75^4=0.3164\]

      Hence

      \[P(X\ge 1)=1-0.3164=0.6836\]

  8. 2% of cans leaving a canning factory have a defective paint finish. Cans are packed in boxes in groups of 50. Determine the mean and standard deviation of the number of cans in a box which have a defective finish.

    Answer:

    Let finding a defective can be a “success”, which has probability \(p=0.02\). The number of trials is \(n=50\). The mean is given by \(np=50\times 0.02=1\). The standard deviation is \(\sqrt{np(1-p)}=\sqrt{50\times 0.02\times 0.98}=0.99\)

  9. Sheets of metal have a plating fault which occurs randomly at an average rate of 1 per \(\text{m}^2\). What is the probability that a sheet \(1.5\text{m} \times 2 \text{m}\) will have:

    1. At most one fault?
    2. At least one fault?

    Answers:

    Here we assume a Poisson distribution with rate \(\lambda = 1\,\text{m}^{-2}\).

    1. \[\begin{align*} P(X\le 1)&=P(X=0)+P(X=1)\\ &=\frac{\lambda^0 e^{-\lambda}}{0!}+\frac{\lambda^1 e^{-\lambda}}{1!}\\ &=0.0498 + 0.1494 \end{align*}\]

    2. \[\begin{align*} P(X\ge 1)&=1-P(X<1)\\ &=1-P(X=0)\\ &=1-0.0498\\ &=0.9502 \end{align*}\]

  10. 250 litres of water have been polluted with \(10^6\) bacteria. What is the probability that a sample of 1 ml of the water contains no bacteria?

    Answer:

    250 L contains \(10^6\) bacteria, so assuming a Poisson distribution with rate \(\dfrac{10^6}{250\times 10^3}=4\) bacterial per ml. Hence,

    \[P(X=0)=\frac{4^0e^{-4}}{0!}=0.0183.\]

  11. An average of 264 vehicles an hour pass along a stretch of road each taking 30 seconds to travel along it. What is the probability that at a given instant there will be no vehicles in the road?

    Answer:

    The road will have no vehicles if none entered in the previous 30 seconds. We first determine the mean: There are 264 vehicles per hour on average, therefore in 30 seconds we would expect \(264\times 30/3600 = 2.2\) cars per 30 seconds, that is, \(\lambda=2.2\)

    \[P(X=0)=e^{-2.2}=0.1108.\]