Graphing buggy lab in Desmos
Goal
After reading this page, you will be able to graph data from your Buggy Lab in Desmos, and have Desmos calculate the slope and y-intercept of each data set.
Procedures
Don’t forget that Desmos does not automatically save your work; be sure to log in to your account and save your file every few minutes.
Entering data for your first buggy in Desmos
- Copy your data from your Sheets file, other spreadsheet, or paper data table.
- Add a folder in the first row of Desmos. Name it either Red buggy or Blue buggy (depending on which data you want to work with first).
- In the second row on the left side, paste your data–it should appear as a table.
- Click and hold on the circle next to the y1 table header, then make it match the color of this buggy.
- Desmos should now look something like this:

Adding a best-fit line
- In the Desmos row below your data table (not in the last line of the table!), type the following formula:
- y1~mx1+b
- Click and hold on the circle for the row you just added to make it match your buggy color.
- Your graph should now look something like this:

Labeling your graph
- Click the gear wrench in the upper left corner of the graph to open the options menu.
- Add a label for your x-axis — Time (s) — and for your x-axis — Position (m).
- We want all students to graph their data with the same scale, so set your axes as follows:
- x-axis: -1 to 12
- y-axis: -30 to 30
- Your graph should now look something like this:

Adding data for your second buggy
Repeat the steps above, but this time enter data for your other buggy. Note the following before you start:
- Make sure the color of your line and data points match the color of your buggy.
- For the second set of data, the data table should have labels x2 and y2. You will need to write your new equation as:
- y2~nx2+c
- Note that the x and y numbers are different (2 instead of 1), and in place of m and b we used n and c (since we already used m and b in the first equation).
- Your graph should now look like this:

What data you should have
- For each set of data, you should have the slope and y-intercept.
- For each set, you will also have r2 and r values: These are statistical calculations; at this point you just need to know that they help you tell how close your data points match the values from the equation. The closer to 1 you get, the better the equation fits your data!
One more (optional) data analysis step
In addition to the r2 and r values, Desmos will create and plot the residuals. Residuals are calculated by finding the difference between the y-value of a row in your data table with the y-value that would come from plugging the x-value into your equation.
- Click the plot button below the residuals word (next to e2).
- Change the color of your residuals plot so it matches your buggy color.
- Zoom in on the a-axis so you can see the residual points close up.
- Set the y min and max to -0.1 and 0.1
Your graph should now look something like this:

The value of looking closely at the residuals is to see if they show some kind of pattern. Here are two examples:
- If they form a relatively constant curve, your equation may need to be re-written to include an exponent.
- You may also notice some data points that look way off (can you see the low red one at around y=-0.06 above?). If you get too many off the zero y-value, your r2 value will probably be not close to 1.
At this point, record any observations you have of your residuals, then re-set your graph so the y-axis range is -30 to 30.