Assignment 2 · Question 3 · Log-linear models
Race and the death penalty: a three-way table
Radelet's 1981 study classified 326 defendants in Florida homicide cases by their race, the victim's race, and whether they were sentenced to death. The assignment tested four independence hypotheses with Poisson log-linear models, then re-tested those it could with logistic regression.
Log-linear models
Each cell count is Poisson with a log-mean built from main effects and the associations allowed by the hypothesis. For example, conditional independence of D and P given V, written [VD][VP], is
Test the hypotheses
Observed counts and fitted values
Large number: observed. Small: fitted under [VD][VP]. Shading: Pearson residual (teal = more than expected, terracotta = fewer).
| Defendant | Death penalty | No death penalty |
|---|---|---|
| White | 19fit 21.2 | 132fit 129.8 |
| Black | 11fit 8.8 | 52fit 54.2 |
| Defendant | Death penalty | No death penalty |
|---|---|---|
| White | 0fit 0.5 | 9fit 8.5 |
| Black | 6fit 5.5 | 97fit 97.5 |
Equivalent logistic regression (Q3b)
Treating the death penalty as the response for each defendant × victim group:
Proportion ~ Victim_Race
- Log-linear G²
- 1.8819
- Logistic deviance
- 1.8819
Same deviance and degrees of freedom (2): the logistic model is the log-linear model conditioned on the [DV] margin.
Analysis of deviance for [VD][VP]
Terms added sequentially, as in anova(model.11, test = "Chi").
| Term added | Df | Deviance | Resid. Df | Resid. Dev | Pr(>Chi) |
|---|---|---|---|---|---|
| NULL | 7 | 395.915 | |||
| Victim_Race | 1 | 32.456 | 6 | 363.459 | 1.2 × 10⁻⁸ *** |
| Defendant_Race | 1 | 0.110 | 5 | 363.349 | 0.7396 |
| Penalty | 1 | 225.419 | 4 | 137.929 | 5.9 × 10⁻⁵¹ *** |
| Victim_Race:Defendant_Race | 1 | 129.798 | 3 | 8.132 | 4.5 × 10⁻³⁰ *** |
| Victim_Race:Penalty | 1 | 6.250 | 2 | 1.882 | 0.0124 * |
What the 2023 analysis found
Comparing each model's residual deviance with a χ² distribution on its residual degrees of freedom:
- [D][V][P]All three factors are mutually independent. G² = 137.93 on 4 df, p = 7.8 × 10⁻²⁹ — rejected.
- [DV][P]The sentence is independent of both the defendant's and the victim's race. G² = 8.13 on 3 df, p = 0.0434 — rejected.
- [DV][DP]Given the defendant's race, the sentence is independent of the victim's race. G² = 7.91 on 2 df, p = 0.0192 — rejected.
- [VD][VP]Given the victim's race, the sentence is independent of the defendant's race. G² = 1.88 on 2 df, p = 0.3903 — not rejected.
- White defendants
- Black defendants
Labels: rate · sentenced/defendants. Whiskers: 95% Wilson intervals; the widest is for the nine white defendants with black victims, none of whom was sentenced to death.
Data: Radelet (1981), American Sociological Review 46, 918-927.
Added in 2026
An optional AI explanation
Explain this output with AI
Optional · your own keySends only the numeric summary below to the AI provider you choose, from your browser. The figures on this page are the reference; the AI only paraphrases them and can be wrong. How AI is used
What would be sent (4 numbers, no data rows)
- Model [D][V][P] (All three factors are mutually independent.): residual deviance (G2)
- 137.9 · on 4 df, goodness-of-fit p = 7.83e-29
- Model [DV][P] (The sentence is independent of both the defendant's and the victim's race.): residual deviance (G2)
- 8.132 · on 3 df, goodness-of-fit p = 0.0434
- Model [DV][DP] (Given the defendant's race, the sentence is independent of the victim's race.): residual deviance (G2)
- 7.91 · on 2 df, goodness-of-fit p = 0.0192
- Model [VD][VP] (Given the victim's race, the sentence is independent of the defendant's race.): residual deviance (G2)
- 1.882 · on 2 df, goodness-of-fit p = 0.39
Plus the model description, data source and: Goodness-of-fit p-values test each model against the saturated model; a small p-value means the model does not fit. Observational data: associations, not causal effects. Original analysis: 2023 coursework, refitted in 2026.
Exact request text (system prompt and message)
Sent verbatim with the model id, a response schema and your key (in a request header, never in the text).
System prompt
You explain the output of a statistical model to a reader who knows basic statistics. The output comes from a student's 2023 coursework, refitted for a portfolio site. Rules: - Use only the numbers and facts in the JSON summary you are given. Do not invent numbers, studies, data or context. - Quote numbers exactly as they appear in the summary (you may round them, but never compute new quantities). - Report uncertainty where the summary gives it (confidence intervals, standard errors, p-values) and do not treat p > 0.05 as proof of no effect. - Do not make causal claims unless the summary's context says the design supports them. - If something a reader would want is not in the summary, say so in "caveats" instead of guessing. - Plain English, Australian spelling, no marketing tone. Keep it short: a summary of two or three sentences and two to five points. - List every number you quote in "numbers_used", written exactly as in your text. Return only the JSON object described by the schema.
Message
Explain this model output.
Summary (JSON):
{
"title": "Defendant's race, victim's race and the death penalty (2 x 2 x 2 table)",
"model": "Poisson log-linear models for the cell counts; D = defendant's race, V = victim's race, P = death penalty",
"data": "Radelet (1981): homicide cases in 20 Florida counties, 1976-77",
"sample_size": "326 defendants",
"quantities": [
{
"label": "Model [D][V][P] (All three factors are mutually independent.): residual deviance (G2)",
"value": 137.9,
"note": "on 4 df, goodness-of-fit p = 7.83e-29"
},
{
"label": "Model [DV][P] (The sentence is independent of both the defendant's and the victim's race.): residual deviance (G2)",
"value": 8.132,
"note": "on 3 df, goodness-of-fit p = 0.0434"
},
{
"label": "Model [DV][DP] (Given the defendant's race, the sentence is independent of the victim's race.): residual deviance (G2)",
"value": 7.91,
"note": "on 2 df, goodness-of-fit p = 0.0192"
},
{
"label": "Model [VD][VP] (Given the victim's race, the sentence is independent of the defendant's race.): residual deviance (G2)",
"value": 1.882,
"note": "on 2 df, goodness-of-fit p = 0.39"
}
],
"context": [
"Goodness-of-fit p-values test each model against the saturated model; a small p-value means the model does not fit.",
"Observational data: associations, not causal effects.",
"Original analysis: 2023 coursework, refitted in 2026."
]
}