Home首页 · Causal因果 · Confounding混杂

Lab · Confounding混杂实验 · 混杂

Is the pay gap the subsidy?工资差距是补贴吗?

A labour analyst has 300 workers. For each worker the sheet has three numbers: whether they used a retraining subsidy, monthly pay one year later, and household savings before the program. The analyst will recommend expanding the subsidy if pay rises with use. Savings can raise both use and later pay, so the line can slope up when the subsidy itself adds nothing. That shared push is confounding.一位劳工分析员手上有 300 名工人。每人三列数字:有没有用再培训补贴、一年后的月薪、参加项目前的家庭积蓄。如果月薪随使用而上升,分析员会建议扩大补贴。积蓄可以同时抬高使用和后来的月薪,所以补贴本身没加一分钱时,线仍可能向上。这种两边一起推,叫做混杂。

Why this matters.为何重要。 The line is later pay against subsidy use. It can rise because savings push both, even when the subsidy itself adds nothing. A memo that wants the subsidy’s own effect has to say what the savings column is, and why it is allowed to adjust for it.这条线是后来的月薪对有没有领补贴。积蓄可以两边一起推,所以补贴本身没加钱时线仍会上升。说明如果要的是补贴自己的作用,就要说出积蓄那一列是什么,以及为什么允许对它调整。

Try this试一试 Leave the subsidy’s own effect at zero. Turn up how strongly savings push both use and later pay. Does the line still rise?把补贴本身的作用留在零。把积蓄推动领补贴和后来月薪的力度调高。线还会上升吗?

300 observations · errors held fixed while you move sliders.300 个观测 · 移动滑块时误差保持不变。

Each dot is one worker. The line is later pay against subsidy use, with savings left out.每个点是一名工人。线是后来的月薪对有没有领补贴,积蓄没有放进去。

Read the chart读这张图

If you misread this读错了会怎样

If the labour analyst tells the minister the upward line means the subsidy raised pay, the minister can expand a program that added nothing. With the subsidy’s own effect at zero, the tilt is household savings pushing both use of the subsidy and later pay.如果劳工分析员告诉部长,向上的线表示补贴提高了月薪,部长就可以扩大一个本身没加一分钱的项目。补贴自己的作用为零时,倾斜来自家庭积蓄同时推动了领补贴和后来的月薪。

Enough, and not enough够用,以及不够

Enough to see 300 workers and one line slope up when the subsidy itself adds nothing to pay.够用来看见:补贴本身没给月薪加一分钱时,300 名工人和一条线仍可以向上。

Not enough for the expansion memo. It still has to name the savings column, say why it is allowed to adjust for savings, and use a design that is not this one straight line.不够写扩大补贴的说明。说明仍要指出积蓄那一列,说明为什么允许对积蓄做调整,并使用不是这一条直线的设计。

Seed 42
Equations, assumptions, and limits方程、假设与限度

Current equation当前方程

U → X → Y, with U → Y. We generate U, eₓ, and eᵧ independently from standard normal distributions; X = aU + eₓ and Y = τX + bU + eᵧ. The sliders set a, b, and τ.U、eₓ 和 eᵧ 独立地从标准正态分布生成;X = aU + eₓ,Y = τX + bU + eᵧ。滑块设定 a、b 和 τ。

The unadjusted model is Y ~ 1 + X. The adjusted model is Y ~ 1 + X + U. In the population, the unadjusted slope is τ + ab / (a² + 1). The sample estimates vary around their population targets.未调整模型是 Y ~ 1 + X。调整后的模型是 Y ~ 1 + X + U。在总体上,未调整斜率是 τ + ab / (a² + 1)。样本估计在其总体目标附近波动。

Adjustment works here because U is observed without error, the linear model is correct, and there are no other confounders. Real studies must justify those assumptions. Adding arbitrary controls can introduce bias; this experiment does not model colliders, mediators, or selection.这里调整有效,是因为 U 被无误差地观测到,线性模型是对的,而且没有其他混杂因素。真实研究必须为这些假设辩护。随意加控制变量可能引入偏误;本实验不模拟对撞因子、中介或选择。

Common pitfall.常见陷阱。 One is to treat any adjusted slope as “the causal effect” once a control is available. Here the adjustment recovers τ only under the assumptions just stated. Conditioning on a common effect of X and Y, or on a step along the way from X to Y, can pull the estimate off the effect. Those graphs are not in this simulation. Another pitfall is to read one sample slope as the population bias ab / (a² + 1). The sliders fix the population number. The dots add noise around it.一个陷阱是:只要有控制变量,就把调整后的斜率当成“因果效应”。这里只有在刚才那些假设下,调整才找回 τ。若去条件于 X 和 Y 的共同结果,或条件于从 X 到 Y 途中的一步,估计会偏离效应。这些图不在本模拟里。另一个陷阱是把一次样本斜率读成总体偏误 ab / (a² + 1)。滑块固定总体的数。点在它周围加噪声。

Books behind this lab are named on the本实验背后的书按主题列在About关于.