Regressions

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

Calculator help menu with tours called out. Screenshot.

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.

Graphing Calculator with table containing ordered pairs. \left(1.7, 10.4\right), \left(3, 12.1\right), \left(4.7, 13.7\right), \left(6, 15\right), \left(7.5, 16.3\right), \left(9, 17.3\right), \left(10.5, 18\right), \left(11.9, 18.6\right), \left(13.3, 19\right), \left(14.1, 19.2\right). Points plotted on coordinate plane. Screenshot.

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}\).

Graphing Calculator with table containing ordered pairs. \left(7.5, 16.3\right), \left(9, 17.3\right), \left(10.5, 18\right), \left(11.9, 18.6\right), \left(13.3, 19\right), \left(14.1, 19.2\right). Zoom Fit icon called out. Screenshot.

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.

Graphing Calculator with table containing ordered pairs. \left(1.7, 10.4\right), \left(3, 12.1\right), \left(4.7, 13.7\right), \left(6, 15\right), \left(7.5, 16.3\right), \left(9, 17.3\right), \left(10.5, 18\right), \left(11.9, 18.6\right), \left(13.3, 19\right), \left(14.1, 19.2\right). Regression model \(y_{1} ~ ax_{1}^{2}+bx_{1}+c\) has values \(r^{2}=0.9529\), \(r=0.9761\), \(m = 0.694246\), \(b=10.288\). Points plotted on coordinate plane. Regression line plotted on coordinate plane. Screenshot.

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.

Expression line has the Regression model \(y_{1} ~ ax_{1}^{2}+bx_{1}+c\) has values \(r^{2}=0.9529\), \(r=0.9761\), \(m = 0.698113\), \(b=10.2464\). Next expression line has \(y=mx+b\), next expression line contains m with a value of 0.698112981991.  Next expression line contains b with a value of 10.2464169371. Points plotted on coordinate plane. Regression line plotted on coordinate plane. Screenshot.

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.

Graphing Calculator with table containing ordered pairs. \left(1.7, 10.4\right), \left(3, 12.1\right), \left(4.7, 13.7\right), \left(6, 15\right), \left(7.5, 16.3\right), \left(9, 17.3\right), \left(10.5, 18\right), \left(11.9, 18.6\right), \left(13.3, 19\right), \left(14.1, 19.2\right). Regression model \(y_{1} ~ ax_{1}^{2}+bx_{1}+c\) has values that adjust as a moveable points is dragged.

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.

Was this article helpful?
962 out of 1679 found this helpful