故事 · 二项分布走进车间 Origin Story · The Binomial Walks Onto the Shop Floor
不是每个质量特性都能拿卡尺量。检验员面对一筐零件,往往只做一件事:挑出不合格的,数一数有几个。 这种"合格 / 不合格"的判定本质是伯努利试验,一批里不良品的个数就服从二项分布。 于是 Shewhart 体系里多出两张属性控制图:p 图盯不良(每批可以抽不同数量),np 图盯不良(每批抽固定数量)。 它们最妙的地方是:因为二项分布的标准差是 √(p(1−p)/n),样本量 n 越大,估计越精确、控制限就越窄。 所以当各批抽样量不同时,p 图的上下限会像阶梯一样随 n 一收一放 —— 这是测量型控制图里从未见过的景象。 Not every quality characteristic submits to a caliper. Faced with a bin of parts, an inspector usually does just one thing: pull out the bad ones and count them. That "good vs. bad" verdict is a Bernoulli trial, and the number of defectives in a subgroup follows the binomial distribution. So Shewhart's framework grew two attribute charts: the p-chart tracks the defective rate (each subgroup may have a different size), the np-chart tracks the defective count (subgroup size is fixed). The elegant part: because the binomial standard deviation is √(p(1−p)/n), larger n means a sharper estimate and tighter limits. When subgroup sizes vary, the p-chart's upper and lower limits breathe in and out with n like a staircase — a sight you never see on a variable-data chart.

1 p 图:不良率 + 随 n 伸缩的阶梯控制限 p-Chart: Proportion Defective with Staircase Limits That Flex with n

受控In control

2 每批的样本量 n(驱动控制限阶梯) Subgroup Sample Size n (Drives the Staircase)

勾上"样本量可变"后,每批 n 不同,高柱(大 n)对应窄控制限,矮柱(小 n)对应宽控制限。 若每批 n 固定,p 图就退化成普通的水平限 —— 这时直接用 np 图(盯不良个数)更直观。 With "variable sample size" enabled, n changes subgroup to subgroup. Tall bars (large n) pair with tight limits, short bars (small n) with wide ones. When n is fixed, the p-chart collapses to flat limits — at that point an np-chart (counting defectives directly) is easier to read.

3 现实里的 p / np 图 p / np Charts in the Real World

不良率监控:每日抽检的不良比例、退货率、首次合格率(FPY),是 p 图最经典的用武之地。 Defective-rate monitoring: daily incoming-inspection reject rates, return rates, first-pass yield (FPY) — classic p-chart territory.
二项控制图:每件只判"合格/不合格",不良品个数服从二项,是 p / np 图的理论基础。 Binomial control charts: each unit is judged simply pass/fail, the number defective follows a binomial — that is the theoretical foundation for both p and np charts.
可变样本量:批量时大时小时,p 图的阶梯控制限自动按 n 调宽窄,比硬画一条平线更公平。 Variable subgroup size: when batch sizes drift up and down, the p-chart's staircase limits auto-adjust to each n — fairer than forcing a single horizontal line across them all.
属性数据:表面外观、功能通断、装配齐套这类判定型特性,都归 p / np 图管。 Attribute data: cosmetic pass/fail, functional go/no-go, assembly completeness — any verdict-style characteristic belongs to p / np charts.
一句话In One Line
测量型控制图的 σ 来自数据本身,所以控制限是一条水平直线。但属性数据不一样 —— 不良率的标准差由二项分布给定:√(p̄(1−p̄)/n),它随样本量 n 变化。 n 越大,分母越大,标准差越小,控制限就越靠近中心线。这就是为什么 p 图的限会随每批 n 阶梯式收放。 搞懂这一点,你就明白:p 图(不良率,可变 n)和 np 图(不良数,固定 n)其实是同一枚硬币的两面 —— 固定 n 时控制限退化成水平线,画 np 更省事;n 变动时只能画 p,让控制限跟着 n 走。 On a variable-data chart σ comes from the data itself, so the limits are a clean horizontal line. Attribute data is different. The standard deviation of the defective rate is dictated by the binomial: √(p̄(1−p̄)/n), which moves with n. Bigger n → bigger denominator → smaller SD → limits hug the centerline tighter. That is exactly why p-chart limits step in and out with each subgroup's n. Once you internalize this, you see the p-chart (defective rate, variable n) and the np-chart (defective count, fixed n) as two sides of the same coin: when n is fixed the limits flatten and an np-chart is the easier read; when n varies you must draw a p-chart and let the limits travel with n.
常见误用Common Mistakes
样本量可变还画一条水平限n 变动时必须用 p 图的阶梯限或标准化 z 图;用平均 n 一刀切会误判出界。 Drawing a single flat limit when sample sizes vary. Use the p-chart's staircase limits or a standardized z-chart; collapsing to an average n produces false out-of-control signals.
把缺陷数当不良品数一件可有多个缺陷用 c / u 图(泊松);一件只判合格/不合格才用 p / np 图(二项)。 Treating a defect count as a defective count. When a single unit can carry multiple defects, use c / u charts (Poisson). Use p / np (binomial) only when each unit yields a clean pass/fail verdict.
样本太小、不良率极低还用二项限np̄ 太小时正态近似失效,控制限不可信,要加大样本量或改用精确二项限。 Sticking to 3-sigma binomial limits when n is small and p is tiny. When np̄ is too small the normal approximation breaks down and the limits become unreliable — increase the sample size or switch to exact binomial limits.

p / np 控制图