Previous Up Next

7.2.5  Exponential regression: exponential_regression exponential_regression_plot

A set of points might be expected to lie on an exponential curve y=b ax. Given a set of points, either as a list of x-coordinates followed by a list of y-coordinates, or simply by a list of points, the exponential_regression command will find the values of a and b which give the best fit exponential. For example, if you enter




(where the evalf is used to get a numeric approximation to an exact expression) you will get


so the best fit exponential curve will be y = 0.5*(2.49146187923)x.

To plot the curve, you can use the command exponential_regression_plot; if you enter


you will get

which plots the graph, and has the equation and R2 value above the graph.

Previous Up Next