故事 · Fisher 的因子试验与「交互」的诞生 Origin Story · Fisher's Factorial Experiments and the Birth of "Interaction"
单因子 ANOVA 一次只问一个因子。但 Fisher 在 Rothamsted 农场很快发现:同时变肥料品种时, 某个肥料只对某个品种特别有效 —— 因子的作用互相依赖。他 1926 年提出因子试验,主张一次操纵多个因子, 并首次给这种「1+1 ≠ 2」的效应起名 interaction(交互作用)。 数学上,总变异被进一步劈成:因子 A 主效应、因子 B 主效应、A×B 交互、以及残差。 交互项回答一个主效应表回答不了的问题:「A 的最优设置,会不会随 B 改变?」 如果会,你就不能孤立地谈「A 好不好」—— 必须连着 B 一起说。这正是稳健设计(田口)与全因子 DOE 的灵魂。 One-way ANOVA asks about one factor at a time. But Fisher at Rothamsted quickly saw that when you vary fertilizer and variety together, a fertilizer might help only one variety — the factors' effects depend on each other. His 1926 factorial experiment argued for manipulating several factors at once, and he coined the name interaction for this "1+1 ≠ 2" effect. Mathematically, total variation splits further into: factor A's main effect, factor B's main effect, the A×B interaction, and residual error. The interaction term answers what no main-effect table can: "does the best setting of A change with B?" If it does, you cannot judge "is A good?" in isolation — you must speak of A and B together. This is the soul of robust design (Taguchi) and full-factorial DOE.

1 交互作用图 · 平行=无交互,不平行=有交互 Interaction Plot · Parallel = No Interaction, Non-Parallel = Interaction

2 总变异劈成四块,各自的 F Total Variation Split Into Four, Each With Its Own F

SSASSB 是两个主效应,SSAB 是交互,SSE 是残差噪声。每块除以自由度成 MS,再各自比 MSE 得 F。 SSA and SSB are the two main effects, SSAB the interaction, SSE the residual noise. Divide each by its df to get MS, then each ÷ MSE gives its F.

3 动手算一遍 · 2×2 设计,每格 3 次重复 Work It Out · A 2×2 Design With 3 Replicates per Cell

数据(N = 12,四格观测):Data (N = 12, four cells):

A1B1: 9,10,11 (x̄=10)  ·  A1B2: 13,14,15 (x̄=14)
A2B1: 15,16,17 (x̄=16)  ·  A2B2: 23,24,25 (x̄=24)
行均值row means: A1=12, A2=20  ·  列均值col means: B1=13, B2=19  ·  总均值grand=16
SSA = b·n·Σ(Ā−x̿)² = 2·3·(4²+4²) = 192  (df=1)
SSB = a·n·Σ(B̄−x̿)² = 2·3·(3²+3²) = 108  (df=1)
SSAB = n·Σ(cell−Ā−B̄+x̿)² = 3·(1²·4) = 12  (df=1)
SSE = Σ(y−cell)² = 4格×(1+0+1) = 8  (df=ab(n−1)=8) → MSE=1
SST = 192+108+12+8 = 320
FA=192/1=192, FB=108/1=108, FAB=12/1=12   vs   F0.05,1,8=5.32

三者都越过 5.32:两个主效应显著,交互也显著 —— A 的效应确实随 B 变(A2 在 B2 下的跃升比 B1 下更大:8 vs 4)。此时不能只报主效应,必须报「A×B 组合」。 All three exceed 5.32: both main effects are significant and so is the interaction — A's effect really does change with B (A2's jump under B2 is bigger than under B1: 8 vs 4). Report the "A×B combination," not the main effects alone.

4 固定效应 vs 随机效应,与 ICC Fixed vs Random Effects, and the ICC

固定效应:你关心的就是这几个特定水平(3 种指定配方、2 台指定机床),结论只推广到它们本身。F 的分母永远是 MSE Fixed effects: you care about exactly these levels (3 named recipes, 2 named machines); conclusions apply only to them. The F denominator is always MSE.
随机效应:这几个水平只是从一个大总体里随机抽的(随机选的 5 个操作员、5 个批次),你关心的是整个总体的方差。期望均方(EMS)不同,F 的分母也可能换成 MSAB Random effects: these levels are just a random sample from a larger population (5 randomly chosen operators, 5 batches); you care about the whole population's variance. The expected mean squares (EMS) differ, and the F denominator may become MSAB.
ICC = σ²between / (σ²between + σ²within)  ,  σ²between = (MSbetween − MSwithin)/n
e.g.: MSbetween=50, MSwithin=5, n=4 → σ²between=(50−5)/4=11.25
ICC = 11.25/(11.25+5) = 0.6969% 的变异来自「组别」,同组观测高度相似69% of variance is between-group; observations in a group are highly similar

ICC 把随机效应的方差分量翻译成一句人话:「同一组里的两个观测有多像」。ICC 高 → 分组信息很重(如同一操作员测出来的值扎堆);这也正是量具 R&R 里 %研究变异的同一套方差分解逻辑。 The ICC translates the random-effects variance components into one plain sentence: "how alike are two observations in the same group." High ICC → grouping matters a lot (e.g., readings from one operator cluster together); this is the very same variance-decomposition logic used in gauge R&R's %study variation.

一句话In One Line
双因子 ANOVA 把总变异切成四块:A 主效应 + B 主效应 + A×B 交互 + 残差。 交互项是这页的主角 —— 它单独回答「A 的最优设置会不会随 B 变」。交互作用图上平行=没交互(可以分开谈), 不平行/交叉=有交互(必须合着谈)。一旦交互显著,别再单看主效应,那会误导。 至于因子是固定(就这几个水平)还是随机(总体里抽的),决定了 F 的分母该用 MSE 还是 MSAB, 以及你是否该用 ICC 去量「同组有多像」。选错模型,p 值会系统性偏。 Two-way ANOVA slices total variation into four: A main effect + B main effect + A×B interaction + residual. The interaction is this page's protagonist — it alone answers "does A's best setting change with B." On the interaction plot, parallel = no interaction (talk about them separately), non-parallel/crossing = interaction (talk about them together). Once the interaction is significant, don't read the main effects alone — that misleads. Whether a factor is fixed (exactly these levels) or random (sampled from a population) decides whether F's denominator is MSE or MSAB, and whether you should use the ICC to measure "how alike a group is." Pick the wrong model and the p-values are systematically off.
常见误用Common Mistakes
交互显著还只解释主效应交互显著时,「A 平均更好」可能是假象;要看具体在哪个 B 水平下 A 才更好。 Interpreting only main effects when the interaction is significant. With a significant interaction, "A is better on average" can be an illusion — check under which B level A actually wins.
把固定和随机效应混为一谈随机效应模型里,检验主效应的 F 分母常是 MSAB 而非 MSE;用错会高估显著性。 Confusing fixed and random effects. In a random-effects model the main-effect F often uses MSAB, not MSE, as its denominator; the wrong one inflates significance.
没有重复就想估交互每格只有 1 个观测时,交互项和残差混在一起、无法分开;要估 A×B 必须每格 ≥2 次重复。 Estimating interaction without replication. With one observation per cell, the interaction is confounded with error; estimating A×B needs ≥2 replicates per cell.

双因子方差分析