The STATISTICS Reference Manual

The STATISTICS Reference Manual

This is the STATISTICS Reference Manual, version 1.0.0, generated automatically by Declt version 4.0b2.

Copyright © 2019-2022 Steve Nunez

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the section entitled “Copying” is included exactly as in the original.

Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be translated as well.

Table of Contents


Copying

This program is distributed under the terms of the Microsoft Public License.


1 Systems

The main system appears first, followed by any subsystem dependency.


1.1 statistics

A consolidated system of statistical functions

Long Name

Consolidated Common Lisp statistical functions

Author

Steve Nunez <steve@symbolics.tech>

Home Page

https://lisp-stat.dev/

Source Control

(GIT https://github.com/Lisp-Stat/statistics.git)

Bug Tracker

https://github.com/Lisp-Stat/statistics/issues

License

MS-PL

Long Description

This system is a consolidation of three Common Lisp statistics libraries:

- Tamas Papp’s library, focusing on central moments
- Larry Hungers general statistical library
- Gary Warren King’s (GWK) general statistical library, cl-mathstats

As of Q3 2022, CL-MATHSTATS is usable with Lisp-Stat, but not incorporated. This is due to it being rather deeply embedded into its own ecosystem of utilities libraries (metatilities-base and cl-containers and the lift test framework) that have in some cases been superseded by alexandria, anaphora or numerical-utilities. In short, we recommend using CL-MATHSTATS when you need to, recognising that you’ll be hauling in a parallel system of math, statistics and utilities. Long term, we’re working to port CL-MATHSTATS on a case-by-case basis.

Version

1.0.0

Dependencies
  • anaphora (system).
  • alexandria (system).
  • distributions (system).
  • let-plus (system).
  • num-utils (system).
  • org.tfeb.conduit-packages (system).
Source

statistics.asd.

Child Components

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


2.1 Lisp


2.1.1 statistics/statistics.asd

Source

statistics.asd.

Parent Component

statistics (system).

ASDF Systems

statistics.


2.1.2 statistics/lh-statistics.lisp

Source

statistics.asd.

Parent Component

statistics (system).

Packages

lh.statistics.

Public Interface
Internals

2.1.3 statistics/nu-statistics.lisp

Source

statistics.asd.

Parent Component

statistics (system).

Packages

nu.statistics.

Public Interface
Internals

2.1.4 statistics/ls-statistics.lisp

Source

statistics.asd.

Parent Component

statistics (system).

Packages

ls.statistics.

Public Interface

2.1.5 statistics/pkgdcl.lisp

Source

statistics.asd.

Parent Component

statistics (system).

Packages

statistics-1.


2.2 Static


2.2.1 statistics/license

Source

statistics.asd.

Parent Component

statistics (system).


3 Packages

Packages are listed by definition order.


3.1 lh.statistics

The formulas and methods used are largely taken from Bernard Rosner, *Fundamentals of Biostatistics* 5th Edition. ’Rosner x’ is a page number. Some numeric functions were taken from CLASP, a 1994 common lisp package that implemented some of the statistical functions from *Numeric recipes in C* For CLASP functions, see copyright notice below.

These abreviations used in function and variable names:
ci = confidence interval
cdf = cumulative density function
ge = greater than or equal to
le = less than or equal to
pdf = probability density function
sd = standard deviation
rxc = rows by columns
sse = sample size estimate

Source

lh-statistics.lisp.

Use List

common-lisp.

Public Interface
Internals

3.2 nu.statistics

Source

nu-statistics.lisp.

Use List
  • alexandria.
  • anaphora.
  • common-lisp.
  • let-plus.
  • num-utils.arithmetic.
  • num-utils.num=.
  • num-utils.utilities.
Public Interface
Internals

3.3 statistics-1

Source

pkgdcl.lisp.


3.4 ls.statistics

Source

ls-statistics.lisp.

Use List

common-lisp.

Public Interface

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


4.1 Public Interface


4.1.1 Special variables

Special Variable: *central-sample-moments-default-degree*

Default degree for (weighted) central sample moments.

Package

nu.statistics.

Source

nu-statistics.lisp.


4.1.2 Macros

Macro: square (x)
Package

lh.statistics.

Source

lh-statistics.lisp.

Macro: test-variables (&rest args)
Package

lh.statistics.

Source

lh-statistics.lisp.


4.1.3 Ordinary functions

Function: bin-and-count (sequence n)

Make N equal width bins and count the number of elements of sequence that belong in each.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: binomial-cumulative-probability (n k p)

Return P(X<k) for X a binomial random variable with parameters n & p. Bionomial expecations for fewer than k events in N trials, each having probability p. This is also known as probability mass function (PMF), the probability of getting exactly k successes in n independent Bernoulli trials.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: binomial-ge-probability (n k p)

The probability of k or more occurances in N events, each with probability p.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: binomial-probability (n k p)

Return P(X=k) for X a binomial random variable with parameters n & p. Binomial expectations for seeing k events in N trials, each having probability p. Use the Poisson approximation if N>100 and P<0.01.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: binomial-probability-ci (n p alpha &key exact?)

Confidence intervals on a binomial probability. If a binomial probability of p has been observed in N trials, what is the 1-alpha confidence interval around p? Approximate (using normal theory approximation) when npq >= 10 unless told otherwise

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: binomial-test-one-sample (p-hat n p &key tails exact?)

The significance of a one sample test for the equality of an observed probability p-hat to an expected probability p under a binomial distribution with N observations. Use the normal theory approximation if n*p*(1-p) > 10 (unless the exact flag is true).

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: binomial-test-one-sample-sse (p-estimated p-null &key alpha 1-beta tails)

Returns the number of subjects needed to test whether an observed probability is significantly different from a particular binomial null hypothesis with a significance alpha and a power 1-beta.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: binomial-test-paired-sse (pd pa &key alpha 1-beta tails)

Sample size estimate for the McNemar (discordant pairs) test. Pd is the projected proportion of discordant pairs among all pairs, and Pa is the projected proportion of type A pairs among discordant pairs. alpha, 1-beta and tails are as above. Returns the number of individuals necessary; that is twice the number of matched pairs necessary.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: binomial-test-two-sample (p-hat1 n1 p-hat2 n2 &key tails exact?)

Are the observed probabilities of an event (p-hat1 and p-hat2) in N1/N2 trials different? The normal theory method implemented here. The exact test is Fisher’s contingency table method, below.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: binomial-test-two-sample-sse (p1 p2 &key alpha sample-ratio 1-beta tails)

The number of subjects needed to test if two binomial probabilities are different at a given significance alpha and power 1-beta. The sample sizes can be unequal; the p2 sample is sample-sse-ratio * the size of the p1 sample. It can be a one tailed or two tailed test.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: central-sample-moments-degree (central-sample-moments)

Return the degree of CENTRAL-SAMPLE-MOMENTS.

Package

nu.statistics.

Source

nu-statistics.lisp.

Function: chi-square (dof percentile)

;; Returns the point which is the indicated percentile in the Chi Square distribution with dof degrees of freedom.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: chi-square-cdf (x dof)

Chi-square-cdf computes the left hand tail area under the chi square distribution under dof degrees of freedom up to X.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: chi-square-test-for-trend (row1-counts row2-counts &optional scores)

This test works on a 2xk table and assesses if there is an increasing or decreasing trend. Arguments are equal sized lists counts. Optionally, provide a list of scores, which represent some numeric attribute of the group. If not provided, scores are assumed to be 1 to k.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: chi-square-test-one-sample (variance n sigma-squared &key tails)

The significance of a one sample Chi square test for the variance of a normal distribution. Variance is the observed variance, N is the number of observations, and sigma-squared is the test variance.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: chi-square-test-rxc (contingency-table)

Takes contingency-table, an RxC array, and returns the significance of the relationship between the row variable and the column variable. Any difference in proportion will cause this test to be significant – consider using the test for trend instead if you are looking for a consistent change.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: choose (n k)

How may ways to take n things taken k at a time, when order doesn’t matter

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: coefficient-of-variation (sequence)

Return coefficient of variation

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: convert-to-standard-normal (x mu sigma)

Convert X from a Normal distribution with mean mu and variance sigma to standard normal

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: correlation-coefficient (points)

Pearson correlation

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: correlation-sse (rho &key alpha 1-beta)

Returns the size of a sample necessary to find a correlation of expected value rho with significance alpha and power 1-beta.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: correlation-test-two-sample (r1 n1 r2 n2 &key tails)

Test if two correlation coefficients are different. Users Fisher’s Z test.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: correlation-test-two-sample-on-sequences (points1 points2 &key tails)
Package

lh.statistics.

Source

lh-statistics.lisp.

Function: cross-tabulate (sequence1 sequence2 &key test)

Cross-tabulate two sequences (using a SPARSE-COUNTER with the given TEST). TEST is used to compare conses.

Package

nu.statistics.

Source

nu-statistics.lisp.

Function: empirical-quantile (sorted-vector q)

Return the empirical quantile of a vector of real numbers, sorted in ascending order (not checked). Uses a 0.5 correction.

Package

nu.statistics.

Source

nu-statistics.lisp.

Function: empirical-quantile-probabilities (n)

Probabilities that correspond to the empirical quantiles of a vector of length N. That is to say,

(== (quantiles sample (empirical-quantile-probabilities (length sample)))
sample)

for any vector SAMPLE.

Package

nu.statistics.

Source

nu-statistics.lisp.

Function: ensure-sorted-vector (object)

Return the elements of OBJECT as a vector (or reals) sorted in ascending order.

Package

nu.statistics.

Source

nu-statistics.lisp.

Function: f-significance (f-statistic numerator-dof denominator-dof &optional one-tailed-p)

Adopted from CLASP, but changed to handle F < 1 correctly in the one-tailed case. The ‘f-statistic’ must be a positive number. The degrees of freedom arguments must be positive integers. The ‘one-tailed-p’ argument is treated as a boolean.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: f-test (variance1 n1 variance2 n2 &key tails)

F test for the equality of two variances

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: false-discovery-correction (p-values &key rate)

A multiple testing correction that is less conservative than Bonferroni. Takes a list of p-values and a false discovery rate, and returns the number of p-values that are likely to be good enough to reject the null at that rate. Returns a second value which is the p-value cutoff.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: fisher-exact-test (contingency-table &key tails)

Fisher’s exact test. Gives a p value for a particular 2x2 contingency table

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: fisher-z-transform (r)

Transforms the correlation coefficient to an approximately normal distribution.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: fivenum (x &key tukey)

By default, returns the five number summary (min, 1st quartile, median, 3rd quartile, max) of the elements X. If the keyword :tukey is set to a non-nil value, Tukey’s fivenum summary is computed instead.

Package

ls.statistics.

Source

ls-statistics.lisp.

Function: geometric-mean (sequence &optional base)

Returns the geometric mean of SEQUENCE
The geometric mean is a mean or average, which indicates the central tendency or typical value of a set of numbers by using the product of their values (as opposed to the arithmetic mean which uses their sum)

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: interquartile-range (x)

Returns the interquartile range of the elements of X.

Package

ls.statistics.

Source

ls-statistics.lisp.

Function: linear-regression (points)

Computes the regression equation for a least squares fit of a line to a sequence of points (each a list of two numbers, e.g. ’((1.0 0.1) (2.0 0.2))) and report the intercept, slope, correlation coefficient r, R^2, and the significance of the difference of the slope from 0.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: make-sparse-counter (&key test)

Create a sparse counter. Elements are compared with TEST (should be accepted by HASH-TABLE).

Package

nu.statistics.

Source

nu-statistics.lisp.

Function: mcnemars-test (a-discordant-count b-discordant-count &key exact?)

McNemar’s test for correlated proportions, used for longitudinal studies. Look only at the number of discordant pairs (one treatment is effective and the other is not). If the two treatments are A and B, a-discordant-count is the number where A worked and B did not, and b-discordant-count is the number where B worked and A did not.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: mean (sequence)

Returns the mean of SEQUENCE

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: mean (object &key weights)

Return the mean of OBJECT. OBJECT must be either a sequence of numbers, a sequence of BOOLEAN or a DISTRIBUTION object.

A sequence of BOOLEAN is converted to a BIT-VECTOR and the mean of it returned. This gives you the ratio of TRUE/FALSE values in the sequence (which is most often interpreted as a probability).

For samples (numeric-vectors), normalized by the weight-1 (and thus unbiased if certain assumptions hold, eg weights that count frequencies.

Package

ls.statistics.

Source

ls-statistics.lisp.

Function: mean-sd-n (sequence)

A combined calculation that is often useful. Takes a sequence and returns three values: mean, standard deviation and N.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: median (sequence)

Returns the median of SEQUENCE

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: mode (sequence)

Returns two values: a list of the modes and the number of times they occur

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: normal-mean-ci (mean sd n alpha)

Confidence interval for the mean of a normal distribution.

The 1-alpha percent confidence interval on the mean of a normal distribution with parameters mean, sd & n.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: normal-mean-ci-on-sequence (sequence alpha)

The 1-alpha confidence interval on the mean of a sequence of numbers drawn from a Normal distribution.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: normal-pdf (x mu sigma)

The probability density function (PDF) for a normal distribution with mean mu and variance sigma at point x.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: normal-sd-ci (sd n alpha)

The 1-alpha confidence interval on the standard deviation of a sequence of numbers drawn from a Normal distribution.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: normal-sd-ci-on-sequence (sequence alpha)
Package

lh.statistics.

Source

lh-statistics.lisp.

Function: normal-variance-ci (variance n alpha)

The 1-alpha confidence interval on the variance of a sequence of numbers drawn from a Normal distribution.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: normal-variance-ci-on-sequence (sequence alpha)
Package

lh.statistics.

Source

lh-statistics.lisp.

Function: percentile (sequence percent)

Return an element from SEQUENCE at percentile PERCENT This function is also known as quantile.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: permutations (n k)

How many ways to take n things taken k at a time, when order matters

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: phi (x)

the CDF of standard normal distribution

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: poisson-cumulative-probability (mu k)

Probability of seeing fewer than K events over a time period when the expected number events over that time is mu.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: poisson-ge-probability (mu x)

Probability of X or more events when expected is mu.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: poisson-mu-ci (x alpha)

Confidence interval for the Poisson parameter mu

Given x observations in a unit of time, what is the 1-alpha confidence interval on the Poisson parameter mu (= lambda*T)?

Since find-critical-value assumes that the function is monotonic increasing, adjust the value we are looking for taking advantage of reflectiveness

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: poisson-probability (mu k)

Probability of seeing k events over a time period when the expected number of events over that time is mu.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: poisson-test-one-sample (observed mu &key tails approximate?)

The significance of a one sample test for the equality of an observed number of events (observed) and an expected number mu under the poisson distribution. Normal theory approximation is not that great, so don’t use it unless told.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: pool (&rest accumulators)

Pool ACCUMULATORS.

Package

nu.statistics.

Source

nu-statistics.lisp.

Function: random-normal (&key mean sd)

Returns a random number with mean and standard-distribution as specified.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: random-pick (sequence)

Random selection from sequence

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: random-sample (n sequence)

Return a random sample of size N from sequence, without replacement. If N is equal to or greater than the length of the sequence, return the entire sequence.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: round-float (x &key precision)

Rounds a floating point number to a specified number of digits precision.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: sample-range (sequence)

Return the difference between the largest and smallest values in SEQUENCE

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: sd (sequence)
Package

lh.statistics.

Source

lh-statistics.lisp.

Function: sign-test (plus-count minus-count &key exact? tails)

Really just a special case of the binomial one sample test with p = 1/2. The normal theory version has a correction factor to make it a better approximation.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: sign-test-on-sequences (sequence1 sequence2 &key exact? tails)

Same as SIGN-TEST, but takes two sequences and tests whether the entries in one are different (greater or less) than the other.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: sorted-reals-elements (sorted-reals)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: sparse-counter-count (sparse-counter object)

Return the count for OBJECT.

Package

nu.statistics.

Source

nu-statistics.lisp.

Reader: sparse-counter-table (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Target Slot

table.

Function: spearman-rank-correlation (points)

Spearman rank correlation computes the relationship between a pair of variables when one or both are either ordinal or have a distribution that is far from normal. It takes a list of points (same format as linear-regression) and returns the spearman rank correlation coefficient and its significance.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: standard-deviation (sequence)

Return the standard deviation of SEQUENCE

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: standard-error-of-the-mean (sequence)

Return the estimated standard deviation obtained from a set of sample means from repeated samples

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-distribution (dof percentile)

Returns the point which is the indicated percentile in the T distribution with dof degrees of freedom

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-significance (t-statistic dof &key tails)

Adopted from CLASP 1.4.3, http://eksl-www.cs.umass.edu/clasp.html

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-test-one-sample (x-bar sd n mu &key tails)

The significance of a one sample T test for the mean of a normal distribution with unknown variance. X-bar is the observed mean, sd is the observed standard deviation, N is the number of observations and mu is the test mean.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-test-one-sample-on-sequence (sequence mu &key tails)

The significance of a one sample T test for the mean of a normal sequence of numbers with unknown variance. X-bar is the observed mean, sd is the observed standard deviation, N is the number of observations and mu is the test mean.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-test-one-sample-sse (mu mu-null variance &key alpha 1-beta tails)

Returns the number of subjects needed to test whether the mean of a normally distributed sample mu is different from a null hypothesis mean mu-null and variance variance, with alpha, 1-beta and tails as specified.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-test-paired (d-bar sd n &key tails)

The significance of a paired t test for the means of two normal distributions in a longitudinal study. D-bar is the mean difference, sd is the standard deviation of the differences, N is the number of pairs.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-test-paired-on-sequences (before after &key tails)

The significance of a paired t test for means of two normal distributions in a longitudinal study. Before is a sequence of before values, after is the sequence of paired after values (which must be the same length as the before sequence).

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-test-paired-sse (difference-mu difference-variance &key alpha 1-beta tails)

Returns the number of subjects needed to test whether the differences with mean difference-mu and variance difference-variance, with alpha, 1-beta and tails as specified.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-test-two-sample (x-bar1 sd1 n1 x-bar2 sd2 n2 &key variances-equal? variance-significance-cutoff tails)

The significance of the difference of two means (x-bar1 and x-bar2) with standard deviations sd1 and sd2, and sample sizes n1 and n2 respectively. The form of the two sample t test depends on whether the sample variances are equal or not. If the variable variances-equal? is :test, then we use an F test and the variance-significance-cutoff to determine if they are equal. If the variances are equal, then we use the two sample t test for equal variances. If they are not equal, we use the Satterthwaite method, which has good type I error properties (at the loss of some power).

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-test-two-sample-on-sequences (sequence1 sequence2 &key variance-significance-cutoff tails)

The significance of the difference of two means of SEQUENCE1 and SEQUENCE2 with standard deviations sd1 and sd2, and sample sizes n1 and n2 respectively. The form of the two sample t test depends on whether the sample variances are equal or not. If the variable variances-equal? is :test, then we use an F test and the variance-significance-cutoff to determine if they are equal. If the variances are equal, then we use the two sample t test for equal variances. If they are not equal, we use the Satterthwaite method.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: t-test-two-sample-sse (mu1 variance1 mu2 variance2 &key sample-ratio alpha 1-beta tails)

Returns the number of subjects needed to test whether the mean mu1 of a normally distributed sample (with variance variance1) is different from a second sample with mean mu2 and variance variance2, with alpha, 1-beta and tails as specified. It is also possible to set a sample size ratio of sample 1 to sample 2.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: tabulate (sequence &key test)

Tabulate a sequence (using a SPARSE-COUNTER with the given TEST).

Package

nu.statistics.

Source

nu-statistics.lisp.

Function: variance (sequence)

Return variance of SEQUENCE

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: variance (object &key weights biased?)

Variance of OBJECT. For samples, normalized by the weight-1 (and thus unbiased if certain assumptions hold, e.g. weights that count frequencies).

Note that alexandria’s default for variance will return biased variance. We change that here for consistency. If you want a biased variance use alexandria:variance directly.

Package

ls.statistics.

Source

ls-statistics.lisp.

Function: weighted-quantiles (values weights qs)

Calculate quantiles QS of weighted observations. Uses a 0.5 correction.

Package

nu.statistics.

Source

nu-statistics.lisp.

Function: wilcoxon-signed-rank-test (differences &optional tails)

A test on the ranking of positive and negative differences (are the positive differences significantly larger/smaller than the negative ones). Assumes a continuous and symmetric distribution of differences, although not a normal one. This is the normal theory approximation, which is only valid when N > 15. This test is equivalent to the Mann-Whitney test.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: wilcoxon-signed-rank-test-on-sequences (sequence1 sequence2 &optional tails)
Package

lh.statistics.

Source

lh-statistics.lisp.

Function: z (percentile &key epsilon)

The inverse normal function, P(X<Zu) = u where X is distributed as the standard normal. Uses binary search.(

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: z-test (x-bar n &key mu sigma tails)

The significance of a one sample Z test for the mean of a normal distribution with known variance. mu is the null hypothesis mean, x-bar is the observed mean, sigma is the standard deviation and N is the number of observations. If tails is :both, the significance of a difference between x-bar and mu. If tails is :positive, the significance of x-bar is greater than mu, and if tails is :negative, the significance of x-bar being less than mu. Returns a p value.

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: z-test-on-sequence (sequence &key mu sigma tails)
Package

lh.statistics.

Source

lh-statistics.lisp.


4.1.4 Generic functions

Generic Function: add (accumulator object &key weight)

Add OBJECT to ACCUMULATOR. Return OBJECT. NILs are ignored by the accumulator, unless a specialized method decides otherwise. Keywords may be used to specify additional information (eg weight).

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: add ((accumulator sparse-counter) object &key weight)

Increments the count of OBJECT in SPARSE-COUNTER, optionally with a weight

Method: add ((accumulator sorted-reals) object &key)
Method: add ((moments central-sample-moments) (y real) &key weight)
Method: add (accumulator (object null) &key)
Generic Function: central-m2 (object &key weights)

Second central moment. For samples, normalized by the total weight (and thus not the unbiased estimator, see VARIANCE).

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: central-m2 (object &key weights)
Method: central-m2 ((object central-sample-moments) &key weights)
Generic Function: central-m3 (object &key weights)

Third central moment.

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: central-m3 (object &key weights)
Method: central-m3 ((object central-sample-moments) &key weights)
Generic Function: central-m4 (object &key weights)

Fourth central moment.

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: central-m4 (object &key weights)
Method: central-m4 ((object central-sample-moments) &key weights)
Generic Function: central-sample-moments (object &key degree weights)

Return a CENTRAL-SAMPLE-MOMENTS object that allows the calculation of the central sample moments of OBJECT up to the given DEGREE.

When WEIGHTS are given, they need to be a sequence of matching length.

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: central-sample-moments ((object null) &key degree weights)
Method: central-sample-moments ((moments central-sample-moments) &key degree weights)
Method: central-sample-moments ((sequence sequence) &key degree weights)
Generic Function: ensure-sorted-reals (object)

Return the contents of OBJECT as a SORTED-REALS.

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: ensure-sorted-reals ((sorted-reals sorted-reals))
Method: ensure-sorted-reals ((array array))
Method: ensure-sorted-reals ((list list))
Generic Function: kurtosis (object &key weights)

Kurtosis FIXME talk about bias, maybe implement unbiased?

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: kurtosis (object &key weights)
Method: kurtosis ((object central-sample-moments) &key weights)
Generic Function: mean (object &key weights)

The mean of elements in OBJECT.

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: mean (object &key weights)
Method: mean ((object central-sample-moments) &key weights)
Generic Function: median (object)

Median of OBJECT.

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: median ((sample sequence))

Returns median of SAMPLE. SAMPLE must be a sequence of real numbers.

Method: median (object)
Generic Function: quantile (object q)

Return an element at quantile Q. May be an interpolation or an approximation, depending on OBJECT and Q. NOTE: Extensions should define methods for QUANTILES, not QUANTILE.

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: quantile ((object sequence) q)
Method: quantile ((object r-univariate) q)
Method: quantile (object q)
Generic Function: quantiles (object qs)

Multiple quantiles (see QUANTILE). NOTE: Extensions should define methods for QUANTILES, not QUANTILE.

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: quantiles ((object sequence) qs)
Method: quantiles ((accumulator sorted-reals) q)
Generic Function: sd (object &key weights)

Standard deviation. For samples, the square root of the unbiased estimator (see VARIANCE).

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: sd (object &key weights)
Generic Function: skewness (object &key weights)

Skewness FIXME talk about bias, maybe implement unbiased?

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: skewness (object &key weights)
Method: skewness ((object central-sample-moments) &key weights)
Generic Function: tally (accumulator)

The total weight of elements in ACCUMULATOR.

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: tally ((accumulator sparse-counter))

Return the total ’weight’ of the accumulator

Method: tally ((accumulator tally-mixin))
Generic Function: variance (object &key weights)

Variance of OBJECT. For samples, normalized by the weight-1 (and thus unbiased if certain assumptions hold, eg weights that count frequencies).

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: variance (object &key weights)
Method: variance ((object central-sample-moments) &key weights)

4.1.5 Standalone methods

Method: as-alist ((object sparse-counter))

Return (OBJECT . COUNT) pairs as an alist.

Package

num-utils.utilities.

Source

nu-statistics.lisp.

Method: num= ((a central-sample-moments) (b central-sample-moments) &optional tolerance)
Package

num-utils.num=.

Source

nu-statistics.lisp.

Method: print-object ((acc sorted-reals) stream)
Source

nu-statistics.lisp.

Method: print-object ((sparse-counter sparse-counter) stream)
Source

nu-statistics.lisp.


4.1.6 Conditions

Condition: empty-accumulator
Package

nu.statistics.

Source

nu-statistics.lisp.

Direct superclasses

error.

Condition: information-not-collected-in-accumulator
Package

nu.statistics.

Source

nu-statistics.lisp.

Direct superclasses

error.

Condition: not-enough-elements-in-accumulator
Package

nu.statistics.

Source

nu-statistics.lisp.

Direct superclasses

error.


4.1.7 Structures

Structure: central-sample-moments

Central sample moments calculated on-line/single-pass.

M weighted mean
S2 weighted sum of squared deviations from the mean, not calculated when NIL S3 weighted sum of cubed deviations from the mean, not calculated when NIL S4 weighted sum of 4th power deviations from the mean, not calculated when NIL

Allows on-line, numerically stable calculation of moments. See cite{bennett2009numerically} and cite{pebay2008formulas} for the description of the algorithm. M_2, ..., M_4 in the paper are s2, ..., s4 in the code.

Package

nu.statistics.

Source

nu-statistics.lisp.

Direct superclasses

tally-mixin.

Direct methods
Direct slots
Slot: m
Type

real

Initform

0.0d0

Readers

central-sample-moments-m.

Writers

(setf central-sample-moments-m).

Slot: s2
Type

(or (real 0) null)

Initform

0.0d0

Readers

central-sample-moments-s2.

Writers

(setf central-sample-moments-s2).

Slot: s3
Type

(or real null)

Initform

0.0d0

Readers

central-sample-moments-s3.

Writers

(setf central-sample-moments-s3).

Slot: s4
Type

(or (real 0) null)

Initform

0.0d0

Readers

central-sample-moments-s4.

Writers

(setf central-sample-moments-s4).

Structure: sorted-reals

Accumulator which sorts elements. ELEMENTS return the sorted elements.

Package

nu.statistics.

Source

nu-statistics.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: ordered-elements
Type

vector

Initform

#()

Readers

sorted-reals-ordered-elements.

Writers

(setf sorted-reals-ordered-elements).

Slot: unordered-elements
Type

list

Readers

sorted-reals-unordered-elements.

Writers

(setf sorted-reals-unordered-elements).

Structure: sparse-counter
Package

nu.statistics.

Source

nu-statistics.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: table
Type

hash-table

Readers

sparse-counter-table.

Writers

This slot is read-only.


4.2 Internals


4.2.1 Macros

Macro: &sorted-reals (ordered-elements unordered-elements)

LET+ form for slots of the structure SORTED-REALS.

Package

nu.statistics.

Source

nu-statistics.lisp.

Macro: &sorted-reals-r/o (ordered-elements unordered-elements)

LET+ form for slots of the structure SORTED-REALS. Read-only.

Package

nu.statistics.

Source

nu-statistics.lisp.

Macro: define-central-sample-moment (function (variable degree) &body body)

FIXME documentation, factor out general part

Package

nu.statistics.

Source

nu-statistics.lisp.

Macro: underflow-goes-to-zero (&body body)

Protects against floating point underflow errors and sets the value to 0.0 instead.

Package

lh.statistics.

Source

lh-statistics.lisp.


4.2.2 Ordinary functions

Function: average-rank (value sorted-values)

Average rank calculation for non-parametric tests. Ranks are 1 based, but lisp is 0 based, so add 1!

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: beta-incomplete (a b x)

Adopted from CLASP 1.4.3, http://eksl-www.cs.umass.edu/clasp.html

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: binomial-le-probability (n k p)
Package

lh.statistics.

Source

lh-statistics.lisp.

Reader: central-sample-moments-m (instance)
Writer: (setf central-sample-moments-m) (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Target Slot

m.

Function: central-sample-moments-p (object)
Package

nu.statistics.

Source

nu-statistics.lisp.

Reader: central-sample-moments-s2 (instance)
Writer: (setf central-sample-moments-s2) (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Target Slot

s2.

Reader: central-sample-moments-s3 (instance)
Writer: (setf central-sample-moments-s3) (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Target Slot

s3.

Reader: central-sample-moments-s4 (instance)
Writer: (setf central-sample-moments-s4) (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Target Slot

s4.

Function: central-sample-moments-w (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: (setf central-sample-moments-w) (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: copy-central-sample-moments (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: copy-sorted-reals (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: copy-sparse-counter (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: copy-tally-mixin (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: error-function (x)

Adopted from CLASP 1.4.3, http://eksl-www.cs.umass.edu/clasp.html

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: error-function-complement (x)

Adopted from CLASP 1.4.3, http://eksl-www.cs.umass.edu/clasp.html

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: factorial (number)
Package

lh.statistics.

Source

lh-statistics.lisp.

Function: find-critical-value (p-function p-value &optional x-tolerance y-tolerance)

Adopted from CLASP 1.4.3, http://eksl-www.cs.umass.edu/clasp.html

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: gamma-incomplete (a x)

Adopted from CLASP 1.4.3, http://eksl-www.cs.umass.edu/clasp.html

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: gamma-ln (x)

Adopted from CLASP 1.4.3, http://eksl-www.cs.umass.edu/clasp.html

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: make-central-sample-moments (&key w m s2 s3 s4)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: make-sorted-reals (&key ordered-elements unordered-elements)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: make-sparse-counter% (&key table)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: make-tally-mixin (&key w)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: round-up (x)
Package

lh.statistics.

Source

lh-statistics.lisp.

Function: safe-exp (x)

Eliminates floating point underflow for the exponential function. Instead, it just returns 0.0d0

Package

lh.statistics.

Source

lh-statistics.lisp.

Function: sign (x)
Package

lh.statistics.

Source

lh-statistics.lisp.

Function: sort-reals (sequence)

Return a SORTED-REALS structure.

Package

nu.statistics.

Source

nu-statistics.lisp.

Reader: sorted-reals-ordered-elements (instance)
Writer: (setf sorted-reals-ordered-elements) (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Target Slot

ordered-elements.

Function: sorted-reals-p (object)
Package

nu.statistics.

Source

nu-statistics.lisp.

Reader: sorted-reals-unordered-elements (instance)
Writer: (setf sorted-reals-unordered-elements) (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Target Slot

unordered-elements.

Function: sparse-counter-p (object)
Package

nu.statistics.

Source

nu-statistics.lisp.

Function: tally-mixin-p (object)
Package

nu.statistics.

Source

nu-statistics.lisp.

Reader: tally-mixin-w (instance)
Writer: (setf tally-mixin-w) (instance)
Package

nu.statistics.

Source

nu-statistics.lisp.

Target Slot

w.

Function: weighted-empirical-quantile (sorted-reals p-table q)

Return the empirical quantile of a vector of real numbers, sorted in ascending order (not checked). Uses a 0.5 correction.

Package

nu.statistics.

Source

nu-statistics.lisp.

Function: weighted-quantile-p-table (weights)

Return table of probability brackets for weighted quantile calculations., built from the weights (which should be positive reals, not checked). Uses a 0.5 correction.

Package

nu.statistics.

Source

nu-statistics.lisp.


4.2.3 Generic functions

Generic Function: pool2 (accumulator1 accumulator2)

Pool two accumulators. When they are of a different type, the resulting accumulator will be downgraded to the level afforded by the information available in the accumulators.

Package

nu.statistics.

Source

nu-statistics.lisp.

Methods
Method: pool2 ((moments-a central-sample-moments) (moments-b central-sample-moments))

4.2.4 Structures

Structure: tally-mixin

Mixin structure that contains a tally. Not exported. W is the total weight.

Package

nu.statistics.

Source

nu-statistics.lisp.

Direct superclasses

structure-object.

Direct subclasses

central-sample-moments.

Direct methods

tally.

Direct slots
Slot: w
Type

(real 0)

Initform

0

Readers

tally-mixin-w.

Writers

(setf tally-mixin-w).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   &   (  
A   B   C   D   E   F   G   I   K   L   M   N   P   Q   R   S   T   U   V   W   Z  
Index Entry  Section

&
&sorted-reals: Private macros
&sorted-reals-r/o: Private macros

(
(setf central-sample-moments-m): Private ordinary functions
(setf central-sample-moments-s2): Private ordinary functions
(setf central-sample-moments-s3): Private ordinary functions
(setf central-sample-moments-s4): Private ordinary functions
(setf central-sample-moments-w): Private ordinary functions
(setf sorted-reals-ordered-elements): Private ordinary functions
(setf sorted-reals-unordered-elements): Private ordinary functions
(setf tally-mixin-w): Private ordinary functions

A
add: Public generic functions
add: Public generic functions
add: Public generic functions
add: Public generic functions
add: Public generic functions
as-alist: Public standalone methods
average-rank: Private ordinary functions

B
beta-incomplete: Private ordinary functions
bin-and-count: Public ordinary functions
binomial-cumulative-probability: Public ordinary functions
binomial-ge-probability: Public ordinary functions
binomial-le-probability: Private ordinary functions
binomial-probability: Public ordinary functions
binomial-probability-ci: Public ordinary functions
binomial-test-one-sample: Public ordinary functions
binomial-test-one-sample-sse: Public ordinary functions
binomial-test-paired-sse: Public ordinary functions
binomial-test-two-sample: Public ordinary functions
binomial-test-two-sample-sse: Public ordinary functions

C
central-m2: Public generic functions
central-m2: Public generic functions
central-m2: Public generic functions
central-m3: Public generic functions
central-m3: Public generic functions
central-m3: Public generic functions
central-m4: Public generic functions
central-m4: Public generic functions
central-m4: Public generic functions
central-sample-moments: Public generic functions
central-sample-moments: Public generic functions
central-sample-moments: Public generic functions
central-sample-moments: Public generic functions
central-sample-moments-degree: Public ordinary functions
central-sample-moments-m: Private ordinary functions
central-sample-moments-p: Private ordinary functions
central-sample-moments-s2: Private ordinary functions
central-sample-moments-s3: Private ordinary functions
central-sample-moments-s4: Private ordinary functions
central-sample-moments-w: Private ordinary functions
chi-square: Public ordinary functions
chi-square-cdf: Public ordinary functions
chi-square-test-for-trend: Public ordinary functions
chi-square-test-one-sample: Public ordinary functions
chi-square-test-rxc: Public ordinary functions
choose: Public ordinary functions
coefficient-of-variation: Public ordinary functions
convert-to-standard-normal: Public ordinary functions
copy-central-sample-moments: Private ordinary functions
copy-sorted-reals: Private ordinary functions
copy-sparse-counter: Private ordinary functions
copy-tally-mixin: Private ordinary functions
correlation-coefficient: Public ordinary functions
correlation-sse: Public ordinary functions
correlation-test-two-sample: Public ordinary functions
correlation-test-two-sample-on-sequences: Public ordinary functions
cross-tabulate: Public ordinary functions

D
define-central-sample-moment: Private macros

E
empirical-quantile: Public ordinary functions
empirical-quantile-probabilities: Public ordinary functions
ensure-sorted-reals: Public generic functions
ensure-sorted-reals: Public generic functions
ensure-sorted-reals: Public generic functions
ensure-sorted-reals: Public generic functions
ensure-sorted-vector: Public ordinary functions
error-function: Private ordinary functions
error-function-complement: Private ordinary functions

F
f-significance: Public ordinary functions
f-test: Public ordinary functions
factorial: Private ordinary functions
false-discovery-correction: Public ordinary functions
find-critical-value: Private ordinary functions
fisher-exact-test: Public ordinary functions
fisher-z-transform: Public ordinary functions
fivenum: Public ordinary functions
Function, (setf central-sample-moments-m): Private ordinary functions
Function, (setf central-sample-moments-s2): Private ordinary functions
Function, (setf central-sample-moments-s3): Private ordinary functions
Function, (setf central-sample-moments-s4): Private ordinary functions
Function, (setf central-sample-moments-w): Private ordinary functions
Function, (setf sorted-reals-ordered-elements): Private ordinary functions
Function, (setf sorted-reals-unordered-elements): Private ordinary functions
Function, (setf tally-mixin-w): Private ordinary functions
Function, average-rank: Private ordinary functions
Function, beta-incomplete: Private ordinary functions
Function, bin-and-count: Public ordinary functions
Function, binomial-cumulative-probability: Public ordinary functions
Function, binomial-ge-probability: Public ordinary functions
Function, binomial-le-probability: Private ordinary functions
Function, binomial-probability: Public ordinary functions
Function, binomial-probability-ci: Public ordinary functions
Function, binomial-test-one-sample: Public ordinary functions
Function, binomial-test-one-sample-sse: Public ordinary functions
Function, binomial-test-paired-sse: Public ordinary functions
Function, binomial-test-two-sample: Public ordinary functions
Function, binomial-test-two-sample-sse: Public ordinary functions
Function, central-sample-moments-degree: Public ordinary functions
Function, central-sample-moments-m: Private ordinary functions
Function, central-sample-moments-p: Private ordinary functions
Function, central-sample-moments-s2: Private ordinary functions
Function, central-sample-moments-s3: Private ordinary functions
Function, central-sample-moments-s4: Private ordinary functions
Function, central-sample-moments-w: Private ordinary functions
Function, chi-square: Public ordinary functions
Function, chi-square-cdf: Public ordinary functions
Function, chi-square-test-for-trend: Public ordinary functions
Function, chi-square-test-one-sample: Public ordinary functions
Function, chi-square-test-rxc: Public ordinary functions
Function, choose: Public ordinary functions
Function, coefficient-of-variation: Public ordinary functions
Function, convert-to-standard-normal: Public ordinary functions
Function, copy-central-sample-moments: Private ordinary functions
Function, copy-sorted-reals: Private ordinary functions
Function, copy-sparse-counter: Private ordinary functions
Function, copy-tally-mixin: Private ordinary functions
Function, correlation-coefficient: Public ordinary functions
Function, correlation-sse: Public ordinary functions
Function, correlation-test-two-sample: Public ordinary functions
Function, correlation-test-two-sample-on-sequences: Public ordinary functions
Function, cross-tabulate: Public ordinary functions
Function, empirical-quantile: Public ordinary functions
Function, empirical-quantile-probabilities: Public ordinary functions
Function, ensure-sorted-vector: Public ordinary functions
Function, error-function: Private ordinary functions
Function, error-function-complement: Private ordinary functions
Function, f-significance: Public ordinary functions
Function, f-test: Public ordinary functions
Function, factorial: Private ordinary functions
Function, false-discovery-correction: Public ordinary functions
Function, find-critical-value: Private ordinary functions
Function, fisher-exact-test: Public ordinary functions
Function, fisher-z-transform: Public ordinary functions
Function, fivenum: Public ordinary functions
Function, gamma-incomplete: Private ordinary functions
Function, gamma-ln: Private ordinary functions
Function, geometric-mean: Public ordinary functions
Function, interquartile-range: Public ordinary functions
Function, linear-regression: Public ordinary functions
Function, make-central-sample-moments: Private ordinary functions
Function, make-sorted-reals: Private ordinary functions
Function, make-sparse-counter: Public ordinary functions
Function, make-sparse-counter%: Private ordinary functions
Function, make-tally-mixin: Private ordinary functions
Function, mcnemars-test: Public ordinary functions
Function, mean: Public ordinary functions
Function, mean: Public ordinary functions
Function, mean-sd-n: Public ordinary functions
Function, median: Public ordinary functions
Function, mode: Public ordinary functions
Function, normal-mean-ci: Public ordinary functions
Function, normal-mean-ci-on-sequence: Public ordinary functions
Function, normal-pdf: Public ordinary functions
Function, normal-sd-ci: Public ordinary functions
Function, normal-sd-ci-on-sequence: Public ordinary functions
Function, normal-variance-ci: Public ordinary functions
Function, normal-variance-ci-on-sequence: Public ordinary functions
Function, percentile: Public ordinary functions
Function, permutations: Public ordinary functions
Function, phi: Public ordinary functions
Function, poisson-cumulative-probability: Public ordinary functions
Function, poisson-ge-probability: Public ordinary functions
Function, poisson-mu-ci: Public ordinary functions
Function, poisson-probability: Public ordinary functions
Function, poisson-test-one-sample: Public ordinary functions
Function, pool: Public ordinary functions
Function, random-normal: Public ordinary functions
Function, random-pick: Public ordinary functions
Function, random-sample: Public ordinary functions
Function, round-float: Public ordinary functions
Function, round-up: Private ordinary functions
Function, safe-exp: Private ordinary functions
Function, sample-range: Public ordinary functions
Function, sd: Public ordinary functions
Function, sign: Private ordinary functions
Function, sign-test: Public ordinary functions
Function, sign-test-on-sequences: Public ordinary functions
Function, sort-reals: Private ordinary functions
Function, sorted-reals-elements: Public ordinary functions
Function, sorted-reals-ordered-elements: Private ordinary functions
Function, sorted-reals-p: Private ordinary functions
Function, sorted-reals-unordered-elements: Private ordinary functions
Function, sparse-counter-count: Public ordinary functions
Function, sparse-counter-p: Private ordinary functions
Function, sparse-counter-table: Public ordinary functions
Function, spearman-rank-correlation: Public ordinary functions
Function, standard-deviation: Public ordinary functions
Function, standard-error-of-the-mean: Public ordinary functions
Function, t-distribution: Public ordinary functions
Function, t-significance: Public ordinary functions
Function, t-test-one-sample: Public ordinary functions
Function, t-test-one-sample-on-sequence: Public ordinary functions
Function, t-test-one-sample-sse: Public ordinary functions
Function, t-test-paired: Public ordinary functions
Function, t-test-paired-on-sequences: Public ordinary functions
Function, t-test-paired-sse: Public ordinary functions
Function, t-test-two-sample: Public ordinary functions
Function, t-test-two-sample-on-sequences: Public ordinary functions
Function, t-test-two-sample-sse: Public ordinary functions
Function, tabulate: Public ordinary functions
Function, tally-mixin-p: Private ordinary functions
Function, tally-mixin-w: Private ordinary functions
Function, variance: Public ordinary functions
Function, variance: Public ordinary functions
Function, weighted-empirical-quantile: Private ordinary functions
Function, weighted-quantile-p-table: Private ordinary functions
Function, weighted-quantiles: Public ordinary functions
Function, wilcoxon-signed-rank-test: Public ordinary functions
Function, wilcoxon-signed-rank-test-on-sequences: Public ordinary functions
Function, z: Public ordinary functions
Function, z-test: Public ordinary functions
Function, z-test-on-sequence: Public ordinary functions

G
gamma-incomplete: Private ordinary functions
gamma-ln: Private ordinary functions
Generic Function, add: Public generic functions
Generic Function, central-m2: Public generic functions
Generic Function, central-m3: Public generic functions
Generic Function, central-m4: Public generic functions
Generic Function, central-sample-moments: Public generic functions
Generic Function, ensure-sorted-reals: Public generic functions
Generic Function, kurtosis: Public generic functions
Generic Function, mean: Public generic functions
Generic Function, median: Public generic functions
Generic Function, pool2: Private generic functions
Generic Function, quantile: Public generic functions
Generic Function, quantiles: Public generic functions
Generic Function, sd: Public generic functions
Generic Function, skewness: Public generic functions
Generic Function, tally: Public generic functions
Generic Function, variance: Public generic functions
geometric-mean: Public ordinary functions

I
interquartile-range: Public ordinary functions

K
kurtosis: Public generic functions
kurtosis: Public generic functions
kurtosis: Public generic functions

L
linear-regression: Public ordinary functions

M
Macro, &sorted-reals: Private macros
Macro, &sorted-reals-r/o: Private macros
Macro, define-central-sample-moment: Private macros
Macro, square: Public macros
Macro, test-variables: Public macros
Macro, underflow-goes-to-zero: Private macros
make-central-sample-moments: Private ordinary functions
make-sorted-reals: Private ordinary functions
make-sparse-counter: Public ordinary functions
make-sparse-counter%: Private ordinary functions
make-tally-mixin: Private ordinary functions
mcnemars-test: Public ordinary functions
mean: Public ordinary functions
mean: Public ordinary functions
mean: Public generic functions
mean: Public generic functions
mean: Public generic functions
mean-sd-n: Public ordinary functions
median: Public ordinary functions
median: Public generic functions
median: Public generic functions
median: Public generic functions
Method, add: Public generic functions
Method, add: Public generic functions
Method, add: Public generic functions
Method, add: Public generic functions
Method, as-alist: Public standalone methods
Method, central-m2: Public generic functions
Method, central-m2: Public generic functions
Method, central-m3: Public generic functions
Method, central-m3: Public generic functions
Method, central-m4: Public generic functions
Method, central-m4: Public generic functions
Method, central-sample-moments: Public generic functions
Method, central-sample-moments: Public generic functions
Method, central-sample-moments: Public generic functions
Method, ensure-sorted-reals: Public generic functions
Method, ensure-sorted-reals: Public generic functions
Method, ensure-sorted-reals: Public generic functions
Method, kurtosis: Public generic functions
Method, kurtosis: Public generic functions
Method, mean: Public generic functions
Method, mean: Public generic functions
Method, median: Public generic functions
Method, median: Public generic functions
Method, num=: Public standalone methods
Method, pool2: Private generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, quantile: Public generic functions
Method, quantile: Public generic functions
Method, quantile: Public generic functions
Method, quantiles: Public generic functions
Method, quantiles: Public generic functions
Method, sd: Public generic functions
Method, skewness: Public generic functions
Method, skewness: Public generic functions
Method, tally: Public generic functions
Method, tally: Public generic functions
Method, variance: Public generic functions
Method, variance: Public generic functions
mode: Public ordinary functions

N
normal-mean-ci: Public ordinary functions
normal-mean-ci-on-sequence: Public ordinary functions
normal-pdf: Public ordinary functions
normal-sd-ci: Public ordinary functions
normal-sd-ci-on-sequence: Public ordinary functions
normal-variance-ci: Public ordinary functions
normal-variance-ci-on-sequence: Public ordinary functions
num=: Public standalone methods

P
percentile: Public ordinary functions
permutations: Public ordinary functions
phi: Public ordinary functions
poisson-cumulative-probability: Public ordinary functions
poisson-ge-probability: Public ordinary functions
poisson-mu-ci: Public ordinary functions
poisson-probability: Public ordinary functions
poisson-test-one-sample: Public ordinary functions
pool: Public ordinary functions
pool2: Private generic functions
pool2: Private generic functions
print-object: Public standalone methods
print-object: Public standalone methods

Q
quantile: Public generic functions
quantile: Public generic functions
quantile: Public generic functions
quantile: Public generic functions
quantiles: Public generic functions
quantiles: Public generic functions
quantiles: Public generic functions

R
random-normal: Public ordinary functions
random-pick: Public ordinary functions
random-sample: Public ordinary functions
round-float: Public ordinary functions
round-up: Private ordinary functions

S
safe-exp: Private ordinary functions
sample-range: Public ordinary functions
sd: Public ordinary functions
sd: Public generic functions
sd: Public generic functions
sign: Private ordinary functions
sign-test: Public ordinary functions
sign-test-on-sequences: Public ordinary functions
skewness: Public generic functions
skewness: Public generic functions
skewness: Public generic functions
sort-reals: Private ordinary functions
sorted-reals-elements: Public ordinary functions
sorted-reals-ordered-elements: Private ordinary functions
sorted-reals-p: Private ordinary functions
sorted-reals-unordered-elements: Private ordinary functions
sparse-counter-count: Public ordinary functions
sparse-counter-p: Private ordinary functions
sparse-counter-table: Public ordinary functions
spearman-rank-correlation: Public ordinary functions
square: Public macros
standard-deviation: Public ordinary functions
standard-error-of-the-mean: Public ordinary functions

T
t-distribution: Public ordinary functions
t-significance: Public ordinary functions
t-test-one-sample: Public ordinary functions
t-test-one-sample-on-sequence: Public ordinary functions
t-test-one-sample-sse: Public ordinary functions
t-test-paired: Public ordinary functions
t-test-paired-on-sequences: Public ordinary functions
t-test-paired-sse: Public ordinary functions
t-test-two-sample: Public ordinary functions
t-test-two-sample-on-sequences: Public ordinary functions
t-test-two-sample-sse: Public ordinary functions
tabulate: Public ordinary functions
tally: Public generic functions
tally: Public generic functions
tally: Public generic functions
tally-mixin-p: Private ordinary functions
tally-mixin-w: Private ordinary functions
test-variables: Public macros

U
underflow-goes-to-zero: Private macros

V
variance: Public ordinary functions
variance: Public ordinary functions
variance: Public generic functions
variance: Public generic functions
variance: Public generic functions

W
weighted-empirical-quantile: Private ordinary functions
weighted-quantile-p-table: Private ordinary functions
weighted-quantiles: Public ordinary functions
wilcoxon-signed-rank-test: Public ordinary functions
wilcoxon-signed-rank-test-on-sequences: Public ordinary functions

Z
z: Public ordinary functions
z-test: Public ordinary functions
z-test-on-sequence: Public ordinary functions

Jump to:   &   (  
A   B   C   D   E   F   G   I   K   L   M   N   P   Q   R   S   T   U   V   W   Z  

A.4 Data types

Jump to:   C   E   F   I   L   N   P   S   T  
Index Entry  Section

C
central-sample-moments: Public structures
Condition, empty-accumulator: Public conditions
Condition, information-not-collected-in-accumulator: Public conditions
Condition, not-enough-elements-in-accumulator: Public conditions

E
empty-accumulator: Public conditions

F
File, lh-statistics.lisp: The statistics/lh-statistics․lisp file
File, license: The statistics/license file
File, ls-statistics.lisp: The statistics/ls-statistics․lisp file
File, nu-statistics.lisp: The statistics/nu-statistics․lisp file
File, pkgdcl.lisp: The statistics/pkgdcl․lisp file
File, statistics.asd: The statistics/statistics․asd file

I
information-not-collected-in-accumulator: Public conditions

L
lh-statistics.lisp: The statistics/lh-statistics․lisp file
lh.statistics: The lh․statistics package
license: The statistics/license file
ls-statistics.lisp: The statistics/ls-statistics․lisp file
ls.statistics: The ls․statistics package

N
not-enough-elements-in-accumulator: Public conditions
nu-statistics.lisp: The statistics/nu-statistics․lisp file
nu.statistics: The nu․statistics package

P
Package, lh.statistics: The lh․statistics package
Package, ls.statistics: The ls․statistics package
Package, nu.statistics: The nu․statistics package
Package, statistics-1: The statistics-1 package
pkgdcl.lisp: The statistics/pkgdcl․lisp file

S
sorted-reals: Public structures
sparse-counter: Public structures
statistics: The statistics system
statistics-1: The statistics-1 package
statistics.asd: The statistics/statistics․asd file
Structure, central-sample-moments: Public structures
Structure, sorted-reals: Public structures
Structure, sparse-counter: Public structures
Structure, tally-mixin: Private structures
System, statistics: The statistics system

T
tally-mixin: Private structures

Jump to:   C   E   F   I   L   N   P   S   T