Skip to main content

    Desmos for the SAT · Technique 9 of 15

    Fit a Line or Curve to Data (Regression)

    Feed Desmos the data points, let it hand you the equation.

    SolvesLine of best fitCurve of best fitPredict from data

    When a question drops a table of data points on you and asks for the equation of the line (or curve) of best fit, Desmos can fit it in a couple of keystrokes.

    Enter the data into a table, then type the model you want using a tilde (~) instead of an equals sign. Desmos runs the regression and reports back the fitted values of every parameter, like m and b, right in the expression list.

    That same tilde has a second use worth knowing, the Tilde Trick for finding an unknown CONSTANT in an equation. Say a question claims (x + a)2 = x2 + 10x + k and wants a and k. Type it with a tilde swapped in for the equals sign, keeping the constants as letters: (x1 + a)2 ~ x12 + 10x1 + k. Then add one mandatory data line, x1 = 1, 2, 3, because without that list of x-values the tilde just returns an error. Desmos solves for a and k. Think of it as a cousin of the check-equivalence move: same idea of forcing two sides to agree, except here Desmos hands you the letters that make them agree.

    When a table shows up and the question is which model fits best, lean on R2. Fit a line and a parabola to the same data, y1 ~ m x1 + b and y1 ~ a x12 + b x1 + c, then compare the R2 value Desmos prints under each: the one closest to 1.0 is the better fit. Confirm it with two fast checks, that the fitted curve passes through the middle of the point cloud and that the residuals stay small (residuals are the next technique in this series).

    Nova

    Line-of-best-fit questions look scary because you can't actually compute a real regression by hand. Good news: Desmos does the whole thing for you. You type the shape of the model, it hands back the exact slope and intercept, and a 'find the equation' problem turns into reading a number off the screen.

    The algebra way vs the Desmos way

    This technique sidesteps computing a line of best fit by hand (which you cannot really do).

    The algebra way

    • A true least-squares regression is not hand-computable in test time.
    • The best you can do by hand is eyeball a line through the cloud of points.
    • Then you guess a slope and intercept off that eyeballed line, and hope the answer choices are far enough apart.

    The Desmos way

    • Enter the data as two lists, x_1 and y_1.
    • Type the model with a tilde: y_1 ~ m x_1 + b.
    • Read the fitted m near 3.8 and b near -5 that Desmos reports.

    The payoff: Desmos gives you the actual best fit; eyeballing a line by hand only gives you a guess.

    See the move, live

    That same example, already loaded in the real calculator, the one built into Bluebook on test day. Try the move yourself.

    Desmos graphing calculator, livepre-loaded

    Before you start: set up Desmos

    • Use subscripts for tables

      When building a table for a regression, name the columns x_1 and y_1 so the regression binds to the right data.

    • Use Zoom Fit to frame your data

      After you type data into a table, the points can land off the default screen. Click the small magnifying-glass icon next to the table to Zoom Fit, and Desmos snaps the view to frame every point at once.

    • Widen the axis bounds when the graph looks empty

      Desmos opens on a small window from -10 to 10 on both axes. If a crossing, vertex, or data point sits outside that box, the graph can look empty even when an answer exists. Open the wrench icon and widen the x and y bounds until the point you need comes into view.

    Step by step

    Nova

    Follow along one step at a time, hit Next as you go. I'll flag the spots where people slip.

    Step 1 of 4

    Click the "+" and add a table, then enter the x-values in the first column and the y-values in the second.

    Desmos showing the six data points (0, -5), (2, 3), (4, 9), (6, 19), (8, 25), (10, 33) plotted as a scatter on the coordinate plane.

    Syntax: Use the tilde: y1 ~ m x1 + b for a line, y1 ~ a x12 + b x1 + c for a parabola. Read the fitted m, b (or a, b, c) Desmos reports.

    Now try it on a real SAT question

    The table below shows four data points that fall in a linear pattern: (1, 5), (2, 8), (3, 11), (4, 14).

    Using the line of best fit for the data, y = mx + b, what is the value of m?

    Pick an answer to get instant coaching from Nova.

    Nova

    Data lined up this clean, don't eyeball the pattern. Type the tilde model and let Desmos hand you m and b in one line.

    Your turn, blank calculatornothing loaded

    Set it up yourself in the blank calculator, then read the answer straight off the graph. Muscle memory beats watching.

    Watch it

    Enter the data, type the model with a tilde, read the fitted slope and intercept.

    The Desmos trap: when to close the calculator

    • If the question already gives you the equation of the line or curve of best fit, you do not need to fit anything, just read it.
    • If the question only asks whether the trend is positive, negative, or roughly linear, and does not need a number, eyeballing the description is faster than running a full regression.
    • Watch the subscripts and the case: x1 is not the same as X1, and typing a plain x instead of x1 makes the regression ignore your table entirely, since your data lives under the x1 name.

    Nova

    One gut-check though: if the question hands you the equation already, or just asks whether the trend goes up or down, don't bother setting up a table. Regression is your move when they want an actual number for the fit, not for every data question.

    All Desmos techniques

    Put this move into real practice

    "Fit a Line or Curve to Data (Regression)" shows up all over the real SAT. SAT Prep Quest drills the skill at your level, so reaching for it becomes automatic by test day.

    Practice free

    SAT is a registered trademark of the College Board, which was not involved in producing, and does not endorse, this product. Score estimates are Learner Labs projections, not official College Board scores.

    Run a Regression on Data Points in Desmos | SAT Prep Quest