meta numerics

Meta.Numerics library features include advanced functions, function analysis (solvers), statistics and data analysis, linear algebra, and Fourier transforms.

Advanced Functions

The library defines a large number of simple and advanced mathematical functions on real numbers, Complex numbers, integers, and other specialized mathematical objects.

Advanced functions of real and complex numbers include:

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 also polylogarithm Lin
Orthogonal polynomials yes   Chebyshev T, Hermite H, Legendre P, Laguerre L, Zernike R
Elliptic Integrals yes   Legendre F, K, E; Carlson RF and RD, and RG
Elliptic Functions yes   Jacobi cn, sn, and dn

Advanced functions of integers include:

Meta.Numerics also defines various specialized mathematical objects and associated functions:

Object Functions
Complex numbers arithmetic, basic and advanced functions
Vectors and matrices arithmetic, inversion, decompositions
Spinors Clebsch-Gordon coefficients, 3j and 6j symbols
Uncertain values arithmetic and basic functions with error propagation, confidence intervals
Polynomials arithmetic, evaluation, composition, integration and differentiation
Permutations generation, multiplication, inversion, cyclic decomposition and other properties
Integer partitions generation

Numerical Function Analysis (Solvers)

For arbitrary user-supplied functions, Meta.Numerics supports optimization (minimization and maximization), root-finding, integration, and the solution of ordinary differential equations. All operations are supported on multi-dimensional functions as well as functions of simple real numbers.

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

Statistics and Data Analysis

Data Analysis

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

Data Functionality
Univariate Sample sample and population statistics, transformations, percentile score conversion, fit to distributions, parametric and non-parametric tests
Bivariate Sample sample and population statistics, regression (linear, polynomial, non-linear, logistic), parametric and non-parametric tests
Experimental Data with Error Bars fit to line, constant, proportionality, polynomial, non-linear function, linear combination of functions
Contingency Table sample and population statistics, parametric and non-parametric tests
Histograms sample and population statistics, fit to distributions, parametric tests
Time Series sample and population statistics, power spectrum, difference and integrate, fit to AR and MA models

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 add, remove, update, and locate data.

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 and two-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, Kuiper compare continuous sample data to a reference distribution
Ljung-Box test detect autocorrelation in time series

For all tests, we provide exact null distributions for small samples.


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

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

and discrete:

Bernoulli Binomial Geometric
Negative Binomial Poisson Uniform

For all defined distributions, you can obtain:

  • Basic Descriptive Statistics: mean, median, variance, standard deviation, skewness, excess kurtosis
  • 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 moments, central moments, and cumulants
  • Random deviates

You can also fit sample data to many of the distributions and perform maximum likelyhood fits to any user-supplied distribution.

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).