# Checking Line of Best Fit Help

**URL:** <https://cl.desmos.com/t/checking-line-of-best-fit-help/3857>\
**Category:** Questions\
**Created:** [November 24, 2021, 9:32pm UTC](https://cl.desmos.com/t/checking-line-of-best-fit-help/3857 "2021-11-24T21:32:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brenton\_F](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/brenton_f/32/2078_2.png) [@Brenton\_F](https://cl.desmos.com/u/Brenton_F)\
**Post date:** [November 24, 2021, 9:32pm UTC](https://cl.desmos.com/t/checking-line-of-best-fit-help/3857/1 "2021-11-24T21:32:39Z")

</div>

I am working to try and get this activity to give the check mark when students have the line of best fit within 2.5% of the actual y-intercept. This that I am sharing is my problem solving.

When I move the green points in top graph and then click graph the line of best fit button, it does collect both the slope and y-intercept of the graph.

The bottom graph is showing the actual line of best fit and when I click the exact line of best fit of the button, I know it is collecting the slope and y-intercept. However, it will not give me a check mark until I move one of the purple dots on the graph. I can’t figure out why that is.

Any help would be appreciated.

> **[\[Copy of\] MASTER - Scatter Plot • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/619eacb6a39e596baceef0a7)**
>
> Students enter the names for the axis, min and max value for both and enter data to create the graph. Linear regression after that. (Sorry, 7 screens)

---

<div class="post-metadata">

**Author:** ![pirsquared](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@pirsquared](https://cl.desmos.com/u/pirsquared)\
**Post date:** [November 24, 2021, 11:09pm UTC](https://cl.desmos.com/t/checking-line-of-best-fit-help/3857/2 "2021-11-24T23:09:59Z")

</div>

I don’t know if it’s a glitch or by design, but `correct:` conditions attached to graphs do not seem to update until something is adjusted on the graph itself - like moving the purple points, for example, as you spotted.

Your two options to fix this seem to be either to use `saveOnChange` in the graph CL, with anything that changes - eg. `saveOnChange: "${bf}"` - or to make graphans readonly and put the `correct:` condition in the multiple choice component.

---

<div class="post-metadata">

**Author:** ![Brenton\_F](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/brenton_f/32/2078_2.png) [@Brenton\_F](https://cl.desmos.com/u/Brenton_F)\
**Post date:** [November 25, 2021, 12:00am UTC](https://cl.desmos.com/t/checking-line-of-best-fit-help/3857/3 "2021-11-25T00:00:25Z")

</div>

Thanks! I changed the correct condition to the multiple choice component and it does what I want.

---

<div class="post-metadata">

**Author:** ![JayChow](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jaychow/32/1674_2.png) [@JayChow](https://cl.desmos.com/u/JayChow)\
**Post date:** [November 25, 2021, 7:21am UTC](https://cl.desmos.com/t/checking-line-of-best-fit-help/3857/4 "2021-11-25T07:21:34Z")

</div>

There’s actually a new (somewhat secret) sink “hasResponse” that you can use here. You can use it to mark a graph’s correctness without directly interacting or unmark correctness for graphs with number sinks that haven’t been interacted with.

---

<div class="post-metadata">

**Author:** ![Brenton\_F](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/brenton_f/32/2078_2.png) [@Brenton\_F](https://cl.desmos.com/u/Brenton_F)\
**Post date:** [November 25, 2021, 12:47pm UTC](https://cl.desmos.com/t/checking-line-of-best-fit-help/3857/5 "2021-11-25T12:47:41Z")

</div>

Which component would I use the hasResponse sink? I tried looking it up but was unable to locate the sink.

Thanks

---

<div class="post-metadata">

**Author:** ![Brenton\_F](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/brenton_f/32/2078_2.png) [@Brenton\_F](https://cl.desmos.com/u/Brenton_F)\
**Post date:** [November 25, 2021, 3:46pm UTC](https://cl.desmos.com/t/checking-line-of-best-fit-help/3857/6 "2021-11-25T15:46:03Z")

</div>

Along with this, I am trying to create a master that will create the line of best fit answer key for any set of data I put in for the table. I got it to work for the first data that I put in the table. However, when I copy this slide and switch the data. It no longer computes the slope of the line of best fit to check.

There is a lot going on in this one slide, and I feel I sometimes find ways to check values, but I do not think they are always the most efficient method in coding.

Essentially on this slide I am trying to do the following:

1. Be able to input data into the hidden slide.
2. The hidden graph finds the accurate line of best fit.
3. Students then need to identify type(s) of association.
4. Students then graph their line and develop equation.
5. Slide then checks accuracy (within an error range) of what students put and gives feedback.

The challenge is when I put in different data, the coding is not checking accuracy of students answers.

Thanks,

---

<div class="post-metadata">

**Author:** ![JayChow](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jaychow/32/1674_2.png) [@JayChow](https://cl.desmos.com/u/JayChow)\
**Post date:** [November 25, 2021, 3:58pm UTC](https://cl.desmos.com/t/checking-line-of-best-fit-help/3857/7 "2021-11-25T15:58:38Z")

</div>

Yeah, it’s not fully released yet so it won’t be autocompleted and documented. Use it in the graph and assign it a Boolean value.

---

<div class="post-metadata">

**Author:** ![Brenton\_F](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/brenton_f/32/2078_2.png) [@Brenton\_F](https://cl.desmos.com/u/Brenton_F)\
**Post date:** [November 26, 2021, 2:12am UTC](https://cl.desmos.com/t/checking-line-of-best-fit-help/3857/8 "2021-11-26T02:12:34Z")

</div>

I think I figured it out for the 5 things I was trying to do. Thanks for the help. I had an inequality statement that would never be true!!
