stats(deprecated)/fit - Maple Help

Overview of stats[fit] Subpackage

 Calling Sequence stats[fit][command](arguments) command(arguments)

Description

 • Important: The stats package has been deprecated. Use the superseding package Statistics instead.
 • The stats[fit] subpackage provides a tool for fitting curves to statistical data.
 • Each command in the stats[fit] package can be accessed by using either the long form or the short form of the command name in the command calling sequence.

List of stats[fit] Subpackage Commands

 • The following is a list of available commands.

 To display the help page for a particular stats[fit] command, see Getting Help with a Command in a Package.
 • Some commands either require or use parameters in addition to the data given as arguments. These parameters appear as an index to the command name. See below for some examples.
 • If a particular call cannot be evaluated, for example trying to find the mode of a statistical list that contains a non-numerical entry, then the call is returned unevaluated. Information is provided in the variable stats/lasterror why a call was not evaluated. Also, this information is automatically given if infolevel[stats] has been set to a value greater than or equal to one, prior to the unsuccessful call.

Examples

Important: The stats package has been deprecated. Use the superseding package Statistics instead.

 > $\mathrm{with}\left(\mathrm{stats}\right):$

this example uses the defaults to fit the data to the curve y=a*x+b

 > $\mathrm{fit}\left[\mathrm{leastsquare}\left[\left[x,y\right]\right]\right]\left(\left[\left[10,15,17,19\right],\left[3,4,5,6\right]\right]\right)$
 ${y}{=}\frac{{58}{}{x}}{{179}}{-}\frac{{79}}{{179}}$ (1)

This is the same as

 > $\mathrm{fit}\left[\mathrm{leastsquare}\left[\left[x,y\right],y=ax+b,\left\{a,b\right\}\right]\right]\left(\left[\left[10,15,17,19\right],\left[3,4,5,6\right]\right]\right)$
 ${y}{=}\frac{{58}{}{x}}{{179}}{-}\frac{{79}}{{179}}$ (2)

One can also specify nonlinear curves -- as long as the unknown parameters appear linearly

 > $\mathrm{fit}\left[\mathrm{leastsquare}\left[\left[x,y\right],y=a{x}^{2}+bx+c\right]\right]\left(\left[\left[10,15,17,19\right],\left[3,4,5,6\right]\right]\right)$
 ${y}{=}\frac{{417}}{{13358}}{}{{x}}^{{2}}{-}\frac{{7583}}{{13358}}{}{x}{+}\frac{{37054}}{{6679}}$ (3)