MATHEMATICA GUIDE

# Random Variables

A random variable—unlike a normal variable—does not have a specific value, but rather a range of values and a density that gives different probabilities of obtaining values for each subset. This can be used to model uncertainty, whether from incomplete or simplified models. Random variables are used extensively in areas such as social science, science, engineering, and finance.

Mathematica uses symbolic distributions to represent a random variable. In Mathematica, you can directly compute several dozen properties from symbolic distributions, including finding the probability of an arbitrary event or simulating it to generate data. Mathematica has the largest collection of parametric distributions ever assembled, and parametric distributions can be automatically estimated from data. Mathematica provides nonparametric distributions directly computed from data, automating and generalizing the many nonparametric methods in use for specific properties. Distributions can be derived from other distributions or given by formulas for distribution functions, giving infinite extensibility to the whole framework.

## ReferenceReference

Probability compute probabilities of predicates given distributions

Expectation compute expectations of expressions given distributions

### Simulation & Estimation

RandomVariate generate random variates from a distribution

EstimatedDistribution estimate parametric or derived distribution from data

FindDistributionParameters find parameter estimates as rules

### Hypothesis Testing »

DistributionFitTest test how well data and a distribution fit

### Distribution-Related Functions »

PDF probability density function

CDF cumulative distribution function

### Moments and Generating Functions »

Moment moments of distributions and data

### Parametric Distributions »

NormalDistribution univariate normal distribution

MultinormalDistribution multivariate normal distribution

### Nonparametric Distributions »

HistogramDistribution distribution constructed from a histogram of data

SmoothKernelDistribution distribution constructed from smoothing of data

### Derived Distributions »

TransformedDistribution distribution of a function of a random variable

CopulaDistribution distribution from kernel and marginal distributions

### Formula Distributions

ProbabilityDistribution distribution constructed from a distribution function

### Statistical Visualization »

QuantilePlot quantile-quantile plot of distributions and data

ProbabilityScalePlot normal plot, Weibull plot, etc.

### Computable Data »

Import import data from a variety of formats

ExampleData special statistics data collection

New to Mathematica? Find your learning path »
Have a question? Ask support »