
Each ends with the same two words: and why?
Part 1: The red car
Part 2: Direct and indirect effects
Part 3: Two fair predictors
Part 4: Luck and responsibility
You were asked to bring one decision in which an attribute is used, or deliberately not used, with one route by which it could affect the outcome, and whether that route is fair.
Draw your route as arrows, from the attribute to the outcome. Which arrow is your judgment about?
Court of Justice of the European Union, press release on Test-Achats, 1 March 2011:
“Taking the gender of the insured individual into account as a risk factor in insurance contracts constitutes discrimination”
From 21 December 2012: no differences by gender in individuals’ premiums, in new contracts.
Court of Justice of the European Union (2011), Press Release No 12/11, 1 March 2011, on Case C-236/09, Association belge des Consommateurs Test-Achats ASBL and Others v Conseil des ministres, https://curia.europa.eu/site/upload/docs/application/pdf/2011-03/cp110012en.pdf, pages 1–2. European Commission (2012), Guidelines on the application of Council Directive 2004/113/EC to insurance, in the light of the judgment in Case C-236/09 (Test-Achats), Official Journal of the European Union C 11, 13 January 2012, 1–11, paragraphs 5 and 14.

Aggression \(U\) is never observed.
Fairness through unawareness: price on \(X\), never on \(A\). (The law is more detailed; this is the model’s version.)
Kusner, Loftus, Russell and Silva (2017), “Counterfactual Fairness,” Advances in Neural Information Processing Systems 30; arXiv:1703.06856v3, Scenario 1, page 4 (with race as \(A\)). Loftus, Modern Statistics 4 Data Science, section 3.4.1, https://joshualoftus.com/ms4ds/ethical-data-science.html#causal-models (with gender).
The insurer prices on the car alone. Is that price fair to women? Write yes or no, and one reason.
\[ X = 2A + U, \qquad Y = U + \varepsilon \]
\(A = 1\) for a woman, half the drivers; \(U\) and \(\varepsilon\) are \(N(0, 1)\), independent of each other and of \(A\). Claims and prices are measured from the average.
Fit \(Y\) on \(X\) alone. Which group does it charge more, and by how much? Which group claims more?
In the population, the price from \(X\) alone is \(\tfrac12 X - \tfrac12\): women \(\tfrac12\) on average, men \(-\tfrac12\). Both groups claim \(0\).

