# Help with this double sampling scheme problem

#### statrw

##### New member
Please help with a hint of doing his question, I have drawn the diagram but still confused.

Q)In a food production process, packaged items are sampled as they come off a
production line. A random sample of 5 items from each large production batch is
checked to see whether each item is tightly packed. A batch will be accepted
immediately if all of these 5 items are tightly packed, and rejected immediately if at
least 3 items among the 5 are not tightly packed. Otherwise a second sample is taken
before making a decision.
Suppose that 80% of the items produced by the machine are tightly packed

a)When a second sample is to be taken, it also consists of 5 items. What is the
probability that in a combined sample of 10 items there are at least 8 tightly
packed?

Thanks.

#### CaptainBlack

##### Well-known member
Please help with a hint of doing his question, I have drawn the diagram but still confused.

Q)In a food production process, packaged items are sampled as they come off a
production line. A random sample of 5 items from each large production batch is
checked to see whether each item is tightly packed. A batch will be accepted
immediately if all of these 5 items are tightly packed, and rejected immediately if at
least 3 items among the 5 are not tightly packed. Otherwise a second sample is taken
before making a decision.
Suppose that 80% of the items produced by the machine are tightly packed

a)When a second sample is to be taken, it also consists of 5 items. What is the
probability that in a combined sample of 10 items there are at least 8 tightly
packed?

Thanks.
When a second sample is taken there are 3 or 4 tightly packed items in the first sample, so for at least 8 to be tightly packed we need 4 or 5 to be tightly packed in the second sample if only one was not tightly packed in the first sample and 5 if two were not tightly packed, so the required probability is:

$$p = (b(4;5,0.8) + b(5;5,0.8)) \times b(4;5,0.8) + b(5;5,0.8) \times b(3;5,0.8)$$

where $$b(n;N,x)$$ denotes the binomial probability on $$n$$ successes in $$N$$ trials with a success probability of $$x$$ in each trial.

CB

Last edited:

#### statrw

##### New member
When a second sample is taken there are 4 tightly packed items in the first sample, so for at least 8 to be tightly packed we need 4 or 5 to be tightly packed in the second sample, so the required probability is:

p = b(4;5,0.8) + b(5;5,0.8)

where b(n;N,x) denotes the binomial probability on n successes in N trials with a success probability of x in each trial.

CB
Thanks but not sure how you got the 4 or 5 tightly packed to add up to 8. Remember for second sample to be taken there must be 0 or 1 or 2 tightly packed.

I may have missed the point,but could you explain.
Thanks.

#### CaptainBlack

##### Well-known member
Thanks but not sure how you got the 4 or 5 tightly packed to add up to 8. Remember for second sample to be taken there must be 0 or 1 or 2 tightly packed.

I may have missed the point,but could you explain.
Thanks.
Sorry, misread the condition for drawing a second sample, previous post has now been corrected.

CB

Last edited:

#### statrw

##### New member
When a second sample is taken there are 3 or 4 tightly packed items in the first sample, so for at least 8 to be tightly packed we need 4 or 5 to be tightly packed in the second sample if only one was not tightly packed in the first sample and 5 if two were not tightly packed, so the required probability is:

$$p = (b(4;5,0.8) + b(5;5,0.8)) \times b(4;5,0.8) + b(5;5,0.8) \times b(3;5,0.8)$$

where $$b(n;N,x)$$ denotes the binomial probability on $$n$$ successes in $$N$$ trials with a success probability of $$x$$ in each trial.

CB
Not sure about your suggestion above, here is what I think, see below.
Any opinions?

To get a total of 8 tightly packed from the first and second selection we need to add up binomial probabilities.

1) x =0 from n1 and x=8 from n2
2) x=1 from n1 and x=7 from n2
3) x=2 from n1 and x=6 from n2

For each case use binomial B(5, 0.8), where B(n,p).

#### CaptainBlack

##### Well-known member
Not sure about your suggestion above, here is what I think, see below.
Any opinions?

To get a total of 8 tightly packed from the first and second selection we need to add up binomial probabilities.

1) x =0 from n1 and x=8 from n2
2) x=1 from n1 and x=7 from n2
3) x=2 from n1 and x=6 from n2

For each case use binomial B(5, 0.8), where B(n,p).
The second sample is of size 5.

CB