The standard library univariate_sample package implements a simple interface to functionality providing for computation of mean, variance, standard deviation, skew and kurtosis of a distribution defined by a user-supplied function.
The univariate_sample package API is defined anonymously inline in the source.
The univariate_sample package source code is in src/lib/src/univariate-sample.pkg.
See also: random_sample.
The above information is manually maintained and may contain errors.
api { Light; Heavy; Sample X; Evaluation X; lempty : Sample(Light ); hempty : Void -> Sample(Heavy ); ladd : (Float , Sample(Light )) -> Sample(Light ); hadd : (Float , Sample(Heavy )) -> Sample(Heavy ); evaluate : Sample(X ) -> Evaluation(X ); nn : Evaluation(X ) -> Int; n : Evaluation(X ) -> Float; mean : Evaluation(X ) -> Float; variance : Evaluation(X ) -> Float; standard_deviation : Evaluation(X ) -> Float; skew : Evaluation(X ) -> Float; kurtosis : Evaluation(X ) -> Float; median : Evaluation(Heavy ) -> Float; average_deviation : Evaluation(Heavy ) -> Float;};