# Binomial Distribution & qa optimization

#### aqisha

##### New Member
Hi I have a question I was hoping someone could help with relating to Binomial distribution and expected value.
--
In a computer chip manufacturing plant the Prob that a chip is defective is .02. Chips sell for 20$. Cost of making chips is C. 500 chips are produced. Since the penalty of selling a defective chip is high (say P), plant organizes testing of the chips to find defective chips. The process of testing is that 500 chips are divided into b batches and each batch is tested. If a batch tests defective then batch is discarded. The cost of testing per batch is say 100$. What should be the optimal value for b to minimize the loss from defective chips?
--
A general approach to solving this would be appreciated
Thanks
aqisha

#### BioStatMatt

##### TS Contributor
I think I might be able to help, but it would be nice to know how the batches are tested, and how the decision to discard a batch is made. Looks like you might need to model whats going on like:

Net = [(500 - (#discarded batches)*batch size)*20] - [500*C] - T - L

where T and D are the losses due to testing and selling defective items respectively. You will use the expected value of a binomial random variable to determine how many defective devices we expect to be sold from each batch that is not discarded.