cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
chrsmth
Level II

Sample Size Question

If I know my parts have a 30% failure rate, how many parts do I need to inspect to be 95% confident I will find at least one failure?  Assuming I made a process improvement and want to see if my failure rate decreased from 30% to 10% w/ 95% confidence, then how many parts do I need to inspect?  I think JMP can give me these answers through the DOE>Sample Size Explorer>Power wizard, but I'm not exactly sure how to use this script to get the answers to these pretty basic sample size questions.

15 REPLIES 15

Re: Sample Size Question

Have you seen the documentation for the Power for Two Independent Sample Proportions?

explore.JPG

chrsmth
Level II

Re: Sample Size Question

Hi Mark, Thanks for the quick response as this does show me how to use the nice sample proportion wizard for this type of thing.  Taking a slight step back from my above question, let's say it takes 4hrs to inspect my part to see if it will fail.  I need to find a failure so that I can do some failure analysis work, but management wants me to give them a estimate of time for how long it will take to inspect parts before I actually find a failure.  Let's assume a historical failure rate of 30% rate and I want to be 95% confident I am giving management a good estimate of time.  How many parts should I anticipate inspecting before I find a failure?

Re: Sample Size Question

I like @dlehman1's approach. This explorer for reliability might also be helpful.

WebDesignesCrow
Super User

Re: Sample Size Question

Hi @chrsmth ,

How about using OC-curve for Hypergeometric / Binomial?

You did not mention the lot size, N.

If N is big, binomial is OK, but if N is small like <1000 maybe you want to use Hypergeometric distribution.

In this case, 95% confidence that it will detect at least 1 defective = Probability of acceptance, Pa=0.05 (in Y-axis of OC curve) because you will accept the sampling when c=0 @ 30% of defective rate (i.e X = 0.3).

During sampling of n sample size, you can detect 1 defective, 2 defective etc.

Usually, I just use Excel to develop OC curve because it's easier for me to understand the reasoning behind the choice of my sample size. But, JMP should be able to simulate that faster. Example as below;

 

WebDesignesCrow_2-1708651422206.png

 

Maybe this research can help: https://www.researchsquare.com/article/rs-3099107/v1 

 

dlehman1
Level IV

Re: Sample Size Question

Sometimes I think it can be more illuminating to simulate the process.  If there is a constant 30% chance of a failure, the geometric distribution will give the time to the first failure.  You can use a random geometric formula in a column, add a lot of rows, and look at the distribution of times to first failures.  If you also create a column using a different failure probability, comparing these will tell you a lot.  Not as elegant as some other solutions, but simulation is often more intuitive for me.

chrsmth
Level II

Re: Sample Size Question

Hi dlehman1, thanks for your feedback and I like your approach also.  Do you have a couple of screenshots of how to set this up as far as getting the rows with the ones and zeros in it based off a 30% failure rate?  Thanks!

 

Interestingly, I thought my question above was pretty basic and I was missing something simple in JMP as I can tend to get lost in all the statistics terms(i.e. alpha, null hypothesis testing, proportions, beta, power, etc. etc), but it seems to not be as straight forward as I thought?  There are many different ways to couch this question, but I think the way I stated it gives the general idea.

dlehman1
Level IV

Re: Sample Size Question

Attached is an example comparing the first failure at 30% and 10% probabilities, with a few graphs of the results stored as scripts.

chrsmth
Level II

Re: Sample Size Question

Thanks for the sample file, dlehman1.  I do understand how you got the charts and the data, but I am still a little confused about how I should use these charts to answer these two questions:

 

Say it takes 4hrs to inspect a part to see if it will fail.  I need to find a failure so that I can do some failure analysis work, but management wants me to give them an estimate of time for how long it will take to inspect parts before I actually find a failure.  Let's assume a historical failure rate of 30% and I want to be 95% confident I am giving management a good estimate of time.  How many parts should I anticipate inspecting before I find a failure?  Then, the same question, but with a historical 10% failure rate.

MRB3855
Super User

Re: Sample Size Question

Hi @chrsmth . You could think about it this way. Prob(finding at least 1)=Prob(x>0), where x is the number of failures in a sample size of n, = 1 - Prob(x=0)^n. 
1 - Prob(x=0)^n = 1-(1-p)^n = 0.95. 
This implies (1-p)^n = 0.05.

This implies n = ln(0.05)/ln(1-p) where p = 0.3 or 0.1. Then round n up to the nearest integer.

n is then the sample size such that there is 95% chance of at least one of them is a failure. 

The thing is, this is a question of probability, not statistics. Problems of statistics involve testing/estimating parameters based on observed data. In your case, you say you know the parameter p (0.3). So, once p is assumed to be known, the sample size question, as you state it,  is all about probability. I.e., you know the distribution is binomial(n, p), where p = 0.3. So, once the distribution is known there are no statistical hypotheses to be tested. It is a matter of probability. 

Now…if you want to “prove” (I’m using “prove” very loosely here) that p = 0.3, then that is a problem of statistics.