This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
How to | Calculate Basic Descriptive Statistics
Mathematica has many powerful features, to handle a wide range of statistical needs. Some of the most elementary are outlined below.
Here is some data (20 random real numbers between 0 and 50):
In[41]:=
Click for copyable input
Out[41]=
Use Mean to find the mean of :
In[42]:=
Click for copyable input
Out[42]=
Use Median to find the median:
In[43]:=
Click for copyable input
Out[43]=
Use Max to find the maximum element:
In[44]:=
Click for copyable input
Out[44]=
You can also find the Variance and the StandardDeviation:
In[45]:=
Click for copyable input
Out[45]=
In[46]:=
Click for copyable input
Out[46]=
If you want to figure out quantiles, you can use Quantile. The first argument is a set of data; the second is a number between 0 and 1:
In[47]:=
Click for copyable input
Out[47]=
If you want to find out quartiles or percentiles, you can use Quantile with an argument of or , respectively:
In[48]:=
Click for copyable input
Out[48]=
If you would like a list of the quartiles, use the Quartiles function:
In[49]:=
Click for copyable input
Out[49]=