{
  "title": "Lighthouse plots: shining a light on differences",
  "date": "2026-10-13",
  "subtitle": "Why overlapping confidence intervals say little about a difference, and what to draw instead.",
  "summary": "Two confidence intervals can overlap heavily while the difference between them is overwhelming. Lighthouse plots draw that difference directly, which is super useful for marginal contrasts.",
  "authors": [
    "dominique-makowski"
  ],
  "category": "Methods",
  "draft": false,
  "content": [
    "<p><a href=\"https://github.com/jmgirard\">Jeffrey Girard</a>, the newest member of the <a href=\"https://github.com/easystats\">easystats</a> team (and the fastest issue-tackler), has just spent some time improving one of our most underrated features: <strong>lighthouse plots</strong>. If you've never heard of them, that is not really surprising: they originated in <a href=\"https://github.com/easystats/see/issues/12\">one of our GitHub issues</a>, a long time ago, when I was thinking of how to best convey condition differences in within-participant designs, but that idea never saw the <i>light</i> it deserved.</p>",
    "<h3>A puzzle</h3>",
    "<p>Here are two studies. In each, 30 participants got two scores: once in condition A, once in condition B. For each condition, the figure shows the distribution of the scores, and the mean with its 95% confidence interval.</p>",
    "<figure><img src=\"trap.png\" alt=\"Two identical-looking panels, Study 1 and Study 2, each showing the distribution of scores in conditions A and B with their means and heavily overlapping 95% confidence intervals.\"><figcaption>Two studies, two conditions. Each condition's mean and 95% CI, over the distribution of its scores.</figcaption></figure>",
    "<p>Is there a difference between A and B? The intervals overlap a lot: the mean of B even falls inside the interval of A. The tempting reading, and a very common one (researchers do it routinely when reading error bars; <a href=\"https://doi.org/10.1037/1082-989X.10.4.389\">Belia et al., 2005</a>), is that the difference is probably not significant, in either study. After all, the two figures look the same.</p>",
    "<p><b>But they are not the same.</b> In Study 1, the difference between A and B is about as conclusive as statistics gets (<em>t</em>(29) = 13.5, <em>p</em> &lt; .001). In Study 2, there is no evidence for it at all (<em>t</em>(29) = 1.0, <em>p</em> = .33).</p>",
    "<h3>The reveal</h3>",
    "<p>The difference between the two studies is not in the conditions. It is in the participants. Join each participant's two scores with a line, and the two studies stop looking alike:</p>",
    "<figure><img src=\"reveal.png\" alt=\"The same two panels with each participant's scores in A and B joined by a line. In Study 1 all lines go up, almost parallel. In Study 2 the lines go up and down and cross each other.\"><figcaption>The same figure, with each participant's score in A joined to their score in B.</figcaption></figure>",
    "<p>In Study 1, every single participant scores higher in B than in A. By a little (about three points), but all 30 of them, all in the same direction. In Study 2, the lines go everywhere: 19 participants go up, 11 go down, some of them by twenty points or more.</p>",
    "<p><img src=\"mindblown.gif\" alt=\"A man miming his mind being blown, his head dissolving into a starfield.\" style=\"float: right; width: 30%; margin: 0.3rem 0 0.7rem 1.2rem;\">Now the twist: the two figures do not just look the same, they <strong>are</strong> the same. Both studies contain exactly the same 30 scores in A, and exactly the same 30 scores in B. The only thing I changed for Study 2 is <em>who</em> got which score in B: I shuffled them across participants. So the means, the standard deviations, the distributions and the confidence intervals of each condition are identical to the last decimal. So is the average difference between A and B (2.88 points). What differs is how consistent that difference is from one participant to the next.</p>",
    "<p>As I often repeated in my career: <strong>the uncertainty around each estimate tells us little about the uncertainty around the <i>difference</i> between them.</strong> The interval around the mean of A answers the question <em>where is A?</em> Whether A and B differ is another question, and its answer depends on something a plot of the two conditions cannot show: how the two sets of scores relate to each other. In a repeated-measures design like this one, the overlap of the intervals tells you nothing. Even with two independent groups, where it is at least related to the answer, the rule is not \"overlap means non-significant\": two 95% intervals can overlap by as much as half an arm and the difference still be significant (<a href=\"https://doi.org/10.1037/0003-066X.60.2.170\">Cumming &amp; Finch, 2005</a>).</p>",
    "<p>Joining the dots works for two conditions and a few dozen participants. It stops working as soon as the means come from a model: adjusted for covariates, averaged over other factors, estimated within each level of a moderator. What we need then is a way to draw the uncertainty of the difference itself, right next to the means it is the difference of.</p>",
    "<h3>Enter the lighthouse</h3>",
    "<p>In April 2019, I opened <a href=\"https://github.com/easystats/see/issues/12\">an issue</a> on <em>see</em> about exactly this problem. Russ Lenth, the author of <a href=\"https://github.com/rvlenth/emmeans\">emmeans</a>, had laid out the existing ways of plotting pairwise comparisons, and none of them was satisfying: diagonal \"diffograms\" that are hard to label, comparison arrows that cannot always be drawn, and letter displays (means that share a letter do not differ) that reduce everything to a yes or a no.</p>",
    "<p>The idea was to keep the usual plot of the means with their intervals, and to add, for each pair of conditions, a <strong>lighthouse</strong>. It stands on one mean and casts a beam of light towards the other. When the beam arrives at the other condition, its width is the confidence interval of the difference, measured from the lighthouse's own height. So the beam always lands centred on the other mean, and its spread says how sure we are about where that mean is <em>relative to the lighthouse</em>, rather than where it is in absolute terms.</p>",
    "<p>Reading one comes down to the two edges of the beam. If both edges tilt the same way (both rising, or both falling), the difference is significant: every plausible value of the difference has the same sign. If one edge rises while the other falls, the beam straddles the horizontal, and a difference of zero is plausible. This is no accident of drawing: the tilt of each edge is set by one bound of the confidence interval of the difference.</p>",
    "<figure><img src=\"lighthouse.png\" alt=\"Lighthouse plots of the two studies. In Study 1 a thin grey beam runs from the mean of B to the mean of A, and both of its edges slope the same way. In Study 2 a wide grey beam from B has one edge sloping up and the other sloping down, on either side of a dashed horizontal line.\"><figcaption>Lighthouse plots of the two studies. In black, each condition's mean and 95% CI, identical in both panels. In grey, the beam: the 95% CI of the difference between B and A, cast from B. The dashed horizontal line, added here as a reading aid, makes it easier to see which way each edge tilts.</figcaption></figure>",
    "<p>In Study 1, the beam is a needle: both of its edges rise from A to B, because every participant agreed on the direction of the difference. In Study 2, it is a floodlight: one edge rises from A to B, the other falls. The intervals around the means are the same in both panels, as they should be, since they are the same means. Each interval now does one job, and neither pretends to answer the other's question.</p>",
    "<h3>Making one</h3>",
    "<p>A lighthouse plot is what <em>see</em> draws when you plot contrasts from <a href=\"https://easystats.github.io/modelbased/\">modelbased</a> together with the means they compare. Any model that <em>modelbased</em> supports will do. Here, a mixed model with a random intercept for each participant:</p>",
    "<pre><code class=\"language-r\">library(lme4)\nlibrary(modelbased)\nlibrary(see)\n\nmodel &lt;- lmer(Score ~ Condition + (1 | Participant), data = data)\n\nmeans &lt;- estimate_means(model, by = \"Condition\")\ncontrasts &lt;- estimate_contrasts(model, contrast = \"Condition\")\n\nplot(contrasts, means)</code></pre>",
    "<p>Thank you, Jeffrey, for reviving and robustifying lighthouse plots. Now is a good time to try them, and to <a href=\"https://github.com/easystats/see/issues\">tell us</a> if they need more fixing.</p>"
  ]
}
