;; @module stat.lsp ;; @description Basic statistics and plotting library ;; @version 3.0 - Eliminated plot functions and f-prob which now is built-in as prob-f ;; @version 3.1 - Documentation changes ;; ;; @author Lutz Mueller, 2001-2013 ;;

## Functions for statistics

;; To use this module it has to be loaded at the beginning of the ;; program file: ;;
```;; (load (append (env "NEWLISPDIR") "/modules/stat.lsp"))
;; ; or shorter
;; (module "stat.lsp")
;; ```
;; All functions work on integers and floats or a mix of both. are normal ;; LISP lists. are lists of lists, one list for each row in the ;; two dimensional data matrix. See the function 'stat:matrix' on how to make matrices ;; from lists. ;; ;; In version 3.0 of 'stat.lsp' the usage for Gnuplot the stat:plot and stat:plotXY ;; functions has been eliminated. Instead use the module 'plot.lsp' shipped with all binary and ;; source distributions. The F-distribution function 'f-prob' has also been eliminated ;; instead use one of new the built-in 'prob-f' or 'crit-f' functions. ;; ;; The documention contains only the call patterns. See the source for more ;; documentation. ;; ;;

## Summary of functions

;;

### General uni- and bi- variate statistics

;;
```;; stat:sum      - returns the sum of a vector of numbers
;; stat:mean     - returns the arithmetik mean of a vector of numbers
;; stat:var      - returns the estimated variance of numbers in a vector sample
;; stat:sdev     - returns the estimated standard deviation of numbers in a vector
;; stat:sum-sq   - returns the sum of squares of a data vector
;; stat:sum-xy   - returns the sum of products of a two data vectors
;; stat:corr     - returns the correlation coefficient between two vectors (built-in since 10.4.2)
;; stat:cov      - returns the covariance of two number vectors
;; stat:sum-d2   - returns the sum of squared differences of a vector from its mean
;; stat:sum-d2xy - returns sum of squared diffferences of two vectors
;; stat:regression - calculates the intecept and slope of a regression estimate
;; stat:fit      - return the fitted line using regression coefficients
;; stat:moments  - calulates 1st to 3rd moments from a vector of numbers
;; ```
;;

### Multi variate statistics

;;
```;; stat:multiple-reg  - calculates a multiple regression
;; stat:cov-matrix    - calculates a covariance matrix
;; stat:corr-matrix   - calculates a correlation matrix
;; ```
;;

### Time series

;;
```;; stat:smooth   - smoothes a vector of numbers
;; stat:lag      - calcultes a difference list with specified lag
;; stat:cumulate - cumulate a data vector
;; stat:power    - calculate the power spectrum of a time series
;; ```
;;

### Matrix and list utilities

;;
```;; stat:matrix       - make a matrix from column vectors
;; stat:diagonal     - make a diagonal matrix
;; stat:get-diagonal - return the diagonal of a matrix in a vector
;; stat:mat-map      - map a binary function on to matrices
;; ```