Menu
P-Chart vs NP-Chart: Choosing the Right Attribute Control Chart

P-Chart vs NP-Chart: Choosing the Right Attribute Control Chart

P chart vs np chart explained: when to use each attribute control chart, the sample-size decision rule, and worked control limit calculations for factories.
P-Chart vs NP-Chart: Choosing the Right Attribute Control Chart

A p-chart and an np-chart are both attribute control charts that monitor defective units, but the p-chart plots the proportion defective and handles varying sample sizes, while the np-chart plots the raw count of defectives and requires a constant sample size. When subgroup sizes are constant, both charts flag identical signals and the np-chart is simply easier for operators to read. When they vary, only the p-chart stays valid. This guide gives you the decision rule, both sets of formulas, and a fully worked example with real numbers.

Where attribute charts sit in the SPC toolbox

Control charts split into two families. Variables charts (X-bar and R) track continuous measurements such as diameters or fill weights. Attribute charts track counts, and the p-chart and np-chart sit alongside the c-chart and u-chart in any mature statistical process control program.

One distinction inside the attribute family trips people up constantly:

  • Defectives are whole units that fail: one scratched, mislabeled, underfilled bottle is one defective. The p-chart and np-chart count defectives (binomial model).
  • Defects are individual nonconformities: that same bottle carries three defects, which calls for a c-chart or u-chart (Poisson model).

If your inspection record says "unit good" or "unit bad," you are in p-chart and np-chart territory.

How the p-chart works

The p-chart plots the fraction defective in each subgroup. The center line is p-bar: total defectives across all subgroups divided by total units inspected.

The control limits for a subgroup of size n are:

  • UCL = p-bar + 3 x sqrt( p-bar x (1 - p-bar) / n )
  • LCL = p-bar - 3 x sqrt( p-bar x (1 - p-bar) / n ), set to zero if the math goes negative

Because n appears in the formula, each subgroup gets its own limits: small samples wide, large samples tight. That stepped-limit behavior is what lets the p-chart absorb swings in inspection volume.

How the np-chart works

The np-chart plots the raw count of defectives per subgroup, valid only when every subgroup has the same size n. The center line is n x p-bar, the expected number of defectives per sample, and the limits are:

  • UCL = n x p-bar + 3 x sqrt( n x p-bar x (1 - p-bar) )
  • LCL = n x p-bar - 3 x sqrt( n x p-bar x (1 - p-bar) ), floored at zero

The advantage is practical: operators plot "14 defectives" instead of "0.07" and the limits are two fixed lines. Statistically it is the same binomial test.

The decision rule

  1. Counting defective units with a constant sample size? Use the np-chart. It is simpler to plot, explain, and audit.
  2. Counting defective units with a varying sample size? Use the p-chart. It is the only one of the two that stays valid.
  3. Counting defects per unit rather than defective units? Neither. Switch to a c-chart (constant inspection unit) or u-chart (varying).

One sizing rule matters for both: pick n so that n x p-bar is at least about 5. At 1 percent defective, subgroups of 50 will mostly contain zero defectives and tell you nothing; you need roughly 500.

Worked example: limits for both charts

NP-chart. A bottling line inspects exactly 200 bottles every hour. Over 25 hours, inspectors found 300 defectives in 5,000 bottles, so p-bar = 300 / 5000 = 0.06. Then:

  • Center line = 200 x 0.06 = 12 defectives
  • sqrt( 200 x 0.06 x 0.94 ) = sqrt(11.28) = 3.36
  • UCL = 12 + 3 x 3.36 = 22.08, so 23 or more defectives is a signal
  • LCL = 12 - 3 x 3.36 = 1.92, so 1 or 0 defectives is also a signal (investigate: real improvement, or an inspection lapse?)

P-chart. A final-inspection station checks everything produced, and daily volume varies. Over 20 days, 280 defectives turned up in 5,600 units, so p-bar = 0.05. On a slow day with n = 150: sqrt( 0.05 x 0.95 / 150 ) = 0.0178, so UCL = 0.05 + 3 x 0.0178 = 0.1034 (10.34 percent) and the LCL floors at zero. On a busy day with n = 400: sqrt( 0.05 x 0.95 / 400 ) = 0.0109, so UCL = 0.0827 and LCL = 0.0173. The same 8 percent defective rate is in control on the slow day but out of control on the busy day, which is precisely the sensitivity a fixed-limit chart would have thrown away.

From signal to root cause

A point beyond the limits says only that an assignable cause exists, not what it is. Apply run tests such as the Nelson rules to catch shifts and trends inside the limits, then use Pareto analysis on the defect codes behind out-of-control subgroups to find the dominant failure mode. Many attribute signals trace back to equipment condition: worn tooling, drifting setpoints, degraded fixtures. Tracking your scrap rate alongside the chart makes the money impact visible.

Where Fabrico fits

Both charts live or die on trustworthy counts: how many units ran, how many failed, and when. Fabrico is the real-time data foundation that supplies exactly that. Its real-time OEE and production monitoring captures production and quality counts as they happen, including via computer vision on machines that have no PLC. When a chart signal points to an equipment cause, the CMMS side turns it into action: a work order on the right asset, with asset history and preventive scheduling so the same cause does not return. Fabrico is also EU-built with EU data residency.

Frequently Asked Questions

Can I use a p-chart when my sample size is constant?

Yes, and it will give identical signals because it performs the same binomial test. Most teams still prefer the np-chart there because raw counts are faster to plot on the floor and easier to explain in audits.

What if my sample sizes vary only a little?

A common rule of thumb: if every subgroup is within about 25 percent of the average sample size, you may compute one set of limits from the average n and treat them as fixed. Recheck points near the limits with their exact subgroup size before making a call.

Do these charts replace defect-level or measurement-level analysis?

No. These charts only tell you whether the rate of defective units is stable. They say nothing about which defects dominate, and nothing about whether a stable process meets specification, which is a process capability question. A stable process can still be a bad one.

Want control charts fed by live production counts instead of clipboard tallies? Book a Fabrico demo and see your defect data, OEE, and maintenance response in one system.

Latest from our blog

Define Your Reliability Roadmap
Validate Your Potential ROI: Book a Live Demo
Define Your Reliability Roadmap
By clicking the Accept button, you are giving your consent to the use of cookies when accessing this website and utilizing our services. To learn more about how cookies are used and managed, please refer to our Privacy Policy and Cookies Declaration