Creating a regression in the Desmos Graphing Calculator is a way to find a mathematical expression (like a line or a curve) to model the relationship between two sets of data. Get started with the video on the right, then dive deeper with the resources below.
Getting Started
If you’d like, you can go through an interactive example from the help menu in the upper right of the graphing calculator to learn how to do a regression in Desmos.
To start, you’ll need some data in a table. You can either add a table and enter the data in the graphing calculator, or you can copy data from a spreadsheet and paste it into a blank expression line. In this example, let’s call our two sets of data \(x_{1}\) and \(y_{1}\).
You can use the zoom fit icon (looks like a magnifying glass with a + at the bottom of your table) to automatically adjust your graph settings window to best display your data.
Once you have your data in a table, enter the regression model you want to try. For a linear model, use \(y_{1}\)~ \(mx_{1} + b\) or for a quadratic model, try \(y_{1}\) ~ \(ax_{1}^{2}+bx_{1}+c\) and so on. Please note the ~ is usually to the left of the 1 on a keyboard or in the bottom row of the ABC part of the Desmos keypad.
Here you can see the values for the variables in your model as well as the correlation coefficient r, and an option to plot the residuals (the vertical distance between your data points and the model).
If you want to work with the line of best fit, you can add it to an expression line. Use the variables from the regression in expression lines for more exact values.
To explore, you can long-hold the colored circle in the table to make the points draggable. Then you can see how their values change the regression model!
To learn more about how Desmos does non-linear regressions and for some tips on how to best find a regression model, see our article on Non-Linear Regressions.