ChatGPT regression analysis: interpret an interaction one group at a time

When a regression contains an interaction, give ChatGPT the full equation and category coding before asking what a coefficient means. In ŷ = 10 + 2x + 5g − xg, with group g coded 0 or 1, the slope for x is 2 in group 0 and 1 in group 1. Reading the coefficient 2 as the slope for everyone drops the interaction term.

You can check that interpretation by substituting the group codes into the equation. No refitting or new dataset is required to explain the supplied coefficients.

Reduce the equation to two lines

This original fictional model predicts a task score in points from practice hours x and group g. Assume the model uses an ordinary linear response scale, the coefficients are already supplied, and x ranges from 0 to 4 in each group. The coefficients are illustrative, not estimates from a real study.

For g=0, both terms containing g vanish: ŷ = 10 + 2x. For g=1, combine like terms: ŷ = 15 + x.

Group code Intercept at x=0 Slope, points per hour Prediction at x=2 Prediction at x=4
0 10 2 14 18
1 15 1 17 19

The predicted group-1 minus group-0 contrast is 5−x. It equals 3 points at two hours and 1 point at four hours. The coefficient 5 is that group contrast at x=0, not a constant difference at every practice duration.

UCLA's regression-interactions seminar, checked October 24, 2026, explains conditional slopes and interpretation of continuous-by-categorical interactions. The table above is a separate authored example calculated by substitution.

Copy the equation and coding into the prompt

Explain this supplied linear regression model; do not fit new data.
Response: task score, in points, on an ordinary linear scale.
x: practice hours, observed from 0 through 4 in both groups.
g: 0=reference group, 1=comparison group.
Equation: predicted_score = 10 + 2*x + 5*g - x*g.

Substitute each group code and simplify to intercept plus slope*x.
Compute predictions at x=2 and x=4. Derive the group1-minus-group0
contrast as a function of x. Explain exactly where each lower-order
coefficient applies. Keep units and category coding in the answer.
Do not invent standard errors, p-values, causal effects or fitted data.
Flag predictions outside the supplied observed range.
Actual model output and covariance information: [PASTE IF AVAILABLE].

OpenAI's prompting guidance recommends clear context and boundaries. If your software uses a different reference group, effect coding or a transformed response, paste that specification. The same-looking coefficient names may then represent different quantities.

Keep algebra separate from inference

The group slopes differ by −1 point per hour in this supplied equation. Establishing whether that difference is statistically distinguishable from zero requires the actual fitted model and its uncertainty estimates. Comparing the significance labels of two separate slopes does not directly test their difference.

The fitted lines would cross at x=5, but that lies outside the stated 0–4 range. Treating that crossing as an observed reversal would add evidence the fixture does not contain. Likewise, a predicted association between hours and score does not establish that assigning another hour causes that change.

The time-series guide handles the separate question of which observations were available when a forecast was issued. For coefficient interpretation, retain the model equation, response scale, variable units, category coding and supported predictor range alongside the final explanation.

Keep reading