# Thread: Probability: trains containing hazardous materials

1. ## Probability: trains containing hazardous materials

I'm a little strapped for time for this question (and a few others), as I've got a midterm for my statistics course in a week and I'm already a good deal behind on the course material (due to an early sickness in the term). Any help on this would be greatly appreciated.

Be sure to read the question carefully.

A train of $n$ wagons transports hazardous materials. Each wagon, and independently from the others, has a probability $p$ to be defective. Prior to the train's departure all wagons are examined by two inspectors who do not exchange their inspection's results during the control. We assume that each inspector will detect a default on a given wagon (if any) with probability $r$. One default is enough to delay the train's departure (for repair). Compute the following probabilities:

a) The train's departure will be delayed.
b) The train will leave with at least one wagon defective.
c) Compute the numerical values of the probabilities in a) and b) when $n=10, p=0.1$ and $r=0.7$.

2. Originally Posted by Runty
I'm a little strapped for time for this question (and a few others), as I've got a midterm for my statistics course in a week and I'm already a good deal behind on the course material (due to an early sickness in the term). Any help on this would be greatly appreciated.

Be sure to read the question carefully.

A train of $n$ wagons transports hazardous materials. Each wagon, and independently from the others, has a probability $p$ to be defective. Prior to the train's departure all wagons are examined by two inspectors who do not exchange their inspection's results during the control. We assume that each inspector will detect a default on a given wagon (if any) with probability $r$. One default is enough to delay the train's departure (for repair). Compute the following probabilities:

a) The train's departure will be delayed.
b) The train will leave with at least one wagon defective.
c) Compute the numerical values of the probabilities in a) and b) when $n=10, p=0.1$ and $r=0.7$.
Is it to be assumed that if an inspector will never find a non-defective wagon faulty? If so:

Let X be the random variable "number of faulty wagons detected as faulty".

(a) X ~ Binomial( pr, n )

Calculate 1 - Pr(X = 0).

(b) Pr(X = 0).

(c) Substitute the given values into (a) and (b).

3. Originally Posted by mr fantastic
Is it to be assumed that if an inspector will never find a non-defective wagon faulty? If so:

Let X be the random variable "number of faulty wagons detected as faulty".

(a) X ~ Binomial( pr, n )

Calculate 1 - Pr(X = 0).

(b) Pr(X = 0).

(c) Substitute the given values into (a) and (b).
Unless I misinterpreted by Prof., he said that this question does not involve binomial random variables. It is definitely a random variable question, but he said that binomial random variables aren't involved.

As such, your answer to the first part could be wrong. I'm not sure; you're the expert.

EDIT: Just to note, I listed the question word-for-word. That might help with interpretation.

Also, by Pr, do you mean probability mass function? We use $p(a)=P\{X=a\}$ to define that, so there could be a bit of disparity in defining it.

4. Originally Posted by Runty
Unless I misinterpreted by Prof., he said that this question does not involve binomial random variables. Mr F says: The random variable is binomial. However, it can be done without using that fact since it boils down to getting Pr(X=0) and this can be done without using the binomial formula.

It is definitely a random variable question, but he said that binomial random variables aren't involved.

As such, your answer to the first part could be wrong. I'm not sure; you're the expert.

EDIT: Just to note, I listed the question word-for-word. That might help with interpretation.

Also, by Pr, do you mean probability mass function? We use $p(a)=P\{X=a\}$ to define that, so there could be a bit of disparity in defining it.
Pr(X = 0) means the probability that X = 0. I don't think there can be any confusion over the meaning of this notation in the context of my posting.

5. Mr. F, I think you have overlooked the part of the question that says there are 2 inspectors.

(a) Let's see if we can find the probability that a car is not found to be defective. It could simply not be defective; this happens with probability $1-p$. Or it could be defective and not detected; this happens with probability $p (1-r)^2$. So the total probability that a car is not detected as defective is $1 - p + p (1-r)^2$. The probability that a car is found to be defective is therefore $p (1-r)^2 - p$. The total number of cars found defective has a distribution which is $Binomial(n, p (1-r)^2 -p)$.

(b) The probability that a car is defective but is not detected is $p (1-r)^2$, so the total number of cars which are defective but are not detected as such has a distribution which is $Binomial(n, p (1-r)^2)$.

6. Originally Posted by awkward
Mr. F, I think you have overlooked the part of the question that says there are 2 inspectors.

(a) Let's see if we can find the probability that a car is not found to be defective. It could simply not be defective; this happens with probability $1-p$. Or it could be defective and not detected; this happens with probability $p (1-r)^2$. So the total probability that a car is not detected as defective is $1 - p + p (1-r)^2$. The probability that a car is found to be defective is therefore $p (1-r)^2 - p$. The total number of cars found defective has a distribution which is $Binomial(n, p (1-r)^2 -p)$.

