Skip to main content

p Chart

The p chart is a SPC Chart PRO attribute chart that monitors the proportion of defective units in each subgroup, when the number of units inspected is allowed to vary from subgroup to subgroup.

Where a variables chart (XmR, Xbar-R) tracks a measured value, a p chart tracks a pass/fail outcome: of the units inspected in a subgroup, what fraction failed. Because the sample size can change — you might inspect 80 units one shift and 120 the next — the p chart scales the control limits to each subgroup, so a subgroup of 120 is judged against tighter limits than a subgroup of 80.

Select p chart (proportion defective) in the Chart Type dropdown.

p chart with stepped control limits following the subgroup sample size

How It Works

Each row of your query is one subgroup. The value field holds the count of defective units in that subgroup, and a second column (or a fixed option) gives the number of units inspected. The panel plots the proportion defective — defective ÷ inspected — for each subgroup.

The center line is the overall proportion defective, pooled across every subgroup. The control limits are set three sigma out under the binomial distribution, and because the binomial standard error shrinks as the sample grows, the limits step in and out to follow each subgroup's own sample size.

A subgroup is flagged when its proportion falls outside its own limits, signaling that its defective rate is not consistent with the process average.

Setting It Up

In the SPC section, with the p chart type selected:

OptionDescription
Sample size fieldA numeric field in your query giving the number of units inspected per subgroup. It is hidden from the plot automatically.
Fixed sample sizeA constant number inspected per subgroup, used when no sample-size field is selected.

Rows with a missing count or a non-positive sample size are treated as gaps: they are not plotted and do not contribute to the center line or the limits.

Variable Control Limits

When the sample size varies, the limits vary with it — larger subgroups give tighter limits — and the panel draws them as stepped lines that follow each subgroup's own limit.

The scalar LCL/UCL shown in labels, the statistics table, and the fill region are representative values computed from the average sample size. Run rules always test each point against its own per-point limits.

Methods and Formulas

Let each subgroup i contribute dᵢ defective units out of nᵢ inspected.

Formula
Plotted valuepᵢ = dᵢ ⁄ nᵢ
Center linep̄ = Σdᵢ ⁄ Σnᵢ
Control limitsp̄ ± 3·√( p̄(1−p̄) ⁄ nᵢ )

The limits are clamped to the valid range [0, 1]: a lower limit that would fall below zero is held at 0, and an upper limit above 1 at 1.

info

Classic p limits assume the binomial distribution holds exactly. With very large subgroups, real processes often vary more than the binomial predicts (overdispersion) and nearly every point falls outside the limits. When that happens, switch to the Laney p′ chart, which corrects for it.

Choosing the p Chart

ScenarioChart
Pass/fail inspection, sample size variesp
Pass/fail inspection, constant sample sizenp
p chart with large subgroups and limits that look too tightLaney p′
info

The sample-size configuration and chart type are saved with the dashboard. Like every chart type, the p chart works with both a time and a numeric X-axis.


The p chart is part of SPC Chart PRO. For requirements, licensing, and support, see the SPC Chart PRO documentation.