Hypothesis and Confidence Interval Calculations for Cp and Cpks

Folks,

I am reposting an updated blog post on Cp and Cpk calculations with Excel, as I have improved the Excel spreadsheet. If you would like the new spreadsheet, send me an email at [email protected].

One of the best metrics to determine the quality of data is Cpk. So, I developed an Excel spreadsheet that calculates and compares Cps and Cpks.

———————————————————————————————————-

Folks,

It is accepted as fact by everyone that I know that 2/3 of all SMT defects can be traced back to the stencil printing process. A number of us have tried to find a reference for this posit, with no success. If any reader knows of one, please let me know. Assuming this adage is true, the right amount of solder paste, squarely printed on the pad, is a profoundly important metric.

In light of this perspective, some time ago, I wrote a post on calculating the confidence interval of the Cpk of the transfer efficiency in stencil printing. As a reminder, transfer efficiency is the ratio of the volume of the solder paste deposit divided by the volume of the stencil aperture. See Figure 1. Typically the goal would be 100% with upper and lower specs being 150% and 50% respectively.

Figure 1. The transfer efficiency in stencil printing is the volume of the solder paste deposit divided by the volume of the stencil aperture. Typically 100% is the goal.

I chose Cpk as the best metric to evaluate stencil printing transfer efficiency as it incorporates both the average and the standard deviation (i.e. the “spread”). Figure 2 shows the distribution for paste A, which has a good Cpk as its data are centered between the specifications and has a sharp distribution, whereas paste B’s distribution is not centered between the specs and the distribution is broad.

Figure 2. Paste A has the better transfer efficiency as its data are centered between the upper and lower specs, and it has a sharper distribution.

Recently, I decided to develop the math to produce an Excel® spreadsheet that would perform hypothesis tests of Cpks. As far as I know, this has never been done before.

A hypothesis test might look something like the following. The null hypothesis (Ho) would be that the Cpk of the transfer efficiency is 1.00. The alternative hypothesis, H1, could be that the Cpk is not equal to 1.00. H1 could also be that H1 was less than or greater than 1.00.

As an example, let’s say that you want the Cpk of the transfer efficiency to be 1.00. You analyze 1000 prints and get a Cpk of 0.98. Is all lost? Not necessarily. Since this was a statistical sampling, you should perform a hypothesis test. See Figure 3. In cell B16, the Cpk = 0.98 was entered; in cell B17, the sample size n = 1000 is entered; and in cell B18, the null hypothesis: Cpk = 1.00 is entered. Cell B21 shows that the null hypothesis cannot be rejected as false as the alternative hypothesis is false. So, we cannot say statistically that the Cpk is not equal to 1.00.

Figure 3. A Cpk = 0.98 is statistically the same as a Cpk of 1.00 as the null hypothesis, Ho, cannot be rejected.

How much different from 1.00 would the Cpk have to be in this 1000 sample example to say that it is statistically not equal to 1.00? Figure 4 shows us that the Cpk would have to be 0.95 (or 1.05) to be statistically different from 1.00.

Figure 4. If the Cpk is only 0.95, the Cpk is statistically different from a Cpk = 1.00.

The spreadsheet will also calculate Cps and Cpks from process data. See Figure 5. The user enters the upper and lower specification limits (USL, LSL) in the blue cells as shown. Typically the USL will be 150% and the LSL 50% for TEs. The average and standard deviation are also added in the blue cells as shown. The spreadsheet calculates the Cp, Cpk, number of defects, defects per million and the process sigma level as seen in the gray cells. By entering the defect level (see the blue cell), the Cpk and process sigma can also be calculated. 

Figure 5. Cps and Cpks calculated from process data.

The spreadsheet can also calculate 95% confidence intervals on Cpks and compare two Cpks to determine if they are statistically different at greater than 95% confidence. See Figure 6. The Cpks and sample sizes are entered into the blue cells and the confidence intervals are shown in the gray cells. Note that the statistical comparison of the two cells is shown to the right of Figure 6.

Figure 6. Cpk Confidence Intervals and Cpk comparisons can be calculated with the spreadsheet.

This spreadsheet should be useful to those who are interested in monitoring transfer efficiency Cpks to reduce end-of-line soldering defects. It is not limited to calculating Cps and Cpks of TE, but can be used for any Cps and Cpks. I will send a copy of this spreadsheet to readers who are interested. If you would like one, send me an email request at [email protected].

Cheers,

Dr. Ron

The Law of Averages

Folks,

Patty had been working with engineering on a new product that needed a very precise and controlled volume of the stencil printed “brick” of solder paste on the PWB pads. The product had many 01005 passives and CSPs with 0.030″ spacings and the application was “mission critical.” So solder joint integrity was critical. The critical factor in obtaining this solder joint integrity was a consistent volume in the stencil printed brick. Her favorite solder paste gave a Cp and Cpk of 1.5 in 500 prints. The upper and lower spec limits were 60% and 140% of the aperture volume.