(b) The probability that a car is defective but is not detected is $p (1-r)^2$, so the total number of cars which are defective but are not detected as such has a distribution which is $Binomial(n, p (1-r)^2)$.
By $Binomial$, do you mean something like this?

Total number of cars found defective: $\left(\begin{matrix} n \\ k \end{matrix}\right) (p(1-r)^2-p)^k(1-(p(1-r)^2-p))^{n-k}$, $0\leq k\leq n$

Total number of cars that are defective, but not detected: $\left(\begin{matrix} n \\ k \end{matrix}\right) (p(1-r)^2)^k(1-(p(1-r)^2))^{n-k}$, $0\leq k\leq n$

Or is what you've given meant to represent the expected value, such as this?

Total number of cars found defective: $E(X)=np(1-p)=n(p(1-r)^2-p)$

Total number of cars that are defective, but not detected: $E(X)=np(1-p)=n(p(1-r)^2)$

I'm having some trouble understanding which you mean by simply typing in $Binomial$. If I knew which one you were talking about, I could finish this up quickly.

7. Sorry for the double-post, but I spoke with my Prof. recently on this question and what he told me is the way we've been looking at the question is not what's expected. It turns out this is a question on conditional probability, not random variables. Here's essentially what I've been given to work with now:

a) The desired probability is 1-P(no delay).
"no delay" can be translated as "inspector A found no default on any wagon AND inspector B found no default on any wagon $W_1,...,W_n$".
We're then to use the total probability formula (which is, in general terms, $P(E)=\sum_{i=1}^n P(E|F_i)P(F_i)$), and then use the independence of the wagons and the independence of the inspectors.

b) The desired probability is 1-P(all defaults (if any) will be found).
For a specific wagon $W_1$ we can write the probability that a default on it will be found by inspector A or inspector B as
$P(A_1\cup B_1/D)=1-P(A'_1 \cap B'_1/D)=1-1-P(A'_1/D)P(B'_1/D)$.

I'm afraid I don't entirely grasp everything my Prof. said, so if anyone could provide some help, that would be great.

8. Originally Posted by Runty
By $Binomial$, do you mean something like this?

Total number of cars found defective: $\left(\begin{matrix} n \\ k \end{matrix}\right) (p(1-r)^2-p)^k(1-(p(1-r)^2-p))^{n-k}$, $0\leq k\leq n$

Total number of cars that are defective, but not detected: $\left(\begin{matrix} n \\ k \end{matrix}\right) (p(1-r)^2)^k(1-(p(1-r)^2))^{n-k}$, $0\leq k\leq n$

Or is what you've given meant to represent the expected value, such as this?

Total number of cars found defective: $E(X)=np(1-p)=n(p(1-r)^2-p)$

Total number of cars that are defective, but not detected: $E(X)=np(1-p)=n(p(1-r)^2)$

I'm having some trouble understanding which you mean by simply typing in $Binomial$. If I knew which one you were talking about, I could finish this up quickly.
If X has a Binomial(n,p) distribution, then (by definition)

$P(X = x) = \binom{n}{x} p^{x} (1-p)^{n-x}$

It is the probability density function, not an expected value.

9. EDIT: I finally obtained the answer. Took long enough.

Let $P(x)$ stand for probability, and use the descriptions in each case for context.

Suppose a wagon is defective.
The probability that an inspector will not detect the default and approves the wagon is $P(x)=1-r$.
The probability that both inspectors approve the wagon is $P(x)=(1-r)^2$.
If there is no defect, both inspectors approve the wagon: $P(x)=1$.
The probability that a wagon is approved is $P(x)=1-p+p(1-r)^2$

a) The train's departure is not delayed if all $n$ wagons are approved. The probability is $P(x)=(1-p+p(1-r)^2)^n$.
Otherwise, the train is delayed. The probability is
$P(X)=1-(1-p+p(1-r)^2)^n$

b) The probability that the train is not delayed is written as a combination of two other probabilities (which will be defined below): $P(Y)=P(a)P(Y|a)+P(b)P(Y|b)$.
The probability that all the wagons are not defective is $P(a)=(1-p)^n$.
The probability that at least one wagon is defective is $P(b)=1-(1-p)^n$.
$P(Y)$ has been calculated above, and $P(Y|a)=1$.
The probability that the train will leave with at least one wagon defective is
$P(Y|b)=\frac{P(Y)-P(a)}{P(b)}=\frac{((1-p)+p(1-r)^2)^n-(1-p)^n}{1-(1-p)^n}$