Skip to main content

    Desmos for the SAT · Technique 21 of 23

    Fit a Line or Curve to a Table of Values

    Type the table, click Add Regression, and read the equation Desmos prints. For a curve, write the model yourself with a tilde.

    SolvesWhich equation represents the table?Which model fits this table?Exponential from a tablePredict from a fitted model

    Watch the lesson

    The whole move worked on one real SAT question, narrated.

    0:00 / 0:00
    A table typed from the question, one click on Add Regression, and the equation that comes back.

    A table of x-values and y-values, four equations underneath, and the question asks which one the table describes. On paper that is the slope formula, then the intercept, then a rearrangement into whatever form the choices use, and each of those steps has a sign in it that can go the wrong way. In Desmos it is a table and one click.

    Type the word table into a blank expression line and Desmos builds the two columns for you, headed x1 and y1. Fill in the data, click the Add Regression icon at the left of the table, and a Linear Regression block appears under it with the equation already written out in numbers, not letters. Underneath that Desmos prints two statistics, R2 and r, which say how close the fit sits to the points.

    The thing worth knowing about SAT tables is that most of them are not scattered at all. The four rows sit exactly on one line, or exactly on one curve, so the fit is not an approximation of the answer. It is the answer, and R2 comes back at 1 to tell you so. That makes regression a second route through questions you were taught to solve algebraically, and on a table it is usually the faster one.

    For anything that is not a line, the Linear Regression label is a dropdown: Quadratic, Cubic, Quartic, Exponential, Logarithmic, Power, Logistic and Sinusoidal are all in there. You can also write the model yourself on a new line with a tilde (~) where the equals sign goes, which is the route to know, because it lists the fitted constants by name under REGRESSION PARAMETERS and later lines can use them.

    Two related lessons are worth knowing about. That same tilde also solves for unknown CONSTANTS in an algebraic identity, which turns completing-the-square questions into one typed line; that is Use Regression to Find an Unknown Constant. And if the question has already written the line of best fit for you and wants to know how far one real point misses it, nothing needs fitting: go to Find the Residual for a Data Point.

    Nova

    SAT tables are almost never scattered data. The four rows sit exactly on one line or one curve, which means a regression does not estimate the answer, it returns it. So a question you were taught to answer with the slope formula and a rearrangement becomes a table, one click, and an equation you read off the screen.

    Now you try it

    The rest of the page takes that move slowly. First how it compares with doing the algebra, then the steps in order, then a real SAT question with a live Desmos calculator to try it in.

    The algebra way vs the Desmos way

    This technique sidesteps the slope formula, then the intercept, then rearranging into the form the choices use.

    The question

    A table of four pairs: (2,8)(2, 8), (4,13)(4, 13), (6,18)(6, 18), (10,28)(10, 28)

    Which of the four equations represents the relationship?

    The algebra way

    • Pick two rows and run the slope formula: (13 - 8) / (4 - 2), which is 5/2.
    • Put one row back in for the intercept: 8 = 2.5(2) + b, so b = 3.
    • The choices are in standard form, so rearrange y = 2.5x + 3 into 2y - 5x = 6.
    • Then test a second row anyway, because every choice on offer agrees with the first one.

    The Desmos way

    • Type table and put the four pairs in it.
    • Click Add Regression and read the y = 2.5x + 3 Desmos prints.
    • Type 2y_1 - 5x_1 and watch all four rows come back the same.

    The payoff: The by-hand route has a subtraction whose order sets the sign, an intercept to solve for, and a rearrangement, and none of the three tells you when it has gone wrong. The fit hands you the line, and one more typed line checks your chosen form against every row of the table at once.

    Quick reference

    What the table looks like, and what to run on it

    The table in front of youWhat to runWhat Desmos prints
    Rows that sit exactly on a lineAdd RegressionThe equation in numbers, with R2=1R^2=1 and r at 11 or −1-1
    Real data, near a line but not on itAdd RegressionThe equation, with R2R^2 and r below 1 and r carrying the direction
    Rows that multiply by a constant factorExponential Regression, or y_1 ~ ab^x_1The fitted a and b, and R2R^2, with no r
    A model whose constants you want to reusethe tilde model, typed yourselfREGRESSION PARAMETERS, which later lines can use by name
    A shape the dropdown does not listy_1 ~ your own modelOne fitted value per letter you left unknown

    Step by step

    The whole move, all 7 steps
    1. Type table into an empty expression line. Desmos turns it into a two-column table, headed x_1 and y_1, with the cursor in the first cell.
    2. Type the x-values down the first column and the matching y-values down the second. The points plot as you go.
    3. Click the Add Regression icon at the left of the table. Desmos fits a line and prints its equation with the numbers filled in, plus R2 and r.
    4. Compare that equation against the choices. If the choices are written in another form, one multiplication or one rearrangement of the line Desmos gave you gets there.
    5. Need a curve instead? Open the Linear Regression dropdown and pick the model, or write your own on a new line with a tilde in place of the equals sign.
    6. Type y1 and x1 with no underscore; Desmos closes the subscript itself. Typed with the underscore, y1~mx1+b puts the whole model inside the subscript and Desmos reports that subscripts may only contain letters and digits. If that happens, press the right arrow before the tilde.
    7. Read the constants Desmos lists under REGRESSION PARAMETERS, and use those letters on later lines when the question wants a prediction rather than an equation.

    The question

    The table shows four pairs of values for x and y: (2,8)(2, 8), (4,13)(4, 13), (6,18)(6, 18), and (10,28)(10, 28).

    Which equation represents the relationship between x and y shown in the table?

    1. A5y−2x=365y-2x=36
    2. B2y−5x=62y-5x=6
    3. C2y+5x=262y+5x=26
    4. D5y+2x=445y+2x=44

    Step 1 of 6

    Type the word table into an empty expression line. Desmos turns it into a two-column table, already headed x1 and y1, with the cursor in the first cell.

    In the calculator: table

    You do not have to hunt through the + menu. Typing table into the line does it, which is one less thing to find under time pressure.

    Syntax: Add Regression fits a line in one click and prints the equation with its numbers in place. For anything else, write the model yourself and swap the equals sign for a tilde: y1 ~ abx1 for an exponential, y1 ~ a x12 + b x1 + c for a parabola, using the table's own column names. A subscript holds on to whatever you type next, so press the right arrow to leave it before a tilde and again before an exponent. Desmos lists what it fitted under REGRESSION PARAMETERS.

    Now try it on a real SAT question

    Head or scratch paper. This is the shape people picture when they hear "line of best fit", and it still does not want a fit. The question asks for a description, and the scores rise at every extra hour, so the second column answers it. Run the regression once anyway, to see what the statistics look like on real data that is close to a line without sitting on it.

    A researcher recorded how many hours each of five students spent studying and the score each one earned: (2,65)(2, 65), (3,70)(3, 70), (4,78)(4, 78), (5,82)(5, 82), and (6,88)(6, 88).

    Which of the following best describes the relationship between hours studied and test scores?

    Pick an answer to get instant coaching from Nova.

    Stuck?
    Your turnstarts empty

    Set this question up yourself, then read the answer straight off the graph.

    Worked it out on scratch paper? Type it into Desmos anyway and check. It takes a couple of seconds and it catches the slip you cannot spot by re-reading your own work.

    Straight from Desmos

    The Desmos trap: when to close the calculator

    • If the question only asks whether a trend is positive, negative, or roughly linear, and wants no number at all, reading the second column settles it faster than building anything.
    • If the question already gives you the equation of the line or curve of best fit, there is nothing to fit. When it then names one real data point and asks how far off it is, that is a residual, and it has its own lesson: Find the Residual for a Data Point.
    • Two points is a fit, but a small one. Any line through two points is exact, so R2 comes back at 1 every time and tells you nothing about the data. Read the equation and ignore the statistics there.

    If the calculator does something you did not expect

    • Type y1, not y_1. With the underscore the cursor stays inside the subscript and the tilde lands there; Desmos answers with "Subscripts may only contain letters and digits" and fits nothing.
    • Write the model against the table's own column names. A tilde model with a plain x in it stops with "x may not be used as a regression parameter", so nothing is fitted until the x becomes x_1.
    • Pressing Enter after the last value in a column can hand you a row you did not type. When the values already there share a constant difference, Desmos carries the pattern on: after -4, 1, 6, 11 it adds a 16. Click away from the table instead, or delete the extra row before you fit.
    • The Add Regression button prints a finished equation, not named constants, so -b/m on the next line has no m or b to work with and Desmos offers you sliders instead. When you want to compute with the slope and intercept afterwards, type the model yourself as y_1 ~ mx_1 + b, which lists them under REGRESSION PARAMETERS.
    • Numbers printed with a comma, like 1,536, have to go into the cell without it. The cell keeps the comma exactly as typed, and a fit run against that column answers with "Sorry, I don't understand this" rather than a set of constants.

    Nova

    Regression is your move when you want an equation or a constant out of a table. If the question has already written the model for you, or only wants to know which way the trend goes, a table is work with nothing at the end of it.

    All Desmos techniques

    Put this move into real practice

    "Fit a Line or Curve to a Table of Values" 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.

    Fit a Line or Curve to a Table in Desmos | SAT Prep Quest