Linear and Quadratic Regression

Hi - I am working on an activity where students have to choose between linear and quadratic regression. I would like to provide a lesson score at the end of the activity. How can I assign a 1 on the last slide if the correct regression equation is chosen and a 0 if it is not?

If it’s a multiple choice and the 3rd choice is correct:

score = when yourMCName.isSelected(3) 1 otherwise 0

No. It is not multiple choice. Here is the activity. Wastewater Collection System • Activity Builder by Desmos

I was trying to check this out, but I’m getting a glitch in the code where it thinks the graph is a table. He found the bug. You shouldn’t name anything “this”. That’s a alias to identify the component you’re working in.

I think I have something. Basically, identify the values of m and b, or a, b, and c for the correct answer. Then something like this in your graph:
C_7={total( [round(b,3)+73.839, round(m,3)-64.257] )=0 :1,0}

Essentially, I made a list of the rounded value of b - expected answer and m -expected. Which should each = 0 if correct. Took the total of that. If it equals 0, C_7 =1 otherwise 0. You can then use Reg3.number("C_7") or whatever for your table.

Here’s the latex if you want to copy paste
C_{7}=\left\{\operatorname{total}\left(\left[\operatorname{round}\left(b,3\right)+73.839,\operatorname{round}\left(m,3\right)-64.257\right]\right)=0:1,0\right\}

So where in my activity do I put that? Does it go on the Regression slide as the CL or on the lesson score slide? I can’t figure out where to put it and not get an error.
Julia

I put it directly in the graph.

Thank you. Got it! :slight_smile:

1 Like