I have a table of points of which i create multiple linear regressions.
The first regression only uses the first 2 points, the second regression the first three till the last regression uses all points.
Of each regression y(x) i want to plot the root with points (x₁ , -b/a) with y(x) = ax+b.
In my test i didn’t find a way to store the roots of the built-in regression function in a list. I tried adding g(x) and h(x) which calculate a and b for each regression y(x). J(x) plots the roots somewaht, but i can’t store j(x) in a list either.
The goal is a function that plots the points like x₂ in the upper table.
g(x)
, h(x)
, and j(x)
are all functions. Are you wanting only where x is an integer from 1 to d? Is this what you’re looking for? I converted all the functions to list comprehensions.
Yes, this is exactly what i was looking for!
I couldn’t figure out, how to convert the functions to list comprehensions.
Thank you very much!
1 Like