1
$\begingroup$
  • I have a sample of computer components
  • These computer components are made in batches (1 batch = 1 lot) of 200
  • Component components can be individually tested electronically
  • The result of this test is then averaged to give a lot-level value to pass or fail the entire lot
  • I need to know how many components from a lot I need to sample, in order to get an accurate measure for this test for the WHOLE LOT.
  • Does anyone know how I should justify this?
  • For example, would testing 10 components give me an accurate enough estimate of the mean result from this test for the whole lot?

I know there are some unknowns here, like "accurate enough" - some sort of confidence interval perhaps?

Any help would be awesome!

Lincoln

$\endgroup$
3
  • $\begingroup$ If you want the standard error of the mean to be smaller than some specific amount, you'd sample $n$ such that $\frac{\sigma}{\sqrt{n}}$ is less than that amount. If you don't know the population standard deviation, $\sigma$ or some good bound for it, but do have some information on the standard deviation from a random sample, you can get a large-sample value for the sample size $n$ that would achieve a kind of probabilistic bound. Similarly you can get confidence intervals of specified width, or a specific margin of error, involving a specific long run probability (across multiple samples) $\endgroup$
    – Glen_b
    Commented Aug 2 at 8:31
  • $\begingroup$ It might be useful to search for sample size and confidence interval to get an initial sense of the kind of information that would be needed. $\endgroup$
    – Glen_b
    Commented Aug 2 at 8:50
  • 1
    $\begingroup$ There is an extensive literature on statistical aspects of quality control. The US National Institute of Standards and Technology has a useful summary here. Without more details about what you are measuring (e.g., a dimension that needs to be within specifications versus a yes/no failure) and the expected characteristics from pilot studies (as @Glen_b suggested), it will be hard to provide useful help. Please edit the question to make the situation more specific. $\endgroup$
    – EdM
    Commented Aug 2 at 13:25

1 Answer 1

1
$\begingroup$

I would suggest you thoroughly look at this web page (from Penn State); it is thorough, is well written and quite didactic. It has formulas, examples, etc...
To provide a complete answer, I repeat here the formula for the sample size $n$ required to estimate the population mean $\mu$ within a given margin or error $\pm d$, knowing the total population size $N$, and the population standard deviation $\sigma$.

$n=\frac {1} {\frac {d^2} {z^2.\sigma^2}+\frac 1 N}$
where $z^2$ is the critical value of the z distribution at $\alpha/2$ (or the well know $1.96$ for the "traditional" $\alpha=.05$).
For example, assuming $\sigma=1$ and the margin of error (MOE) is also 1 ($d=1$), with a population size of 200 (the OP's case), you get a sample size of 4 (3.81 to be exact, always rounded up).

Now, one problem is that this formula uses the z distribution; this assumes that the population standard deviation $\sigma$ is known. But it is not! All you have is an estimate based on your sample. So one should really use the critical values of the t distribution. But that value depends on the sample size (or rather on the degrees of freedom (d.f.) which $n-1$). So we have a self referential equation... This is solved via iterations. You start with the $n$ given by the z distribution, you reverse the equation to get $d$ as a function of $n$, you replace $z$ by $t$, and you keep increasing n, until the MOE $d$ gets below your target. For the same example as above, you now get $n=7$ (you will generally find that the "better" $n$, using the t distribution, is within a few counts of the one given by the $z$ distribution).

A second problem is the estimation of the standard deviation $\sigma$. You can use the one from your sample, but for some it will be less (good: you have a tighter estimate of the mean), but for others it will be worse (bad; your estimate will not be within your MOE). How do you deal with this? You can look at the historical data (after all, if you test every lot, you will quickly get a lot of data on the sampling distribution of the the s.d.), and pick a "worse case" (i.e. a value which is greater than e.g. 95% of the lots). You can use normal tolerance intervals on the values of the s.d. to determine this upper bound (and do not worry if your s.d.'s are not normally distributed; your answer will be close enough).

If you want another source to calculate this sample size, I highly recommend this online calculator. It computes both the z and t versions (so you do not need to itterate), it explains the computations, it shows intermediate results. It is a good resource to get the answer, but also to learn about why/how the sample size calculation works.

$\endgroup$

Your Answer

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

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