Academy › Topic library › Going Deeper: Building p, np, c and u Charts
Q-BOT ACADEMY · FREE VIDEO LESSON · 12 MIN
Going Deeper: Building p, np, c and u Charts
First, the choice. Ask two questions. One: are you counting defective units, or defects? A defective unit fails as a whole. It's in or it's out, like a scrapped slat. A defect is one flaw, and one unit can have many, like three specks on one frame. Defectives follow the binomial distribution. Defects follow the Poisson. Two: is the sample the same size every time?
In short
Defectives: a p chart for a changing n, an n p chart for a constant n. Defects: a c chart for a constant area, a u chart for a changing amount. P chart limits: p bar, plus or minus three times the square root of p bar times one minus p bar, over n. C chart: c bar, plus or minus three root c bar. U chart: u bar, plus or minus three times the square root of u bar over n. A negative lower limit becomes zero. And the rate, not the raw count, tells a bad day from a busy one!
Check yourself
Priya checks fifty slats from every lot the slat supplier sends, and counts the warped ones. Over twenty five lots, n p bar is two warped slats per lot. What is the upper control limit on the n p chart? A, six point two four. B, six point one six. C, three point three nine. Or D, twelve point three.
Show the answer
The answer is B, six point one six. P bar is two divided by fifty: point oh four. Two times point nine six is one point nine two. Its square root is about one point three nine. Three times that is about four point one six. Add the two, and you get six point one six. A used the c chart formula and left out one minus p bar. C forgot the three. And D is the p chart's limit in percent, not a count. That's building p, n p, c and u charts. Questions? Ask Q-Bot right here in the Academy. And one for the road: why does the p chart never get bored? Because every day, it gets brand new limits!
Where this topic is taught
This lesson is part of every free Academy course whose Body of Knowledge covers it. Each course puts it in context, with exercises and checks.
Full lesson transcript
The narration from the video, by chapter. Brindlewood Outdoor Furniture and its people are a fictional company used in every Q-Bot Academy lesson.
Intro
Brindlewood, the slat mill. Ray changes the planer knives every four thousand slats now, and slat scrap is down to about two percent. Priya counts the scrapped slats every day. But some days the mill runs six hundred forty slats, and some days nine hundred twenty. Is eighteen scrapped slats a bad day, or just a busy one? Over in coating, Priya counts specks on a frame, and Dwayne counts every defect on a handful of chairs. So which chart goes with which count?
Hey there, I'm Q-Bot. Welcome to the Q-Bot Academy. Today we're going deeper: building p, n p, c and u charts! We'll pick the right chart for the count you have, work every formula, build a p chart with a new sample size every day, then a c chart and a u chart, and finish with the assumptions behind them. If attribute charts are new to you, start with the control charts for attributes data video.
Choosing the right chart
First, the choice. Ask two questions. One: are you counting defective units, or defects? A defective unit fails as a whole. It's in or it's out, like a scrapped slat. A defect is one flaw, and one unit can have many, like three specks on one frame. Defectives follow the binomial distribution. Defects follow the Poisson. Two: is the sample the same size every time?
That gives four charts. Defectives, with a sample size that changes: the p chart, which plots the fraction defective. Defectives, with a constant sample size: the n p chart, which plots the count. Defects, with the same area of opportunity every time, like one frame: the c chart, the count of defects. And defects, when the amount inspected changes: the u chart, defects per unit.
The formulas
Now the formulas, starting with the p chart. P bar is the total defectives divided by the total inspected, over all the samples. Not the average of the daily percentages! The limits are p bar, plus or minus three times the square root of p bar, times one minus p bar, divided by n. That square root comes straight from the binomial. Notice the n inside it. Each sample gets its own limits. Big samples, tight limits. Small samples, wide limits.
The n p chart is the same chart in counts, for a constant n. The center line is n times p bar. The limits are n p bar, plus or minus three times the square root of n p bar, times one minus p bar. And on any of these charts, if a lower limit comes out below zero, it's set to zero. You can't scrap fewer than zero slats!
For defects, the Poisson makes life simpler, because its variance equals its mean. On a c chart, the center line is c bar, the average count, and the limits are c bar plus or minus three times the square root of c bar. On a u chart, u bar is the total defects divided by the total units inspected. The limits are u bar, plus or minus three times the square root of u bar over n. So again, each sample gets its own limits.
Worked example 1: slat mill scrap
Worked example one: slat mill scrap. Twenty days. The mill ran between six hundred forty and nine hundred twenty slats a day, sixteen thousand in all, and three hundred twenty were scrapped. So p bar is three hundred twenty divided by sixteen thousand: exactly two percent.
Now each day's limits. On a six hundred forty slat day: point oh two, times point nine eight, divided by six hundred forty. The square root is about point oh oh five five. Three of those is about one point six six percent. So the limits run from point three four percent to three point six six percent. On a nine hundred twenty slat day, the limits are tighter: point six two to three point three eight percent. All twenty days sit inside their own limits. In control! Marcus freezes p bar for phase two.
Two weeks into phase two, two days catch Dwayne's eye. On a nine hundred twenty slat day, thirty slats were scrapped. That's three point two six percent. Its limit is three point three eight. Inside! A busy day, not a bad one. Then, on a six hundred forty slat day, twenty eight were scrapped. Fewer slats than the busy day. But that's four point three eight percent, above its limit of three point six six. That's the signal!
Ray finds it. A power blip the evening before had reset the mill's knife counter to zero, so the knives ran about fifteen hundred slats past their change. Lou moves the count to the mill's controller, where it survives a power loss, and Ray writes the count on the board at every shift end. The next day, scrap is back near two percent.
Two shortcuts, and where they stop. One: limits from the average n. If every sample is within about twenty five percent of the average, that's close enough for a quick look, and ours are. But check any point near a limit with its own n. Two: a standardized chart. Divide each day's distance from p bar by that day's own standard deviation, and plot it against limits of plus and minus three. The six hundred forty slat day scores about four point three.
And why not just chart the daily count of scrapped slats? With a changing n, a count mixes two things: how bad the day was, and how busy it was. Our busy day had more scrapped slats than the signal day! Use an n p chart only when n stays the same.
Worked example 2: c and u charts
Worked example two: defects. On the coating line, Priya pulls one Harbor table frame each hour and counts every speck, crater and run under the inspection lamp. One frame, the same area every time, so it's a c chart. Twenty four hours give seventy two blemishes, so c bar is three. The square root of three is about one point seven three. Three of those is about five point two. So the upper limit is about eight point two, and the lower limit comes out negative, so it's zero. Every hour sits between one and six.
Then, one afternoon, a frame shows eleven specks. Way above eight point two! If the process still averaged three, eleven or more would turn up about once in thirty four hundred frames. In a spreadsheet, POISSON dot DIST gives you that chance. The cause: the door from the slat mill, propped open on a hot day. Wood dust drifted onto the frames before the oven. Lou fits a door closer and a sign, and the next hour's frame shows two.
Now Dwayne's end of line audit. Each day, his team pulls ten to twenty finished Harbor chairs and counts every defect: a scratch, a loose seat bolt, a missing glide cap. The number of chairs changes, so it's a u chart. Twenty days: three hundred chairs and one hundred twenty defects. U bar is point four defects per chair. On a ten chair day, the upper limit is point four, plus three times the square root of point four over ten: exactly one point oh. On a twenty chair day, it's about point eight two.
In phase two, a twenty chair day finds fifteen defects. That's point seven five a chair, inside point eight two. Then a ten chair day finds eleven. That's one point one a chair, above its limit of one point oh! Seven of the eleven are loose seat bolts. A new cordless driver had its clutch set too low. Lou locks the clutch setting, and every driver gets a torque check at shift start. Here's the trap: a c chart on the raw counts would have an upper limit of about thirteen point three. It would flag the busy day with fifteen, and miss the real problem with eleven.
Assumptions and sample size
Now the assumptions. The p and n p charts assume each unit fails independently, with the same chance. The c and u charts assume defects happen independently, at a steady rate over the area inspected. When defects come in clusters, or when samples are huge, real data often spread out more than the binomial or the Poisson predicts. The limits come out too tight. So if most of your points are outside the limits, suspect the model before the process. A Laney chart, or an individuals chart on the rates, handles that.
Sample size matters too. Attribute charts need big samples. A common rule of thumb: n times p bar of at least five. And for a p chart's lower limit to rise above zero, n must be more than nine times one minus p bar, divided by p bar. At two percent, that's more than four hundred forty one slats. A check of fifty slats a day could never show an improvement.
How to read the result and decide
So how do you read the result and decide? In phase one, use twenty to twenty five samples. Remove a point only when you've found its cause, then recompute. In phase two, freeze the center line, and work out each new sample's limits from its own n. A point above the upper limit: find the cause now. A point below the lower limit: good news, or a counting problem. Find out which before you celebrate! And these charts tell you how often things go wrong, not why. The defect log tells you why.
Common mistakes
Now the common mistakes. One: averaging the daily percentages to get p bar, instead of total over total. Two: a c chart when the amount inspected changes. Three: one set of limits for every sample size, trusted near the line. Four: mixing up defects and defectives. Five: leaving a negative lower limit on the chart. It's zero. Six: blaming the process when points fly out everywhere, when the model is the problem.
Recap
Let's recap. Defectives: a p chart for a changing n, an n p chart for a constant n. Defects: a c chart for a constant area, a u chart for a changing amount. P chart limits: p bar, plus or minus three times the square root of p bar times one minus p bar, over n. C chart: c bar, plus or minus three root c bar. U chart: u bar, plus or minus three times the square root of u bar over n. A negative lower limit becomes zero. And the rate, not the raw count, tells a bad day from a busy one!
Check yourself
Now, check yourself. Priya checks fifty slats from every lot the slat supplier sends, and counts the warped ones. Over twenty five lots, n p bar is two warped slats per lot. What is the upper control limit on the n p chart? A, six point two four. B, six point one six. C, three point three nine. Or D, twelve point three. Pause the video if you want to think about it.
The answer is B, six point one six. P bar is two divided by fifty: point oh four. Two times point nine six is one point nine two. Its square root is about one point three nine. Three times that is about four point one six. Add the two, and you get six point one six. A used the c chart formula and left out one minus p bar. C forgot the three. And D is the p chart's limit in percent, not a count.
That's building p, n p, c and u charts. Questions? Ask Q-Bot right here in the Academy. And one for the road: why does the p chart never get bored? Because every day, it gets brand new limits!
Independent study material; not affiliated with or endorsed by ASQ. Body of Knowledge codes identify where the topic appears in each certification's published outline.