I am currently working for a project team that is trying to reduce the number of defective parts produced in a factory.

Without going into too much detail, the plant has a safety procedure where they check a sample of parts for a fault. They calculate their efficiency via the formula $\frac{\text{NON Faulty Parts}}{\text{Total Parts Processed}}$.

Recently we have had an upsurge in the number of parts processed and the performance has dropped by 2%, even though our goal was to increase it.

I want a statistical test that will tell us if our project has been successful and whether the decrease in performance can be ascribed to a larger number of analysed parts.

Can anyone point me in the right direction as to the sort of test I could use using R?

  • 1
    $\begingroup$ I don't fully understand the question, I'm afraid. If you check every single item, there is no need for a statistical test. A statistical test would be of help if you sampled some items from the process. Also, what does the increase in produced items have to do with the number of faulty items? $\endgroup$ Apr 22, 2015 at 13:02
  • $\begingroup$ Hi @coolseedash, the aim of our team was to implement a change in process to make an improvement in manufacturing. If the volumes manufactured stayed the same we would be able to see our impact by increase in "good quality" percentage but because the volumes increased the factory had to process more units so I am investigating to see if we can account for the volume increase can be controlled for to see if our changes had any positive impact....this might not be possible of course but I thank you anyway for your time $\endgroup$
    – John Smith
    Apr 22, 2015 at 15:42
  • $\begingroup$ Do I understand this correctly: the process itself changed and you hypothesise that this might have affected the performance. At the same time, you implemented your own change and this was supposed to affect the performance in other direction, i.e. improve it. You now want to differentiate these effects and see, whether your change actually improved the situation, but overall it worsened because of the other unplanned change. $\endgroup$
    – Fato39
    Apr 22, 2015 at 21:28
  • $\begingroup$ Exactly @Fato39 $\endgroup$
    – John Smith
    Apr 23, 2015 at 5:08

1 Answer 1


Since you are interested in proportions, the number of parts processed should not alter the ratio significantly. If the sampling of the parts intended for testing is unbiased, the number of both, faulty and working parts increases with the total parts tested.

In that regard, the situation doesn't look good for you intervention, since - if anything - it worsened the effectiveness. You would still want to check, whether this change is significant - it might as well be just a coincidence.

If you have your data in the form of a table for each tested component, such as 1 - faulty, 2 - flawless, 3 - flawless etc., then you can use prop.test or binom.test from the stats library in R. However, if you only know the percentages and the size of each sample, then you might as well do this test pen-and-paper. You can find one example of instructions here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.