# regression function with only one variable

connochaetes shared this question 1 year ago

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. 1

try g(x) = Polynomial((-(x(FitLine(l1)) x + z(FitLine(l1)))) / y(FitLine(l1))) 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

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