Wolfram Language Fast Introduction for Math Students
Get Started »

Statistics

In the Wolfram Language, statistical functions accept either lists or symbolic distributions as an argument.

Compute the mean of a list of numbers:

In[1]:=
Click for copyable input
Mean[{1, 2, 4, 5}]
Out[1]=

Find the correlation of multiple lists:

In[2]:=
Click for copyable input
Correlation[{1, 3, 5}, {6, 4, 2}]
Out[2]=

Find the standard deviation of a Poisson distribution:

In[3]:=
Click for copyable input
StandardDeviation[PoissonDistribution[2]]
Out[3]=

Calculate the moment of a list of symbols:

In[1]:=
Click for copyable input
Moment[{x, y, z}, 2]
Out[1]=

Get the moment-generating function for a distribution:

(Type ESCmESC for μ and ESCsESC for σ.)
In[2]:=
Click for copyable input
MomentGeneratingFunction[NormalDistribution[\[Mu], \[Sigma]], t]
Out[2]=

Generate statistical data with RandomVariate:

(Use //Short to get a short summary of output.)
In[1]:=
Click for copyable input
RandomVariate[NormalDistribution[0, 1], {500, 2}] // Short
Out[1]=

Visualize the resulting data:

In[2]:=
Click for copyable input
Histogram3D[%]
Out[2]=

QUICK REFERENCE: Statistical Moments and Generating Functions »

QUICK REFERENCE: Statistical Visualization »