LispPad
  • Home
  • Applications
    • 🖥️LispPad
      • Sessions
      • Editor
      • Preferences
    • 📱LispPad Go
    • 📜Language
    • 📖Libraries
  • Libraries
    • ⚙️LispKit
      • (lispkit archive tar)
      • (lispkit archive zip)
      • (lispkit base)
      • (lispkit bitset)
      • (lispkit box)
      • (lispkit bytevector)
      • (lispkit char)
      • (lispkit char-set)
      • (lispkit combinator)
      • (lispkit comparator)
      • (lispkit control)
      • (lispkit core)
      • (lispkit crypto)
      • (lispkit csv)
      • (lispkit datatype)
      • (lispkit date-time)
      • (lispkit debug)
      • (lispkit disjoint-set)
      • (lispkit draw)
      • (lispkit draw turtle)
      • (lispkit draw barcode)
      • (lispkit draw chart bar)
      • (lispkit dynamic)
      • (lispkit enum)
      • (lispkit format)
      • (lispkit graph)
      • (lispkit gvector)
      • (lispkit hashtable)
      • (lispkit heap)
      • (lispkit http)
      • (lispkit http oauth)
      • (lispkit http server)
      • (lispkit iterate)
      • (lispkit json)
      • (lispkit json schema)
      • (lispkit list)
      • (lispkit list set)
      • (lispkit log)
      • (lispkit markdown)
      • (lispkit match)
      • (lispkit math)
      • (lispkit math matrix)
      • (lispkit math stats)
      • (lispkit math util)
      • (lispkit object)
      • (lispkit port)
      • (lispkit prolog)
      • (lispkit queue)
      • (lispkit record)
      • (lispkit regexp)
      • (lispkit serialize)
      • (lispkit set)
      • (lispkit sqlite)
      • (lispkit stack)
      • (lispkit stream)
      • (lispkit string)
      • (lispkit styled-text)
      • (lispkit system)
      • (lispkit system call)
      • (lispkit system keychain)
      • (lispkit system pasteboard)
      • (lispkit test)
      • (lispkit text-table)
      • (lispkit thread)
      • (lispkit thread channel)
      • (lispkit-thread-future)
      • (lispkit thread shared-queue)
      • (lispkit type)
      • (lispkit url)
      • (lispkit vector)
    • ⚙️LispPad
      • (lisppad applescript)
      • (lisppad draw map)
      • (lisppad location)
      • (lisppad speech)
      • (lisppad system)
      • (lisppad turtle)
    • ⚙️SRFI
  • Examples
    • 📝LispKit
    • 📝LispPad
    • 📝LispPad Go
  • Releases
    • 🖥️LispPad
    • 📱LispPad Go
  • Downloads
  • Privacy Policy
  • Contact
Powered by GitBook
On this page
  1. Libraries
  2. LispKit

(lispkit math stats)

Last updated 6 months ago

Library (lispkit math stats) implements statistical utility functions. The functions compute summary values for collections of samples, and functions for managing sequences of samples. Most of the functions accept a list of real numbers corresponding to sample values.


(mode xs)

Computes the mode of a set of numbers xs. The mode is the value that appears most often in xs. xs is a proper list of numeric values. = is used as the equality operator.

(mean xs)

Computes the arithmetic mean of a set of numbers xs. xs is a proper list of numeric values.

(range xs)

Computes the range of a set of numbers xs, i.e. the difference between the largest and the smallest value. xs is a proper list of numeric values which are ordered using the < relation.

(variance xs) (variance xs bias)

Computes the variance for a set of numbers xs, optionally applying bias correction. xs is a proper list of numeric values. Bias correction gets enabled by setting bias to #t. Alternatively, it is possible to provide a positive integer, which is used instead of the number of elements in xs.

(stddev xs) (stddev xs bias)

Computes the standard deviation for a set of numbers xs, optionally applying bias correction. xs is a proper list of numeric values. Bias correction gets enabled by setting bias to #t. Alternatively, it is possible to provide a positive integer, which is used instead of the number of elements in xs.

(skewness xs) (skewness xs bias)

Computes the skewness for a set of numbers xs, optionally applying bias correction. xs is a proper list of numeric values. Bias correction gets enabled by setting bias to #t. Alternatively, it is possible to provide a positive integer, which is used instead of the number of elements in xs.

(kurtosis xs) (kurtosis xs bias)

Computes the kurtosis for a set of numbers xs, optionally applying bias correction. xs is a proper list of numeric values. Bias correction gets enabled by setting bias to #t. Alternatively, it is possible to provide a positive integer, which is used instead of the number of elements in xs.

(absdev xs)

Computes the average absolute difference between the numbers in list xs and (median xs).

Computes the p-quantile for a set of numbers xs (also known as the inverse cumulative distribution). p is a real number between 0 and 1.0. For instance, the 0.5-quantile corresponds to the median.

Computes the percentile for a set of numbers xs and a given percentage pct. pct is a number between 0 and 100. For instance, the 90th percentile corresponds to the 0.9-quantile.

Computes the median for a set of numbers xs.

Returns the interquartile range for a given set of numbers xs. xs is a proper list of numeric values. The interquartile range is the difference between the 0.75-quantile and the 0.25-quantile.

Returns a list of 5 statistics describing the set of numbers xs: the minimum value, the lower quartile, the median, the upper quartile, and the maximum value.

Computes the covariance of two sets of numbers xs and ys. Both xs and ys are proper lists of numbers. Bias correction can be enabled by setting bias to #t. Alternatively, it is possible to provide a positive integer, which is used instead of the number of elements in xs.

Computes the correlation of two sets of numbers xs and ys in form of the Pearson product-moment correlation coefficient. Both xs and ys are proper lists of numbers. Bias correction can be enabled by setting bias to #t. Alternatively, it is possible to provide a positive integer, which is used instead of the number of elements in xs.

(quantile xs p)

(percentile xs pct)

(median xs)

(interquartile-range xs)

(five-number-summary xs)

(covariance xs ys) (covariance xs ys bias)

(correlation xs ys) (correlation xs ys bias)

⚙️