{
  "id": "statistical-interaction",
  "title": "Statistical Interaction",
  "lang": "en",
  "source_lang": "en",
  "summary": "Statistical interaction occurs when the association between a predictor and an outcome depends on another predictor, on a specified measurement or model scale.",
  "category": "mathematics",
  "subcategory": "probability-statistics",
  "type": "concept",
  "aliases": [
    "Interaction effect",
    "Interaction in statistics"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/statistical-interaction/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/statistical-interaction/",
      "json": "https://aiwiki.page/zh/statistical-interaction.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Statistical interaction is a feature of a statistical relationship in which the association between one predictor and an outcome varies with the value of another predictor. It represents a departure from a model in which predictors contribute separately on a specified scale. Interactions can involve categorical or continuous variables and more than two predictors; their presence does not, by itself, establish a causal mechanism. (online.stat.psu.edu)"
    },
    {
      "heading": "Definition and interpretation",
      "text": "For two predictors \\(X\\) and \\(Z\\), an additive model for the conditional mean of an outcome \\(Y\\) has the form\n\n\\[E(Y\\mid X=x,Z=z)=\\alpha+f(x)+g(z).\\]\n\nIn this model, the change associated with moving \\(X\\) from one value to another is the same at every value of \\(Z\\). Interaction occurs when this separability fails on the scale being modeled. Thus, interaction concerns how predictors jointly relate to an outcome, rather than merely whether both predictors are associated with it. (pmc.ncbi.nlm.nih.gov)\n\nFor binary predictors coded 0 and 1, let \\(\\mu_{xz}=E(Y\\mid X=x,Z=z)\\). Additive interaction is measured by the contrast\n\n\\[I=\\mu_{11}-\\mu_{10}-\\mu_{01}+\\mu_{00}.\\]\n\nEquivalently, \\(I\\) compares the difference associated with \\(X\\) when \\(Z=1\\) with the corresponding difference when \\(Z=0\\). No additive interaction means \\(I=0\\). (pmc.ncbi.nlm.nih.gov)\n\nAs a constructed example, suppose the four means are:\n\n | \\(Z=0\\) | \\(Z=1\\)\n\\(X=0\\) | 10 | 15\n\\(X=1\\) | 14 | 25\n\nThe difference associated with \\(X\\) is 4 when \\(Z=0\\), but 10 when \\(Z=1\\). The interaction contrast is therefore \\(25-14-15+10=6\\). This describes a pattern in the means; a causal interpretation requires additional assumptions."
    },
    {
      "heading": "Interaction in regression",
      "text": "A common interaction model in linear regression is\n\n\\[E(Y\\mid X,Z) =\\beta_0+\\beta_1X+\\beta_2Z+\\beta_3XZ.\\]\n\nThe product \\(XZ\\) is an interaction term. For continuous \\(X\\), the conditional slope is\n\n\\[\\frac{\\partial E(Y\\mid X,Z)}{\\partial X} =\\beta_1+\\beta_3Z.\\]\n\nThus, \\(\\beta_3\\) describes how the slope for \\(X\\) changes as \\(Z\\) increases. If \\(Z\\) is binary, the slopes are \\(\\beta_1\\) in the reference group and \\(\\beta_1+\\beta_3\\) in the other group. With both predictors binary, \\(\\beta_3\\) equals the interaction contrast defined above. (online.stat.psu.edu)\n\nThe coefficients \\(\\beta_1\\) and \\(\\beta_2\\), often called main-effect coefficients, are conditional: they describe associations when the other predictor equals zero. They are not generally overall average effects. Subtracting a reference value from a predictor changes where these coefficients are evaluated; algebraically, such centering leaves fitted values unchanged when the full model includes both lower-order terms and the product term. (online.stat.psu.edu)\n\nThe usual hierarchy principle retains the constituent lower-order terms when an interaction is included, even if those terms are not individually statistically significant. For categorical predictors with several levels, interaction is generally represented by multiple coefficients rather than one product coefficient. (online.stat.psu.edu)"
    },
    {
      "heading": "Factorial experiments and analysis of variance",
      "text": "In a factorial design, combinations of factor levels are studied together, allowing interactions to be estimated. A two-factor analysis of variance model separates factor main effects from an interaction component. A main effect summarizes differences averaged across levels of another factor, whereas interaction describes variation in those differences across levels. (online.stat.psu.edu)\n\nAn interaction plot displays outcome means against one factor, with separate lines for levels of another. Parallel population-mean lines indicate no additive interaction for the displayed contrasts; nonparallel lines indicate interaction. Lines need not cross for an interaction to exist, and nonparallel sample estimates require an assessment of uncertainty. (online.stat.psu.edu)\n\nHigher-order interactions are also possible. A three-way interaction means that a two-way interaction changes across levels of a third predictor. Models for three-factor experiments can contain all three main effects, three two-way product terms, and a three-way product term. (itl.nist.gov)"
    },
    {
      "heading": "Dependence on scale",
      "text": "Interaction is scale-dependent. An additive relationship on one outcome scale may become nonadditive after transformation. Consequently, a statement that interaction is absent is incomplete unless it identifies the relevant scale or model. (pmc.ncbi.nlm.nih.gov)\n\nFor binary outcomes, let \\(p_{xz}\\) denote the outcome probability for each combination of two binary predictors:\n\n- No additive interaction in probabilities means\n\n\\[p_{11}-p_{10}-p_{01}+p_{00}=0.\\]\n- No multiplicative interaction in probabilities, for positive probabilities, means\n\n\\[\\frac{p_{11}p_{00}}{p_{10}p_{01}}=1.\\]\n\nThese conditions are different and need not hold together. (pmc.ncbi.nlm.nih.gov)\n\nIn logistic regression, a product term represents interaction on the log-odds scale, or equivalently departure from multiplicativity of odds ratios. Its absence does not imply absence of interaction in outcome probabilities or risk differences. The modeled scale therefore determines the interpretation of the interaction coefficient. (pmc.ncbi.nlm.nih.gov)"
    },
    {
      "heading": "Statistical inference and causal interpretation",
      "text": "Hypothesis tests for interaction assess whether an interaction coefficient or a set of interaction contrasts differs from zero. In multi-level categorical models, an overall interaction test may involve several coefficients. Estimates and confidence intervals describe the magnitude and uncertainty of the interaction more directly than a significance label alone. (online.stat.psu.edu)\n\nA statistically significant association in one subgroup and a nonsignificant association in another do not establish interaction. The relevant question is whether the subgroup associations differ, which requires evaluating their difference rather than comparing their separate significance labels. (doi.org)\n\nStatistical interaction is distinct from mechanistic interaction. Observed nonadditivity can describe an association without showing that two factors jointly produce an outcome through a particular mechanism. Causal inference about joint effects additionally depends on study design, identification assumptions, and adequate control of confounding. Some epidemiological frameworks distinguish effect modification, concerning variation in one exposure’s causal effect across strata, from causal interaction, concerning the joint causal effects of two exposures. (pmc.ncbi.nlm.nih.gov)"
    }
  ],
  "links": [
    "conditional-expectation",
    "linear-regression",
    "factorial-design",
    "analysis-of-variance",
    "logistic-regression",
    "odds-ratio",
    "statistical-hypothesis-testing",
    "confidence-interval",
    "causal-inference",
    "confounding"
  ],
  "sources": [
    {
      "title": "6.2.3. Interaction Effects",
      "url": "https://www.itl.nist.gov/div898/handbook/pri/section6/pri623.htm"
    },
    {
      "title": "6.1.5. Estimate Main and Interaction Effects",
      "url": "https://www.itl.nist.gov/div898/handbook/pri/section6/pri615.htm"
    },
    {
      "title": "The Meaning of Interaction",
      "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC3025890/"
    },
    {
      "title": "Measuring additive interaction using odds ratios",
      "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC1475799/"
    },
    {
      "title": "Recommendations for presenting analyses of effect modification and interaction",
      "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC3324457/"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}