Previous Up Next

20.2.7  Power regression

The power_regression command finds the graph y=bxm which best fits a set of data points.

Example

power_regression([[1,1],[2,4],[3,9],[4,16]])

or:

power_regression([1,2,3,4],[1,4,9,16])
     
2.0,1.0           

so the best fit (in this case, exact fit) power curve will be y=1.0 x2.

The power_regression_plot command draws the best fit power function.

Example

power_regression_plot([1,2,3,4],[1,4,9,16])

Note that in this case the R2 value is 1, indicating that data points fall directly on the curve.


Previous Up Next