1
$\begingroup$

This is a streamlined version of a real question that came up in my company, wanted to check and be sure I did it right.

Our company makes boxes with random contents. Each box has 2 slots, slot A and slot B. So each box has exactly 2 items, 1 in slot A and 1 in slot B.

There are three types of items. Let's call them types X, Y, and Z.

Among Type X items, 5% are considered a success

Among Type Y items, 10% are considered a fail

Among Type Z items, 25% are considered a fail

(The items taken are replaced, so the odds are constant.)

Slot A is 100% Type X.

Slot B is 80% Type X, 15% Type Y, 5% Type Z.

I keep opening boxes, seeing both items at once, until I get either a success or a fail. What are my overall odds of failing? (A box with both a success and a fail is considered a success.)

EDIT: To make it clear, for Type X, 5% of the items are a success and 95% are "neutral" - neither success nor failure. Same for the other types. So most boxes you will open will be "neutral-neutral" and you'll need to keep opening.

  • 0
    Have you deliberately given "success" % for type X and failure % for Y and Z or is it a typo ?2017-01-20
  • 0
    @Thanos please remember to "accept" the aswer if it is satisfactory :)2017-01-24

1 Answers 1

0

You want the probability of failing when opening the first non-neutral box. That is, the conditional probability $$ p=P(\text{fail}|\text{fail or success})= \frac{P(\text{fail})}{P(\text{fail or success})} $$ You will fail if slot A is neutral and slot B is fail, i.e. $$ P(\text{fail})=.95\times(.15\times .1+.05\times .25)=.026125. $$ Now, the probability of stopping is $$ \begin{align*} P(\text{fail or success}) &=1-P(\text{neutral box})\\ &=1-.95\times(.8 \times (1-.05)+.15\times(1-.10)+.05\times (1-.25))\\ &=.114125. \end{align*} $$ Therefore $$ p=\frac{.026125}{.114125}=.228916. $$

Note: the expected number of boxes you will open is $1/.114125=8.76$.

  • 0
    Thanks for laying it out properly. I didn't have the solution 100% correct, but I got within 1%, so good enough for business.2017-01-21