## Friday, August 14, 2009

### Does sample size affect Cpk?

This was a question from one of my training class participants.
I found the question interesting and answered using the formula of Cpk.

Cpk = Minimum of [USL - Overall Average]/3sigma or [Overall Average - LSL]/3sigma
For Xbar-R chart,
Sigma = Rbar/d2
d2 increases as sample size increases.
So for the same Rbar, sigma reduces as sample size increases.

Cpk increases as sigma reduces.
That means for the same overall process average and range, Cpk will change as sample size changes. In fact as sample size increases, Cpk will be larger.

Example

Outside diameter of a pipe has specifications of 9 and 11. Design target is 10

For a dataset, let's say that...
Overall average = 9.3 and Rbar = 0.5

We will now calculate Sigma and Cpk for two different sample sizes - 5 and 7

For sample size 5, d2 = 2.326
sigma = 0.5/2.326 = 0.215
Cpk = Min [ 10 - 9.3] / 3 x 0.215 or [9.3 - 9] / 3 x 0.215
Cpk = Min of 1.09 or 0.465
Cpk = 0.465

For sample size 7, d2 = 2.704
sigma = 0.5/2.704 = 0.185
Cpk = Min [ 10 - 9.3] / 3 x 0.185 or [ 9.3 - 9] / 3 x 0.185
Cpk = Min of 1.26 or 0.54
Cpk = 0.54

For the same data set, sigma and Cpk change based on the sample size selected. As sample size increases, sigma reduces and Cpk increases.
If a smart quality engineer wants to trick the system and project good process capability, he/she can simply do that by increasing the sample size.

What is the sample size you use? Have you tried finding process capability with different sample size?
Drop us a line at info@sybeq.com and tell us about your process and capability calculations. We would love to hear from you.

#### 1 comment:

Enrico Fosaveo said...

OK, two problems.
(1) You've chosen a sample size too small to compute a valid CPK.
(2) You're allowing your small sample size to bias sigma.

If you choose a reasonable sample size and your sample really represents your population, a larger sample will not increase CPK.

Try this experiment. Let's say your USL is a value of 15.

For our first example, let's use a sample size of 15 units. The result values are two 8's, eleven 9's, and two 10's. Calculate your CPK on that data set.

Now let's increase your data set to 32 units. The result values are five 8's, twenty-three 9's, and four 10's. Calculate your CPK on that.

They are pretty much the same.