Purchasing called to tell her that XLK Company just announced a solder paste with a Cp and Cpk greater than 3, under the same printing conditions that this product required. Needless to say Patty was skeptical. When she looked at the report, she groaned. The data were collected by Mort Bittler. She had seen him give several presentations and he always seemed to misrepresent the data to make his company’s solder paste look better than it was. She was on her way to a team meeting and expected that this new “break through” would be discussed.

As the meeting came to order, the VP of Engineering, Todd Hamilton, spoke.

“I saw this new data from XLK with a printing Cpk = of 3.72, we will use this paste,” Todd commanded.

“Wait a minute,” Patty responded, “the decision on which solder paste to use is with my group.”

“But your group has dropped the ball. How could you not know about this superior paste?” Hamilton challenged.

“We have evaluated their pastes continuously, they have always been second rate,” Patty shot back.

“Well things have changed. Get with it Coleman; this project is too important,” Todd shouted.

Patty was really angry. Technically Todd was her superior, but she found his attitude and words insulting. Using her last name was a bit unfriendly too. “I’ll travel to XLK tomorrow and review their data,” Patty responded, her voice shaking more from anger than anything else. She called Mort Bittler and he was available, so he agreed to meet with her the next day.

As she hung up, Pete showed up at the door.

“Hey kiddo, how’s it going?” Pete asked.

“You were at the meeting, so what do you think? Hamilton impugned all of us,” Patty said flatly.

“Any way I can help?” Pete asked. “Why don’t you go with me to XLK tomorrow, it might be good to have two people check the data.

Fortunately XLK was only 120 miles south of their southern New Hampshire office. Pete had become one of her best friends in the past year. They spoke in Spanish the whole way to XLK to get their skill level up. Patty had also taught Pete some Mandarin, but it was slow going.

After 120 minutes of discussing the PGA Tour vis a vis Tiger Woods, in Spanish, they arrived at XLK. Mort was waiting. Mort was 45 years old, with a thick Boston accent. He came across as being knowledgeable … to someone who wasn’t knowledgeable. After brief pleasantries, Patty asked to see the raw data.

“Patty, I already made the calculations, why do you need to see the raw data?” Mort asked.

“The Professor always told me to ‘look at the raw data,’ ” as often one can glean things that the final calculations don’t show,” Patty answered evenly.

“Well, maybe later. Let me show you how we took the data first,” replied Mort evasively.

Patty and Mort went to the printing lab and Patty noticed that Pete was not with them. After verifying that the printing process was reasonable, Patty asked if she could have a little time with Pete … if she could find him.

Patty and Mort found Pete in the break room. “Pete, let’s pow-wow for a while,” Patty said. Mort said he would go answer some emails and they would meet in 30 minutes.

“Pete, where have you been? You’re not going to embarrass me again are you?” Patty pleaded.

“Me embarrass anyone?” Pete sheepishly replied. “I found the person who took the data, Beth Thompson,” he went on, “and she told me they average Cpks.”

“Not again,” Patty groaned. “We just went through that with a vendor last week. When will they learn that it’s wrong to average Cpks?”

In 30 minutes they went to Mort’s office. All agreed to go lunch. After ordering, Patty asked, “Mort what are your thoughts on averaging Cpks?” Mort seemed defensive, and squirmed a little before he finally he said, “seems OK to me, it’s just like averaging golf scores.”

“What about the nonlinearity of the standard deviation in the Cpk equation?” Patty asked.

Mort was clearly not grasping the issue, so Patty continued, “If you have two sets of data and calculate the Cpk of each and average them, you will not get the same result as if you calculated the Cpk of the data added together. One of the reasons is that the standard deviation is nonlinear. For the same reason it is wrong to add Cpks together.”

Then Patty came right out and asked, “Did you average the Cpks?”

“Yes,” Mort said glumly. “Let’s look at the data when we get back from lunch,” Patty insisted.

When they looked at the data, it showed Patty’s point, four runs, of 100 samples each, had Cpk’s of around 1.2 to 1.3 and one run had a Cpk of 15.56. The average Cpk was 3.73, but if one takes the data together, the Cpk is 1.58.

Patty had calculated the total Cpk on the spot with Minitab (below).

Cp Cpk
Run 1 1.26 1.23
Run 2 1.3 1.3
Run 3 1.39 1.39
Run 4 1.21 1.2
Run 5 15.56 15.54
Average 3.73 3.72
Altogether 1.59 1.58

The correct results, calculated by Patty, are in the last row.

“But the 1.58 still is quite good,” Mort pleaded.

“But the data suggest that run 5 is a fluke; it is clearly not from the same population as runs 1-4. Let’s go out to the lab and run another 100 data points to see if we can reproduce run 5,” Patty insisted.

They ran another 100 and the Cpk was 1.28. On the way over Pete whispered in Patty’s ear that he had more vital intel to share with her on the way home. With the end of the data collection, Patty and Pete were done, so they headed home.

“OK, what is the vital intel you need to share with me? she asked Pete in Spanish.

“While you were collecting data with Mort, I visited Beth again. She told me that Mort had her collect 150 data points on run 5 and he threw out the 50 points furthest from the mean. You were right, run 5 was from another population, a cheating one,” Pete chuckled.

“Well, I guess we will still use our favorite solder paste,” Patty summed up.

Best Wishes,

Dr. Ron