Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (34 sloc) 1.67 KB
The \eslmod{stats} module is the foundation of a set of statistics
modules. It contains special functions like $\Gamma(x)$ and $\Psi(x)$,
and elementary statistics routines such as linear regression fitting
and $\chi^2$ testing. Table~\ref{tbl:stats_api} lists the functions in
the \eslmod{stats} API.
\hyperlink{func:esl_stats_DMean()}{\ccode{esl\_stats\_\{D,F,I\}Mean()}} & Calculates mean and $\sigma^2$ for samples $x_i$.\\
\hyperlink{func:esl_stats_LogGamma()}{\ccode{esl\_stats\_LogGamma()}} & Calculates $\log \Gamma(x)$.\\
\hyperlink{func:esl_stats_Psi()}{\ccode{esl\_stats\_Psi()}} & Calculates $\Psi(x)$ (the digamma function).\\
\hyperlink{func:esl_stats_IncompleteGamma()}{\ccode{esl\_stats\_IncompleteGamma()}} & Calculates the incomplete Gamma function.
\hyperlink{func:esl_stats_ChiSquaredTest()}{\ccode{esl\_stats\_ChiSquaredTest()}} & Calculates a $\chi^2$ P-value.\\
\hyperlink{func:esl_stats_LinearRegression()}{\ccode{esl\_stats\_LinearRegression()}} & Fit data to a straight line.\\
\caption{The \eslmod{stats} API.}
\subsection{An example of using the stats API}
Figure~\ref{fig:stats_example} shows an example of using one of the
routines in the \eslmod{stats} module, linear regression fitting. It
generates a set of $n$ points dispersed around a line, $y_i = a + bx +
N(\sigma)$ with Gaussian noise $N(\sigma)$, then fits the data to a
line to obtain estimates $\hat{a}$ and $\hat{b}$.
\caption{An example of using the \eslmod{stats} module.}
You can’t perform that action at this time.