Skip to content

Compliance and audits

Attribute control charts: p, np, c and u charts, with a worked p chart

9 min read Published

Attribute control charts track counts instead of measurements: a p chart plots the proportion of defective units in each sample, an np chart the number of defective units when every sample is the same size, a c chart the number of defects in a fixed inspection unit, and a u chart the defects per unit when the amount inspected varies. Each chart sets its limits 3 standard deviations either side of the average, from the binomial model for defective units and the Poisson model for defects.

On this page

Which attribute chart fits your data?

Two questions pick the chart. The first is whether you count defective units or defects. A defective unit, also called a nonconforming unit, is a whole item that fails, and it counts once however many faults it has. A defect, or nonconformity, is a single fault, and one unit can carry several. The NIST/SEMATECH e-Handbook of Statistical Methods (section 6.3.3.1) draws the same line: a nonconforming item contains at least one nonconformity. The second question is whether the amount inspected is the same every time.

Attribute control charts by data case
ChartWhat it plotsData caseModel
p chartProportion of defective units in each sampleDefective units, sample size constant or varyingBinomial
np chartNumber of defective units in each sampleDefective units, the same sample size every timeBinomial
c chartNumber of defects in each inspection unitDefects, the same inspection unit every time, such as one assembly or one panelPoisson
u chartDefects per unit in each sampleDefects, with the number of units inspected varyingPoisson
Tip: Minitab's guidance makes the same split. It sends data where you can count defects on each item to a u or c chart, and data with unequal subgroup sizes from an np chart to a p chart. ISO 7870-2:2023, the ISO guide to Shewhart control charts, covers attribute charts in its clause 10.

Control limit formulas for p, np, c and u charts

All four are Shewhart charts with 3-sigma limits: the center line plus and minus 3 standard deviations of the plotted value. What differs is the standard deviation, which comes from the binomial model for defective units and from the Poisson model for defects. In each formula, n is the size of the sample being plotted, and UCL and LCL are the upper and lower control limits.

p chart. Data case: defective units, any sample size. The center line is p̄ = total defective units ÷ total units inspected, which weights each sample by its size. For a sample of size n, UCL = p̄ + 3√(p̄(1 − p̄)/n) and LCL = p̄ − 3√(p̄(1 − p̄)/n). When sample sizes differ, each sample gets its own limits, and a negative LCL is set to zero. NIST e-Handbook section 6.3.3.2 gives these limits for a constant sample size, and the SAS/QC documentation gives the same form for samples of varying size.

np chart. Data case: defective units, the same sample size n every time. The center line is n × p̄ and the limits are n × p̄ ± 3√(n × p̄(1 − p̄)). An np chart gives the same signals as a p chart of the same data, in counts that are easier to read on the shop floor.

c chart. Data case: defects, the same inspection unit every time. The center line is c̄, the average count, and the limits are c̄ ± 3√c̄. The e-Handbook's example (section 6.3.3.1): 25 wafers with 400 defects in all give c̄ = 16, UCL = 16 + 3√16 = 28 and LCL = 16 − 3√16 = 4.

u chart. Data case: defects, with a varying amount inspected. Each point is u = defects ÷ units inspected in that sample. The center line is ū = total defects ÷ total units, and for a sample of n units the limits are ū ± 3√(ū/n), with a negative LCL set to zero.

Behind the c and u charts sits the Poisson model, whose variance equals its mean. The e-Handbook notes that it fits when a defect could occur at many places but is unlikely at any single one of them.

Tip: Check which p̄ your spreadsheet or SPC software uses. The limits above need total defective units divided by total units inspected. The plain average of the sample proportions gives a different value when sample sizes vary.

Worked example: a p chart for a thread gauge check

A turning cell makes a threaded fitting. At the end of each shift an inspector checks the shift's output, usually 500 parts, with a go/no-go thread gauge and counts the rejects. Over 25 shifts, 12,300 parts were checked and 369 rejected. One shift ran short and only 300 of its parts were checked.

The center line is p̄ = 369 / 12,300 = 0.0300.

For the shifts of 500: 3√(0.03 × 0.97 / 500) = 3 × 0.00763 = 0.0229, so UCL = 0.0529 and LCL = 0.0071.

For the short shift of 300: 3√(0.03 × 0.97 / 300) = 3 × 0.009849 = 0.0295, so UCL = 0.0595 and LCL = 0.0005.

The table shows the first five shifts. Shift 4 at 0.040 sits inside its own, wider limits. Shift 5 at 0.058 is above its UCL of 0.0529 and is a signal. In this example the inspector finds that a new lot of bar stock went into the machine that morning. Once that cause is found and removed, leave shift 5 out and recalculate: p̄ becomes 340 / 11,800 = 0.0288, and the limits follow from it.

The first five shifts of the p chart, with each shift's limits
ShiftParts checked (n)RejectspLCLUCLSignal
1500140.0280.00710.0529No
2500170.0340.00710.0529No
3500110.0220.00710.0529No
4300120.0400.00050.0595No
5500290.0580.00710.0529Yes, above the UCL
Tip: As an np chart for the shifts of 500, the same data give a center line of 500 × 0.03 = 15 rejects and limits of 15 ± 3√(15 × 0.97) = 15 ± 11.4, so 3.6 to 26.4. Shift 5 with 29 rejects signals there too. Shift 4, with its smaller sample, does not fit an np chart with one center line. That is the case for a p chart.

