Sample Size QuestionIf 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.
Basic Data Analysis and ModelingRe: Sample Size QuestionHave you seen the documentation for the Power for Two Independent Sample Proportions?

Re: Sample Size QuestionHi 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 QuestionAgreed @dlehman1 ! And, for completeness and for everyone's further understanding: For the geometric distribution, the way "Random Geometric (p)" is parameterized in JMP (returns the number of non-failures until a failure occurs, for failures with probability p), the mean is (1-p)/p. So, for p=0.3 the mean is (1-0.3)/0.3 = 2.3. And for p=0.1, the mean is (1-0.1)/0.1 = 9. And, these verify your simulations where you estimated the means as 2.3487 and 8.951, respectively.
https://en.wikipedia.org/wiki/Geometric_distribution
Re: Sample Size QuestionI like @dlehman1's approach. This explorer for reliability might also be helpful.
Re: Sample Size QuestionWell, the files gives 95% confidence intervals for the mean number of parts before the first defect shows up. If it takes 4 hours to inspect each part, then multiply the mean number of parts (and/or the confidence interval) by 4 hours. I think I may be missing something in your question, but that is what I would say.
Re: Sample Size QuestionHi @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;

Maybe this research can help: https://www.researchsquare.com/article/rs-3099107/v1
Re: Sample Size QuestionMark,
I found this tread and have been reviewing for a similar problem I am facing.
We recently had a failure that we did not find in our normal sampling.
After determining the root cause, we must items to verify that involve sample size.
First item is we want to verify our containment by taking a sample from product produced before and after the event time frame we have defined. We want to determine sample size we should use based on our lot size (250 pieces) and frequency we saw of failures during the event (8 to 30%). Is there a profiler you would recommend helping us model this condition? I am not a statistician.
Second items is adjusting our sample size going forward. Currently we are sampling 1 piece / Lot (destructive test), but only a small portion of products from this type of material. We have already discided to increase the sample size to include all products, but want to understand the confidence of detecting a defect? Can we factor in the samples taken increasing the products from about 20% of the population to 100%? We hope to not have to sample many pieces from each lot, but I don’t know how to make or model this calculation.
Thanks in advance for your support and suggestions.
Re: Sample Size QuestionUnderstood. What about being confident at the 90, 95, or 99% level? Can the power explore be used to estimate sample size required to detect failure at this confidence level? It is possible to estimate mean and standard deviation based on our internal measurement and there is minimal overlap in the distributions by simulation.
Re: Sample Size QuestionThanks dlehman1 and MRB3855 as both of these do end up giving me what I was looking for as I now have a few tools to add to my JMP toolbox. I appreciate the formula supplied by MRB3855 (Samples to test to be 95% confident you find a reject = ln(0.05)/ln(1-p) where p is the reject rate which was 0.3 (30%) or 0.1 (10%), then round n up to the nearest integer) to get the answer to my basic question (9 and 29, respectively).
The geometric distribution was a new thing for me (thanks again for the additional explanation of that distribution MRB3855) and simulating this distribution as done in the sample file supplied by dlehman1 was an elegant statistics approach to my question which helps join the statistics vs probability component of this question. Taking this approach a little further, I highlighted the data points around the 95% confidence level, then subset that data, which has its own distribution with a Mean approximately equal to the number supplied by the formula above. Note, for anybody following along here, this mean number is much different than the Mean of these two randomly generated Geometric distributions as their Means are based on the whole distribution for how many parts you will need to inspect on average to find a single failure versus how many parts you need to inspect to be 95% confident you will find a single reject.
Perhaps a small challenge to this awesome JMP community would be if somebody can take this information and make a cool add-in script whereby people with a more limited understanding of statistics and probability can answer my initial question, so they can look smart to their bosses. For example, if the user supplies the Defect Level to Detect and the Confidence Level for detecting a defect, while the script simply outputs the Number of parts to Inspect would be a nice Sample Size calculator. Adding in dlehman1 Geometric distribution idea would be even cooler!
Re: Sample Size QuestionI think the first question was answered by me at the start of this discussion.
I'm not sure how to address the second question. Have you surveyed the sample-size explorers to see if one suits your purpose?
Re: Sample Size QuestionHi @chris_dennis . I confess, and apologize, that neither of your questions are clear to me. What exactly are you assuming, and what exactly do you want to know?
Re: Sample Size QuestionI have included a process diagram to help explain.
1 What sample size is needed to verify after corrective action that we have correctly contained the event.
2 What should our sample size be for future production to detect internally.
We will need to define confidence level for each sample size (1 &2).
Re: Sample Size QuestionHi @chris_dennis . I see in your diagram you say “What sample size needed to confirm no contamination
after corrective action (verification sample)”
The answer is 100% sampling (all 250 from each batch). If you want to “confirm” no contamination then the only option is 100% sampling; in other words, there is no sampling plan that can guarantee (with any level of confidence) 0. For any sampling plan ( that is less than 100% sampling) there must be some “acceptable” % defective. And I don’t want to confuse “acceptable” with “desirable”. When I say “acceptable”, what I mean is what could you tolerate in the worst case.