← All articles

The 30-second regression pipeline with L1, L2, and Y-Vars

Stop typing data points one at a time into LinReg. Enter them once into L1/L2, then run any regression over the same dataset with a single keystroke.

Almost every AP Stats regression question follows the same keystroke rhythm. Learn it once and save hours.

Step 1: Clear the lists

stat4:ClrList2nd + 1 (that's L1), 2nd + 2 (L2), press enter. Clean slate.

Step 2: Enter the data

stat1:Edit…. L1 is the first column, L2 is the second. Type each x-value in L1, arrow down. Then arrow right, go to the top of L2, type each y-value. enter moves you down.

For summary statistics of a single variable, entering just L1 is enough.

Step 3: Run the regression

stat → arrow right to CALC. You get a menu of every regression the calculator knows:

  • 4:LinReg(ax+b) — linear
  • 5:QuadReg — quadratic
  • 6:CubicReg — cubic
  • 8:LnReg — logarithmic (y = a + b·ln(x))
  • 9:ExpReg — exponential (y = a·b^x)
  • 0:PwrReg — power (y = a·x^b)
  • A:Logistic — logistic
  • B:SinReg — sinusoidal

Pick one. If the defaults work, press enter — the calculator assumes L1 for x and L2 for y.

Step 4: Store the equation into Y1

Before hitting the final enter, there's a field labeled Store RegEQ. Press vars → arrow right to Y-VARS1:Function…Y1. Press enter. Now press enter again to run.

The regression equation is saved into Y1 automatically. Combine with Table Ask mode to query it at any x.

Step 5: Check the fit

The output shows a, b, (and c, d for higher-order fits), plus r and if diagnostics are on.

Enable diagnostics once so r and show: 2nd + 0 (CATALOG) → scroll to DiagnosticOnenter + enter. Calculator remembers the setting.

Residuals in one keystroke

After any regression, the list RESID is automatically populated. Access it via 2nd + statRESID. Assign it to a new list for a residual plot:

  • stat1:Edit → arrow to the top of L3 → press 2nd + statRESIDenter.
  • Then 2nd + y= (STAT PLOT) → Plot1OnXlist: L1, Ylist: L3 → scatter plot.

If residuals show a pattern, your chosen regression family is wrong.

One gotcha

LinReg(ax+b) and LinReg(a+bx) exist side-by-side in the CALC menu and produce the same fit with swapped a and b labels. AP questions usually want a+bx form (slope = b). Match whichever form the question uses.