# Is difference in proportions due to sample size?

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?

• 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? Apr 22, 2015 at 13:02
• 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 Apr 22, 2015 at 15:42
• 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. Apr 22, 2015 at 21:28
• Exactly @Fato39 Apr 23, 2015 at 5:08

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.