meta numerics

Meta.Numerics library features include complex numbers and other mathematical objects, special functions, numerical calculus, statistics and data analysis, linear algebra, and Fourier transforms.

Mathematical Objects

Meta.Numerics defines several specialized mathematical objects:

  • Complex numbers
  • Matrices
  • Spinors
  • Uncertain values

For each type, appropriate arithmetic operations are defined and associated classes implement appropriate operations.

Advanced Functions

The library defines a large number of advanced mathematical function on real numbers, Complex numbers, and integers. The real and complex advanced functions are summarized in the following table.

Function Real Complex Notes
Gamma yes yes also ln Γ, incomplete Gamma
Psi (Digamma) yes yes also polygamma ψ(n)
Beta yes   also incomplete Beta
Error Function yes yes also erfc, erf-1, Faddeeva, Fresnel C and S
Exponential Integrals yes yes includes Ein, Ei, En, and trigonometric integrals Ci and Si
Bessel J and Y yes   also for non-integer orders, spherical Bessel j and y
Modified Bessel I and K yes   also for non-integer orders, Airy Ai and Bi
Coulomb Wave Functions F and G yes   accurate even in quantum tunneling region
Reimann Zeta yes yes also Dirichlet η
Dilogarithm Li2 (Spence's Function) yes yes  
Orthogonal polynomials yes   Chebyshev T, Hermite H, Legendre P, Laguerre L, Zernike R
Elliptic Integrals yes   Legendre F, K, E; Carlson RF and RD

Functions of integers include factorials, double factorials, binomial coefficients, partitions, primality testing, greatest common denominators (GCD) and least common multiples (LCM).

Spinor functions include 3j symbols (Clebsch-Gordon coefficients) and 6j symbols.

Numerical Analysis

For arbitrary user-supplied functions, Meta.Numerics supports root-finding, optimization, and integration and differentiation. Some operations are supported on functions on RN as well as functions on R.

Function Property one-dimensional multi-dimensional
maxima and minima yes yes
roots yes yes
integration yes  
differentiation yes  

Statistics and Data Analysis

Data Collections

The library provides specialized classes for working with various types of data, including:

  • Univariate Samples
  • Bivariate Samples
  • Multivariate Samples
  • Experimental Data with Error Bars
  • Contingency Tables

For each kind of data, methods allow you to evaluate descriptive statistics, fit models, and perform appropriate statisical tests. All fits produce not just the best-fit parameter set, but also error bars, a covariance matrix, and a goodness-of-fit test. Specialized methods make it easy to load data for analysis from a database or spreadsheet.

Statistical Tests

Some of the many statistical tests supported by the library include:

Parametric Test Nonparametric Alternative Purpose
one-sample t-test sign test compare a sample's mean or median to a reference value
two-sample t-test Mann-Whitney U-test compare the means or medians of two samples
one-way ANOVA Kruskal-Wallis compare the means or medians of three or more samples
Pearson's r Spearman's rho, Kendall's tau detect association between two continuous variables
Pearson's χ2 test, Kendall's exact test detect associated between two categorical variables
Kolmogorov-Smirnov test, Kuiper test compare continuous sample data to a reference distribution

Distributions

Meta.Numerics defines a large number of probability distributions, both continuous:

Beta Chi Square Exponential Fisher's F Gamma
Kolmogorov Kuiper Logistic Lognormal Normal
Pareto Pearson's r Student's t Triangular Uniform
Wald Weibull

and discrete:

Bernoulli Binomial Geometric Poisson Uniform

For all defined distributions, you can obtain:

  • Basic Descriptive Statistics: mean, median, variance, standard deviation, skewness
  • Probability Mass and Probability Density Function (PDF) values
  • Cumulative Distribution Function (CDF) values, integrated from the left or right
  • Inverse CDF values, i.e. percentile to score conversions
  • Arbitrary raw and central moments
  • Random deviates

You can also fit sample data to many of the distributions.

Matrix Algebra

The library defines a number of matrix classes: rectangular, square, symmetric, and tridiagonal. Each class defines operations appropriate to that matrix type, implemented to exploit the matrix structure for optimum performance. The following table summarizes the available operations:

Operation Rectangular Square Symmetric Tridiagonal
Arithmetic yes yes yes yes
Decomposition yes yes yes yes
Determinant   yes yes yes
Inverse   yes yes yes
Eigenvalues and Eigenvectors   yes yes yes

Available decompositions include LU, QR, and singular value decompositions (SVD).