Page 1 of 1

How to determine known variability for acceptance sampling?

PostPosted: 03 Apr 2013, 13:03
by Marion B
Hi,
I am responsible for designing quality control sampling plans for diagnostic kits.
I have been using a sampling plan by variable for unknown variability so far but would like to switch to known variability in order to decrease sample size.

Several batches of products have been inspected so I can use all these data.

However I am not sure what is the best way to calculate the standard deviation.

Here is what I have:
- For each batch, lot size N, sample size n.
- For each sample, 2 positive control cells measurements and 2 negative control cells measurements.
Option 1) Positive measurements are averaged and negative measurements are averaged. I finally obtain 1 result (average positive : average negative) per sample.
So I have n results. And the standard deviation from these n results.

Option 2) All 4 ratios are calculated (positve result 1 : negative result 1, positive result 2 : negative result 1, positive result 1 : negative result 2, positive result 2 : negative result 2).
So I have 4*n results. And the standard deviation from these 4*n results.

Then I'd like to use the following formula for pooled standard deviation to determine the known variability:
s = sqrt (((n1-1)s1^2+(n2-1)s2^2+...(nk-1)sk^2))/(n1+n2+....nk-k))
with k the total number of batches.

Do you think I can apply this formula?
If so, which option (1 or 2) above do you think is the best to get s1, s2, ... sk?

Thank you

Re: How to determine known variability for acceptance sampli

PostPosted: 03 Apr 2013, 16:51
by Stan Hilliard
Marion B wrote:- For each batch, lot size N, sample size n.
- For each sample, 2 positive control cells measurements and 2 negative control cells measurements.

Am I correct that each lot is a batch containing a number=N of diagnostic kits. And that a kit is considered an individual item that is within the specified limit(s) or not? So the fraction nonconforming of a lot is the fraction of kits that are outside the sampling plan's specification limit(s)? And that number=n of kits are sampled and tested per batch?

If I am right so far, I still don't understand what is happening within a kit because I don't understand the role of the two types of cells.

But in comparing the two options for calculating standard deviation, the goal should be to calculate a standard deviation that represents the kit-to-kit variability in the one number that the specification(s) refer to.

Does "(average positive : average negative)" mean to calculate the ratio of the average of the positive-cell measurements to average of negatives-cell measurements? And that this is in the same units as the specification limit(s)?

I think that the standard deviation for each batch should be calculated from a set of numbers that is one number for each kit. So option 1 meets this criterion. Option 2 would meet this criterion if you would represent each kit by the average of the 4 ratios -- prior to calculating the SD. The difference between the two is a matter of how you define the test method.

The same considerations should apply to how you calculate the average that you will use to make the acceptance decision.

Then I'd like to use the following formula for pooled standard deviation to determine the known variability:
s = sqrt (((n1-1)s1^2+(n2-1)s2^2+...(nk-1)sk^2))/(n1+n2+....nk-k))
with k the total number of batches.

I agree.

For most cases I prefer the known SD sampling plans over unknown SD plans. When people sometimes worry about the assumption of known SD they can still check that assumption for the current lot based on a range test of the sample or an F test for sample variance.

Re: How to determine known variability for acceptance sampli

PostPosted: 03 Apr 2013, 17:52
by Marion B
Hi Stan,

First of all, thank you so much for taking time to respond.
Please see my comments in blue:

Stan Hilliard wrote:
Marion B wrote:- For each batch, lot size N, sample size n.
- For each sample, 2 positive control cells measurements and 2 negative control cells measurements.

Am I correct that each lot is a batch containing a number=N of diagnostic kits. Yes And that a kit is considered an individual item that is within the specified limit(s) or not? Yes So the fraction nonconforming of a lot is the fraction of kits that are outside the sampling plan's specification limit(s)? Yes, we have one lower specification that each kit must exceed. And that number=n of kits are sampled and tested per batch? Correct. n is the number of kits tested per batch and is defined depending on the lot size, using the ANSI Z1.9 tables

If I am right so far, I still don't understand what is happening within a kit because I don't understand the role of the two types of cells. Each kit is tested on positive and negative cells in duplicates. Both duplicate results for positive are averaged and both duplicate results for negative are averaged. Then a signal-to-noise ratio (i.e. "(average positive : average negative)") is calculated and must exceeds the lower specification.

But in comparing the two options for calculating standard deviation, the goal should be to calculate a standard deviation that represents the kit-to-kit variability in the one number that the specification(s) refer to.

Does "(average positive : average negative)" mean to calculate the ratio of the average of the positive-cell measurements to average of negatives-cell measurements? Yes And that this is in the same units as the specification limit(s)? Yes

I think that the standard deviation for each batch should be calculated from a set of numbers that is one number for each kit. So option 1 meets this criterion. Option 2 would meet this criterion if you would represent each kit by the average of the 4 ratios -- prior to calculating the SD. The difference between the two is a matter of how you define the test method.
Option 1 makes also more sense to me and actually matches the way we make our acceptance decision for each individual batch.
I was just confused whether or not I had to consider every single result to make this standard deviation for the big picture. In other words I didn't want to lose information by averaging the results. Having your point of view, with a fresh eye, convinces me that Option 1 is better. Thank you!


