03 / 18 · t tests

Judge the mean-age difference with its interval

Independent-group mean differences and paired within-person differences have different units. Retain sample sizes, degrees of freedom and effect-size intervals.

Independent Welch comparison · 944 respondents · ANES96

 Judge the mean-age difference with its interval
This preview shows the existing 16:9 slide. The Pele map below did not generate the full statistical chart.

This companion diagram explains variables, design and tests. It is distinct from the statistical figure in the standalone presentation.

 Analysis relationship map
Mean age differs by expected vote; Welch df reflects unequal variances. Nonrandom groups.
Pele map source
flowchart LR
 A["Clinton expected"] --> D["Mean-age difference"]
 B["Dole expected"] --> D
 D --> W["Welch CI"]

This actual production branch takes computed estimates and places axes, lines, intervals and labels. Shared helpers and the complete file are available below.

SVG construction branch · JavaScript
if (v.kind === "t") {
  const rows = v.groups.map((g) => ({
    label: g.label,
    b: g.mean,
    lo: g.ci[0],
    hi: g.ci[1],
    key: g.key,
  }));
  a.push(
    ...forest(rows, {
      x: 0,
      y: 8,
      w: 1000,
      title: "A  Group means · pointwise 95% CI",
      unit: v.unit,
      rowH: 155,
      labelW: 260,
      sign: false,
      range:
        v.id === "paired"
          ? [1, 7]
          : [
              Math.min(...rows.map((r) => r.lo)) - 1,
              Math.max(...rows.map((r) => r.hi)) + 1,
            ],
    }),
    T(1100, 47, "B  Difference", 32, C.ink, 700),
    G(
      [
        T(1100, 145, signed(v.difference), 66, C.blue, 750),
        T(1100, 190, v.unit, 28, C.muted),
        T(1100, 258, "95% CI", 26, C.muted),
        T(1100, 305, "[" + v.ci.map((x) => fmt(x, 3)).join(", ") + "]", 36, C.ink, 650),
        T(1100, 377, "t(" + fmt(v.df, 1) + ") = " + fmt(v.stat, 2), 27),
        T(1100, 423, pv(v.p), 27),
        T(1100, 491, v.effectName + " = " + fmt(v.effect, 3), 30, C.teal, 700),
        T(
          1100,
          533,
          "effect CI [" + v.effectCI.map((x) => fmt(x, 3)).join(", ") + "]",
          24,
          C.muted,
        ),
      ],
      v.key,
    ),
    T(
      15,
      580,
      "Group n: " +
        v.groups.map((g) => g.n).join(" / ") +
        " · " +
        (v.id === "paired" ? "same 944 respondents" : "independent groups"),
      27,
      C.muted,
    ),
    ...(v.id === "paired"
      ? [T(15, 625, "Scale: 1 very liberal → 7 very conservative", 26, C.muted)]
      : []),
  );
  note =
    v.id === "paired"
      ? "DoleLR−ClinLR on the same 1–7 numeric-coded scale. Not a causal candidate effect."
      : "Mean age differs by expected vote; Welch df reflects unequal variances. Nonrandom groups.";
  source =
    v.id === "paired"
      ? 'flowchart LR\n R["Same respondent"] --> A["Clinton impression"]\n R --> B["Dole impression"]\n A --> D["Within-person difference"]\n B --> D'
      : 'flowchart LR\n A["Clinton expected"] --> D["Mean-age difference"]\n B["Dole expected"] --> D\n D --> W["Welch CI"]';
  map = { R: v.key, A: v.groups[0].key, B: v.groups[1].key, D: v.key, W: v.key };
}

This is preserved reference code, not an executable editor.

Data
Inspect the condition data first. Replace sample, units, coefficients and confidence intervals together. Do not combine different samples or measurement levels on one scale.
Graphic
Fit axis ranges, label widths, type and colors to the target region. Preserve whether intervals include zero and recheck legibility at the final size.
Interpretation
Diagram arrows and model paths are not causal evidence. Distinguish mean-response from prediction intervals, and pointwise from simultaneous intervals.