When is there a lower control limit?

With small samples or a low rate, the formula gives a negative LCL and the chart has no lower limit. For a p chart the LCL is above zero only when n is larger than 9(1 − p̄)/p̄, which follows from setting the LCL formula above zero. At p̄ = 0.03 that is more than 291 units, which is why the 300-part shift in the example only just has a lower limit.

For a c chart the same reasoning gives c̄ larger than 9. The e-Handbook makes the point the other way round: with a mean below 9, the 3-sigma LCL is not positive.

A point below a positive LCL is a signal too. It can mean a real improvement. It can also mean the inspection changed: a new inspector, a worn gauge or a skipped step. Check the inspection before you credit the process.

For small counts, 3-sigma limits are only an approximation. The e-Handbook says the normal approximation to the Poisson is adequate when the mean is at least 5, and warns against 3-sigma limits for highly skewed distributions. Probability limits from the exact distribution, which SPC software can calculate, are the alternative.

How to read signals on a p, np, c or u chart

The first signal is a point outside the control limits. Patterns inside the limits can signal a change too. Minitab offers 4 tests on its attribute charts: 1 point more than 3 standard deviations from the center line, 9 points in a row on the same side of the center line, 6 points in a row all increasing or all decreasing, and 14 points in a row alternating up and down.

On a p or u chart with varying sample sizes, judge each point against its own limits. A run of points on one side of the center line still counts, because the center line is the same for every sample.

A point on the high side means more defective units or defects than the process normally makes. Look for what changed at that time, such as a material lot, a tool, a machine setting or the gauge itself, and write the cause next to the point. The chart then becomes the history of the process.

Agree in advance which tests count as a signal and who acts on one. More tests catch changes sooner and raise more false alarms.

Common mistakes with attribute control charts

  • Putting defects on a p or np chart. If one part can carry three scratches, the scratches are defects and belong on a c or u chart. Count defective parts on a p chart.
  • Using an np chart while the sample size changes. The center line moves with n, so switch to a p chart.
  • Averaging the sample proportions when sample sizes differ. Use total defective units divided by total units inspected.
  • Drawing every limit from the average sample size. The SAS/QC documentation warns that limits based on a nominal sample size are only approximate when sample sizes vary, so give each sample its own limits.
  • Ignoring overdispersion. When the rate varies from sample to sample more than the binomial or Poisson model allows, ordinary limits are too narrow and too many points fall outside them. Minitab's P chart diagnostic tests for this, and its Laney P' and U' charts allow for the extra variation.
  • Reading the chart against the specification. The limits show what the process does, and a process in control can still make more defective units than the customer accepts.
  • Recalculating the limits every week. Set them from a stable baseline, and recalculate only after a deliberate change to the process.

Attribute data depend on the inspection

An attribute chart counts decisions, so it inherits every error in them. A go/no-go gauge worn past its limit, or two inspectors who judge a borderline flaw differently, can move the chart as much as the process does. Calibrate gauges on schedule, and run an attribute agreement study to see whether inspectors agree with each other and with a reference.

For lots bought from a supplier, the same counts can serve two purposes. An AQL sampling plan decides whether each lot is accepted. A p chart of the proportion nonconforming in each sample shows whether the supplier's process is steady from lot to lot.

Where Axiospec fits

Axiospec is calibration management software, not SPC software, and it does not draw control charts. It keeps track of the gauges behind your attribute data: each go/no-go or thread gauge can be an instrument on the register with its certificates and next due date, and where Gage R&R studies are switched on, a manager can record an attribute agreement study on its instrument page. The free plan covers up to 50 active instruments, and a new workspace starts with a 45-day trial of Professional with no credit card.

Common questions

What is the difference between a p chart and an np chart?
Both chart defective units with the binomial model. A p chart plots the proportion defective and works with any sample size. An np chart plots the number of defective units and needs the same sample size every time.
When do you use a c chart instead of a u chart?
Use a c chart when each count comes from the same amount of inspection, such as one assembly or one panel. Use a u chart when the amount inspected varies, because it plots defects per unit and gives each sample its own limits.
How do you calculate p chart control limits?
Work out p̄ as total defective units divided by total units inspected. For a sample of size n the limits are p̄ ± 3√(p̄(1 − p̄)/n), and a negative lower limit is set to zero.
Why do my p chart limits change from point to point?
Because the sample size changes. The standard deviation of a proportion depends on n, so a smaller sample gets wider limits and a larger one narrower limits. The center line stays the same.
Is a defect the same as a defective?
No. A defect is a single nonconformity, and a defective is a unit with at least one of them. One defective unit can carry several defects, so defective units go on p and np charts and defects on c and u charts.
What does a negative lower control limit mean?
It means the chart has no lower limit at that sample size, so the LCL is set to zero. For a p chart this happens unless n is larger than 9(1 − p̄)/p̄. For a c chart it happens unless c̄ is larger than 9.

Put it into practice

Got a gage list? Send it over and we load it for you, usually in a couple of business days. Free on every plan. Then log every calibration to a tamper-evident audit trail and produce records on demand.

Axiospec is a documentation and workflow tool. It helps you keep clean, traceable, audit-ready records. Certification depends on your own processes, scope and assessor.