Dashed: the price from \(X\) alone. Solid: the best price from \(X\) and \(A\).
A woman’s car scores \(X = 2.6\). What would her price have been, had she been a man?
| she, \(A = 1\) | had \(A\) been \(0\) | |
|---|---|---|
| \(U = X - 2A\) | \(0.6\) | \(0.6\) |
| \(X = 2A + U\) | \(2.6\) | \(0.6\) |
| price from \(X\) alone, \(\tfrac12 X - \tfrac12\) | \(0.8\) | \(-0.2\) |
| price from \(X\) and \(A\), \(X - 2A\) | \(0.6\) | \(0.6\) |
Abduction: find \(U\). Action: set \(A\). Prediction: recompute with the same \(U\).
Barocas, Hardt and Narayanan (2023), Fairness and Machine Learning: Limitations and Opportunities, MIT Press, https://fairmlbook.org/pdf/fairmlbook.pdf, chapter 5, Definition 5, page 123.
\(\hat Y(a)\): the prediction for the same person, with \(U\) as abducted, had \(A\) been \(a\).
\(\hat Y\) is counterfactually fair if, given what was observed, \(\hat Y(a)\) and \(\hat Y(a')\) have the same distribution for every \(a'\).
Lemma 1: a function of the non-descendants of \(A\) is counterfactually fair. Here, \(X - 2A = U\); any non-constant price from \(X\) alone is not.
Kusner, Loftus, Russell and Silva (2017), as above: Definition 5, page 3; Lemma 1, page 5; the quotation, page 4; prices from \(X\) alone, page 15.
The counterfactual driver keeps her \(U\). What justifies holding aggression fixed when gender changes? What evidence could support \(X = 2A + U\)?
Which of your answers are about how the world works vs which effects are acceptable?
Here \(do(A)\) has no effect on \(Y\). In the fit \(X - 2A\), the coefficient on \(A\) is \(-2\).
Which is a statement about intervening, and which about conditioning?

\[ M = \mu_0 + \alpha A + U_M, \qquad Y = \gamma A + \beta M + U_Y \]
\(M\) in thousands of miles a year, \(Y\) in hundreds of pounds a year. \(U_M\) and \(U_Y\) have mean \(0\) and are independent of each other and of \(A\).
Invented values: \(\mu_0 = 10\), \(\alpha = -4\), \(\beta = 0.25\), \(\gamma = -0.5\).
Gender affects claims directly and through mileage. For one person, how would you define the part of the effect that does not go through mileage?
\(Y(a, m)\): claims under \(do(A := a, M := m)\). \(\quad M(a)\): mileage under \(do(A := a)\).
Controlled: \(\text{CDE}(m) = E[Y(1, m) - Y(0, m)]\), everyone at mileage \(m\).
Natural: \(Y(1, M(0))\), a woman driving the miles she would have driven as a man.
The reading writes \(Y_{X := 1,\, Z := Z_{X := 0}}\) for \(Y(1, M(0))\), with \(X\) the treatment and \(Z\) the mediator: Barocas, Hardt and Narayanan (2023), page 128.
\[ \begin{aligned} \text{TE} &= E[Y(1, M(1)) - Y(0, M(0))] \\ &= \underbrace{E[Y(1, M(0)) - Y(0, M(0))]}_{\text{NDE}} \\ &\quad + \underbrace{E[Y(1, M(1)) - Y(1, M(0))]}_{\text{NIE}} \end{aligned} \]
Change gender first, keeping mileage where it would have been; then change mileage, keeping gender at its new value. In any model, the two steps add up to the TE.
\[ M(a) = \mu_0 + \alpha a + U_M, \qquad Y(a, m) = \gamma a + \beta m + U_Y \]
What are the CDE, the NDE, the NIE and the TE?
\[ \text{CDE}(m) = \text{NDE} = \gamma, \qquad \text{NIE} = \alpha\beta, \qquad \text{TE} = \gamma + \alpha\beta \]
With no interaction, the indirect effect is the product of the coefficients along the path.
\(Y(1, M(0))\) is not an observable outcome: the model supplies it.

Driving for work, \(Z\), adds miles, and adds claims beyond its miles. A woman with the same mileage as a man is more likely to drive for work.
So comparing women and men at equal mileage does not hold mileage fixed: it mixes in \(Z\). \(M\) is a collider on \(A \to M \leftarrow Z\).
\[ M = \mu_0 + \alpha A + U_M, \qquad Y = \gamma A + \beta M + U_Y \]
The insurer’s best premium before 2012: \(\;Y_{\text{full}} = \gamma A + \beta M\). These premiums are population quantities: they depend on the unknown \(\mu_0, \alpha, \beta, \gamma\), and so can your answers.
Write down a premium that removes the effect of gender along every path. Then one that removes it along \(A \to Y\) only, and keeps the path through mileage.
Hint: three steps, as for the red car driver. The first is abduction: find \(U_M\) from what you observe.
Abduction: \(U_M = M - \mu_0 - \alpha A\). \(\;\) Action: \(A := 0\). \(\;\) Prediction: \(M(0) = M - \alpha A\).
\[ Y_{\text{CF}} = \beta\,(M - \alpha A) = \beta\,(\mu_0 + U_M) \]
A function of \(U_M\) alone, so counterfactually fair. It takes \(A\) as an input.
“a decision is fair toward an individual if it coincides with the one that would have been taken in a counterfactual world in which the sensitive attribute along the unfair pathways were different”
Set \(A := 0\) on \(A \to Y\) only, and keep the observed mileage:
\[ Y_{\text{PS}} = \beta M \]
Chiappa (2019), “Path-Specific Counterfactual Fairness,” Proceedings of the AAAI Conference on Artificial Intelligence 33(01), 7801–7808, doi:10.1609/aaai.v33i01.33017801, page 7801.

All three collect the same average premium, £175 a policy: the level is a choice too.
Up to constants: \(\;Y_{\text{full}} - Y_{\text{PS}} = \gamma A, \quad Y_{\text{PS}} - Y_{\text{CF}} = \alpha\beta A\)
The two fair premiums differ by the contribution of the path someone judged fair.
Which of the three would you want your own premium computed from? Would you choose the same one if you did not know which group you were in?
Kusner et al., on Berkeley admissions (\(A\): female applicant; \(X\): course applied to): “the higher rejection among female than male applicants is acceptable, if the mechanism A → X is interpreted as a choice which is under the control of the applicant.”
Barocas, Hardt and Narayanan, on the same example: “This, however, is a substantive judgment that may not be a fact.”
Nabi and Shpitser: “The specific paths which correspond to discrimination are a domain specific issue.”
Kusner, Loftus, Russell and Silva (2017), supplementary material, page 15 of arXiv:1703.06856v3. Barocas, Hardt and Narayanan (2023), chapter 5, page 119. Nabi and Shpitser (2018), “Fair Inference on Outcomes,” Proceedings of the AAAI Conference on Artificial Intelligence 32(1), doi:10.1609/aaai.v32i1.11553, page 4 of arXiv:1705.10378v4.
\(Y = \gamma A + \beta M + \delta AM + U_Y\): each mile adds \(\beta\) for men and \(\beta + \delta\) for women. Subscripts give the level held fixed: \(\text{NDE}_a\) holds mileage at \(M(a)\), \(\text{NIE}_a\) holds \(A\) at \(a\).
\[ \begin{aligned} \text{NDE}_0 &= \gamma + \delta\mu_0, & \text{NIE}_1 &= \alpha(\beta + \delta) \\ \text{NDE}_1 &= \gamma + \delta(\mu_0 + \alpha), & \text{NIE}_0 &= \alpha\beta \end{aligned} \]
\(\text{NDE}_0 + \text{NIE}_1 = \text{NDE}_1 + \text{NIE}_0 = \text{TE} = \gamma + \alpha\beta + \delta(\mu_0 + \alpha)\). Mixed pairs miss by \(\alpha\delta\): \(\text{NDE}_0 + \text{NIE}_0 = \text{TE} - \alpha\delta\). The product \(\alpha\beta\) is \(\text{NIE}_0\) only.
“Moral luck occurs when an agent can be correctly treated as an object of moral judgment despite the fact that a significant aspect of what she is assessed for depends on factors beyond her control.” (Nelkin)
“The control principle says that we should only judge people to the extent that the factors we judge them on are under their control.” (ms4ds)
Nelkin, “Moral Luck,” The Stanford Encyclopedia of Philosophy, first published 26 January 2004, substantive revision 20 January 2025, https://plato.stanford.edu/entries/moral-luck/, opening sentence. Loftus, Modern Statistics 4 Data Science, section 3.4.2, https://joshualoftus.com/ms4ds/ethical-data-science.html#moral-luck.
The middle view of equality of opportunity: decision makers “must, to some degree, treat seemingly dissimilar people similarly when the causes of these dissimilarities are themselves problematic.”
“The middle view has particular purchase in the case of insurance, where we really might want insurers to ignore the additional costs that they are likely to face in setting the price of a policy for someone with an expensive pre-existing condition outside the person’s control” (Barocas, Hardt and Narayanan)
Barocas, Hardt and Narayanan (2023), chapter 4, pages 84 and 85.
Brute luck: risks a person did not choose. Option luck: how a chosen gamble turns out. Luck egalitarians often “deny that instances of differential option luck are unjust”: losing a gamble you chose to take is not, on this view, an injustice, while brute bad luck can be.
Barocas, Hardt and Narayanan: whether a person has control over an attribute “cannot be expressed in the statistical language of conditional probabilities and expectations.”
Lippert-Rasmussen, “Justice and Bad Luck,” The Stanford Encyclopedia of Philosophy, first published 20 June 2005, substantive revision 2 February 2023, https://plato.stanford.edu/entries/justice-bad-luck/, section 7. Barocas, Hardt and Narayanan (2023), chapter 4, page 92.

The Commission’s guidelines on Test-Achats: “The use of risk factors which might be correlated with gender therefore remains possible, as long as they are true risk factors in their own right.”
Is each path fair, when the mediator was itself shaped by the attribute? What makes the difference between the two?
European Commission (2012), as above, paragraph 17 and its footnote 3, page 4.
\[ Y = \gamma_1 A_1 + \gamma_2 A_2 + \delta A_1 A_2 + \dots \]
The effect of \(A_1\) is \(\gamma_1\) when \(A_2 = 0\) and \(\gamma_1 + \delta\) when \(A_2 = 1\). Leaving out \(\delta\) assumes the two are equal.
Yang, Loftus and Stoyanovich (2021), “Causal Intersectionality and Fair Ranking,” 2nd Symposium on Foundations of Responsible Computing (FORC 2021), LIPIcs 192, 7:1–7:20, doi:10.4230/LIPIcs.FORC.2021.7.


A fairness criterion is a permission: conditioning on \(V\), or letting \(A\) act through \(V\), accepts the disparity \(V\) already has. A criterion that allows later variables lets more history count as justified.
Loftus, “It’s About Time: Fairness and Temporal Depth,” NeurIPS 2023 Workshop on Algorithmic Fairness through the Lens of Time, https://neurips.cc/virtual/2023/78068.
| a path from \(A\) that is | for example | blocking it | how much control |
|---|---|---|---|
| injustice-transmitting | unequal schooling | reduces unfairness | circumstantial luck |
| justified mediation | own choices | is not needed | the person’s own |
| injustice-responsive | health need | is itself a harm | varies |
Control is not justice: luck is not always injustice, and a choice can be shaped by unjust circumstances. A criterion that allows later variables allows both.
Pick one mediator: college GPA, prior arrests, credit history. How much of it was in the person’s control? Would you condition on it?
Loftus (2023), as above. Kinds of moral luck: Nelkin, “Moral Luck,” as above, section 1. Health need: Obermeyer, Powers, Vogeli and Mullainathan, “Dissecting racial bias in an algorithm used to manage the health of populations,” Science 366(6464), 2019, 447-453, https://doi.org/10.1126/science.aax2342.