Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I didn't find any reference to linear regression in the SAGE reference manual. That means you have to use Maxima directly. Fortunately that's not so difficult.

It's easier if you present the data as a list of pairs (x,y). Try this in a SAGE notebook cell:

maxima.load("stats")
x=maxima.simple_linear_regression([[0,1],[1,2],[2,4]],conf_level=0.95)

x

You are presented a whole bunch of statistics about the regression. From there on I guess you can manage on your own. Good luck.