Continuation of Regression


We will be going into more advance topics and examples using regression


RMSE


While doing regressions you may have noticed RMSE, this is another indicator, like $$R^2$$, that measures how accurate your function represents the data points.

Smaller RMSE will represent the points better:


Polynomial regression


Lets try this:

  • The expression $$6x^4+16x^2+7$$ can be rewritten as $$(3x^2+a)(2x^2+b)$$, where a and b are positive integers. What is the value of a+b?
  • Notice how we were not given any specific data points; however, this is fine as we can implement our own.


    • While the RMSE is already at 0, to ensure this is the correct answer, we will add our own data

    • We can insert our own values for x1 to figure out what values of a and b exist to make both sides of the regression equal to each other at x1=1,2.
    • You can think of the equation as replacing our need for y1.
    • This will be more clear in the next picture

    • Back in part 1, we saw how, using y=mx+b, the regression found values of m and b that would make both sides equal.
    • We are still doing the same as the two x1 elements are giving us two value for both equations.
    • These two values have to be equal to each other for the regression to fit, similar to finding correct m and b values using y1 and x1 elements.

    • Side Note:If some of you got a=1.5 and b =4.6666 that is fine. I split this problem in half. The other part will be referenced in "Applying Desmos"

    Second example

  • If the expression $$2x^2+kx+8$$ is equivalent to $$a(x+2)^2+bx+c$$ for all real values of x, and a,b,c,k are real constants, what is the value of k?
  • Similar to the previous question we need to input our own data points to ensure both sides are equal to each other


    • For this question you wont need all 4 values, but since we have 4 unknown it is safe practice to include at least 4 different values of x1.
    • We can see that for each values of x1 both equation have same value. Also, RSME=0 so we know this is correct.
    • Remember: when a variable is stated as a constant, most of the time, it wont change as you add more x1 to the regression. Same goes for above question. a,b,c and k will not change as you add values to x1

    Third example

  • The cubic function $$y=(ax+3)(5x^2-bx+4)$$ can be rewritten as $$20x^3-9x^2-2x+12$$. What is a and b?
  • I brought this from part one to show one more thing.

    It's hidden as it's very long, but I recommend you look at this last example.

    • We can find the values like normal by using at least two x1 values since we have two unknowns
    • However, instead of looking at RSME or the list we can observe one last tool to ensure accuracy
    • We can remove the subscripts of x and y, converting them back to infinite variables, and since we have a and b already defined, we can create the graph.

    • Notice how although the function with "a" and "b" is purple, we only see black. This is because the functions are overlapping each other, meaning they are the same.

    • We can simply click on the color button for the black function to turn it off, and you'll see the purple function underneath

    Making the previous graphs clear, we can input only one x1 value and see what happens to the graph

    • Only inputing one data point is insufficient for finding "a" and "b".
    • We can see the functions don't equal each other now

    Expanding upon lists and using range restrictions


    Before we used lists to set mulitiple elements equal to each other. Now we will be using them to set multiple equations equal to each other.

    Example:

  • If n and k are numbers greater than 1 and $$\sqrt{n^5}$$ is equivalent to $$\sqrt[5]{k^4}$$, for what value of a is $$n^{4a+1}$$ equal to k?

  • This question may look scary but we can simply use lists to let desmos see both equations $$\sqrt{n^5}=\sqrt[5]{k^4}$$ and $$n^{4a+1}=k$$ as a whole.

    • Using lists we can set the left and right sides of the equations above as elements in a list.

    • The first element on the left $$\sqrt{n^5}$$ is equal to the first element on the right $$\sqrt[5]{k^4}$$ and same goes for the second elements

    • Note: RSME = 0 is misleading as we can see "a" and "k" are equal to 1 but the question states they are greater than one

    • To fix this we will restrict "a" and "k" so they can only be values greater than 1

    • Remember:For lists we care about the amount of independent equations we have rather than the amount of data points. This will may vary depending on the question, but if RMSE=0 then you should be fine with the amount you currently have.

    • While the conditions have been met, "a" looks like a long decimal, but if we simply plug in "a" and click the fraction button, we can see it's a nice fraction.
    • Remember: Desmos will normally have these long and nasty decimal answers, but the SAT math section, 99% of the time, will have nice fractions answers.

    Second Example:

  • Function f is defined by $$f(x)=-a^x+b$$, where a and b are constants. In the xy-plane, the graph of $$y=f(x)-15$$ has a y-intercept at $$(0,-\frac{99}{7})$$. The product of a and b is $$\frac{65}{7}$$. What is the value of a?
  • We could plug in the entirety of the function into desmos at x=0, but let's try something else.

    • We can create the function outside of the list, and by doing f(0), desmos will know to use f(x) function
    • Regression will do the rest for us. As we have our two data

    Third Example:

    The exponential function f is defined by f(x) = $$ab^x$$, where a and b are positive constants. If $$f(s)=t$$ and $$f(s+1)=t-0.87t$$, where s and t are constants, what is the value of b?

    Applying the same knowledge from the previous two question,we can simply turn a difficult question like this into a simple regression problem

    • This is exactly enough independent equations that desmos needs
    • Desmos will obtain these equation $$ab^{s+1}$$=.13t and $$ab^s=t$$, through substitution, and automatically divide the equation, leaving only "b" in the end which is why regression works and RMSE=0
    • To futher prove this is right we can manipulate values of "l" or "s"
    • Usually the variable the SAT is looking for is fixed.

    • in this example, if we forcibly change value of "l",both "a" and "s" will change, yet b stays the same.

    • Note:Changing constants of an equation isn't always the best practice as they too should stay the same.

    Recap of Regression Pages


    • We use regression to find unknown variables based off of given equations or data points

    • Regression uses defined variables like a, b, x1,or y1

    • To use regression we use ~

    • Regular regression without lists are dependent on having the same amount of data points for amount of unknowns

    • We can use the table or lists to store our data points

    • Regression will use the absolute value of the cloest number to 0 and ignore another value, if there is one.

    • Undefined region errors happen when you provide a value that will break the regression



    • You want an RMSE that equals 0 or is close to 0 as it shows that the model perfectly fits the data.

    • We can substitute our own data points by using x1=[...]
    • Tip:we can seperate two values with ... to express a range of values. x=[1...10] includes values from 1 to 10.

    • By seperating sides of regression into their own lines we can see the values they equal to. Doing this will let us see if both sides equal each other no matter what x1 value is inputted.

    • When doing regression try to leave constants by themselves. This rule can sometimes be broken however.

    • We can use the found values of our variables to see if they match with a given function

    • Lists can be used to set mulitiple independent equations equal to each other.
    • Remember:this type of regression depends on the amount of independent equations you include

    • If a question states that the constants or integers are greater than, positive, less than, or negative we can constrain them by doing {a>...} or {a<...}

    This site is not affiliated with, endorsed by, or connected to Desmos Studio PBC.
    "Desmos" is a trademark of Desmos Studio PBC.