regression function with only one variable

connochaetes shared this question 1 year ago
Answered

Hi. Entering f(x,y):=RightSide(FitLine(l1)) in a CAS view delivers a regression function with the two variables x and y. I can use this function via f(23,y) or f(42,y). Or I can define g(x):=f(x,y). Doing this, I can use the simple input method g(23) or g(42).

Sadly, I cannot get the same result directly by typing g(x):=RightSide(FitLine(l1)). Any ideas regarding this topic would be welcome.

Comments (2)

photo
1

try g(x) = Polynomial((-(x(FitLine(l1)) x + z(FitLine(l1)))) / y(FitLine(l1)))

photo
1

Thank you. This solves my problem technically. Sadly, it doesn 't seem appropriate for my 14-year-old students. I 'd wish, GeoGebra would offer a more intuitive access on g(x).

Off topic (just out of curiosity): I didn 't find g.x, g.y and g.z in the manual. So, I had to look it up in the commented source code: (g.x)x + (g.y)y + g.z = 0


https://github.com/geogebra...


Is there an easier way to acquire this kind of information in the future (apart from asking the friendly people in this forum)?

© 2020 International GeoGebra Institute