The same considerations should apply to how you calculate the average that you will use to make the acceptance decision.

Then I'd like to use the following formula for pooled standard deviation to determine the known variability:
s = sqrt (((n1-1)s1^2+(n2-1)s2^2+...(nk-1)sk^2))/(n1+n2+....nk-k))
with k the total number of batches.

I agree. Great!

For most cases I prefer the known SD sampling plans over unknown SD plans. When people sometimes worry about the assumption of known SD they can still check that assumption for the current lot based on a range test of the sample or an F test for sample variance.We started with unknown SD sampling plan due to lack of data at the time we asked consultants to design sampling plan for us. They suggested us to revisit that once we have inspected several batches which is what I am trying to do.
I have seen the range test mentioned in the software section of your website but I am not familiar with this test.
If I want to do a 2-sided F-test to compare the "known SD" I would have determined from previous batches to the SD of a new batch, I will have (n-1) degree of freedom for the SD of the new batch but what about the degree of freedom for the "known SD"? Would that be (n1+n2+....nk-k)?


One more interrogation I have:
We actually have 3 different kits for which I have to switch from unknown variability to known variability. I have several batches inspection results for each type of kits.The measurement method for each kit is the same.
Do you think it is appropriate to calculate one SD for each type of kit?

Thank you

Re: How to determine known variability for acceptance sampli

PostPosted: 04 Apr 2013, 11:12
by Stan Hilliard
Marion B wrote:I have seen the range test mentioned in the software section of your website but I am not familiar with this test.
If I want to do a 2-sided F-test to compare the "known SD" I would have determined from previous batches to the SD of a new batch, I will have (n-1) degree of freedom for the SD of the new batch but what about the degree of freedom for the "known SD"? Would that be (n1+n2+....nk-k)?[/color][/b]

The numerator degrees of freedom for the calculated F is the df of the current sample.

For the denominator, you could use the df of the historical SD with the above equation. However, that means recalculating it whenever that changes.

I prefer to think of the test of the current lot SD as a hypothesis test where the null hypothesis is the (assumed to be known) historical SD. Since it is assumed to be known it's df is infinite -- bottom line of the F-table. A rejection would mean the assumption is wrong and you could then apply an unknown SD plan to the current lot.

Marion B wrote:We actually have 3 different kits for which I have to switch from unknown variability to known variability. I have several batches inspection results for each type of kits.The measurement method for each kit is the same.
Do you think it is appropriate to calculate one SD for each type of kit?

You could justify that by looking at the sd's from the three types of kit and making a judgement. Aside from the variability in the test, could some types of kit have more between-kit variability than other types? Also, for some kinds of variable the sd increases with the mean. Signal-to-noise ratios might be of that type. But examination of the historical sd's of the three kit-types could help you decide the extent for your case.

PS: You might be interested in my program TP414. It can restate your Z1.9 plan unto the language of the consumer's and producer's points and their probabilities. This while still physically performing the Z1.9 standard but with language/concepts that make the decision properties of the sampling plan more clear. TP414 also can develop for any fixed-n plan a sequential sampling plan having smaller sample size but the same accept/reject probabilities. It can also calculate confidence limits for fraction nonconforming for the sampled lot. That is illustrated in the TP414 user manual:

http://www.samplingplans.com/usermanual ... nual01.pdf

Re: How to determine known variability for acceptance sampli

PostPosted: 04 Apr 2013, 12:51
by Marion B
The infinite df for the assumed known standard deviation makes sense to me.

By looking at the historical SDs I don't actually see any difference from one type of kit to another so I can probably consider one standard deviation for all of them.

Your program seems very interesting, I'll look more into it.
The ANSI Z1.9 standard does not clearly state what the producer and consumer's risks are and that would be great to get this info.

Thank you

Re: How to determine known variability for acceptance sampli

PostPosted: 04 Apr 2013, 13:35
by Marion B
If I calculate my known SD today, next time I receive a batch, I will be able to reduce the sample size.
Then I can calculate the SD for the batch and compare to the known SD via the F-Test you described.

If I reject the null hypothesis, does that mean I would have to test more samples based on an unknown SD plan?

If so my goal of reducing the sample size would have failed.

Re: How to determine known variability for acceptance sampli

PostPosted: 04 Apr 2013, 14:13
by Stan Hilliard
Marion B wrote:If I calculate my known SD today, next time I receive a batch, I will be able to reduce the sample size.
Then I can calculate the SD for the batch and compare to the known SD via the F-Test you described.

Yes.

Marion B wrote:If I reject the null hypothesis, does that mean I would have to test more samples based on an unknown SD plan?

Yes.

Marion B wrote:If so my goal of reducing the sample size would have failed.

Yes.
But that would happen only if the assumption of known SD that you based that goal on is wrong. If the historical within lot SD of kits of remains stable (except for sampling variability) then you would rarely reject the null hypothesis. And would not increase the sample size.

Re: How to determine known variability for acceptance sampli

PostPosted: 04 Apr 2013, 15:52
by Marion B
Thank you, Stan. You made all this way more clear!