compute seven summary statistics for a data sample - Maple Help

Home : Support : Online Help : Statistics : Statistics Package : Summary and Tabulation : Statistics/DataSummary

Statistics[DataSummary] - compute seven summary statistics for a data sample

 Calling Sequence DataSummary(A, options)

Parameters

 A - options - (optional) equation(s) of the form option=value where option is one of ignore, output or weights; specify options for the DataSummary function

Description

 • The DataSummary function computes seven summary statistics for the data set A. These include the mean, standard deviation, coefficient of skewness, coefficient of kurtosis, minimum, maximum and the cumulative weight of a data sample. By default the DataSummary command returns a column vector of equations of the form quantity=value where quantity is one of mean, standarddeviation, skewness, kurtosis, minimum, maximum, or cumulativeweight.
 • The first parameter A is the data set - such as a Vector.

Computation

 • All computations involving data are performed in floating-point; therefore, all data provided must have type realcons and all returned solutions are floating-point, even if the problem is specified with exact values.

Options

 The options argument can contain one or more of the options shown below. Some of these options are described in more detail in the Statistics[DescriptiveStatistics] help page.
 • ignore=truefalse -- This option controls how missing data is handled by the DataSummary command. Missing items are represented by undefined or Float(undefined). So, if ignore=false and A contains missing data, most of the statistics command will yield undefined. If ignore=true all missing items in A will be ignored. The default value is false.
 • output=default or quantity where quantity is any of mean, standarddeviation, skewness, kurtosis, minimum, maximum and cumulativeweight, indicates which quantities need be calculated. The value of this option can also be a list. In this case the DataSummary command will return a list of the specified quantities in the specified order.
 • weights=Vector -- Data weights. The number of elements in the weights array must be equal to the number of elements in the original data sample. By default all elements in A are assigned weight $1$.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$
 > $X:=\mathrm{RandomVariable}\left(\mathrm{Normal}\left(10,3\right)\right):$
 > $A:=\mathrm{Sample}\left(X,{10}^{4}\right):$
 > $\mathrm{DataSummary}\left(A\right)$
 $\left[\begin{array}{c}{\mathrm{mean}}{=}{9.92990696764101}\\ {\mathrm{standarddeviation}}{=}{2.98545650773550}\\ {\mathrm{skewness}}{=}{-}{0.0320507381512090}\\ {\mathrm{kurtosis}}{=}{2.98747405235129}\\ {\mathrm{minimum}}{=}{-}{1.61166425663017}\\ {\mathrm{maximum}}{=}{20.7830118018693}\\ {\mathrm{cumulativeweight}}{=}{10000.}\end{array}\right]$ (1)
 > $\mathrm{DataSummary}\left(A,\mathrm{output}=\left[\mathrm{mean},\mathrm{standarddeviation}\right]\right)$
 $\left[{9.92990696764101}{,}{2.98545650773550}\right]$ (2)
 > $\mathrm{DataSummary}\left(A,\mathrm{output}=\left[\mathrm{minimum},\mathrm{mean},\mathrm{standarddeviation},\mathrm{maximum}\right]\right)$
 $\left[{-}{1.61166425663017}{,}{9.92990696764101}{,}{2.98545650773550}{,}{20.7830118018693}\right]$ (3)

Consider the following Matrix data set.

 > $M:=\mathrm{Matrix}\left(\left[\left[3,1130,114694\right],\left[4,1527,127368\right],\left[3,907,88464\right],\left[2,878,96484\right],\left[4,995,128007\right]\right]\right)$
 ${M}{:=}\left[\begin{array}{rrr}{3}& {1130}& {114694}\\ {4}& {1527}& {127368}\\ {3}& {907}& {88464}\\ {2}& {878}& {96484}\\ {4}& {995}& {128007}\end{array}\right]$ (4)

We compute the data summary of each of the columns.

 > $\mathrm{DataSummary}\left(M\right)$
 $\left[\begin{array}{ccc}\left[\begin{array}{c}{\mathrm{mean}}{=}{3.20000000000000}\\ {\mathrm{standarddeviation}}{=}{0.836660026534076}\\ {\mathrm{skewness}}{=}{-}{0.307344499543130}\\ {\mathrm{kurtosis}}{=}{1.47755102040816}\\ {\mathrm{minimum}}{=}{2.}\\ {\mathrm{maximum}}{=}{4.}\\ {\mathrm{cumulativeweight}}{=}{5.}\end{array}\right]& \left[\begin{array}{c}{\mathrm{mean}}{=}{1087.40000000000}\\ {\mathrm{standarddeviation}}{=}{264.571918388933}\\ {\mathrm{skewness}}{=}{0.933977457540904}\\ {\mathrm{kurtosis}}{=}{2.06146946749788}\\ {\mathrm{minimum}}{=}{878.}\\ {\mathrm{maximum}}{=}{1527.}\\ {\mathrm{cumulativeweight}}{=}{5.}\end{array}\right]& \left[\begin{array}{c}{\mathrm{mean}}{=}{1.11003400000000}{}{{10}}^{{5}}\\ {\mathrm{standarddeviation}}{=}{17953.9731201759}\\ {\mathrm{skewness}}{=}{-}{0.223011885184364}\\ {\mathrm{kurtosis}}{=}{1.10201410391208}\\ {\mathrm{minimum}}{=}{88464.}\\ {\mathrm{maximum}}{=}{1.28007}{}{{10}}^{{5}}\\ {\mathrm{cumulativeweight}}{=}{5.}\end{array}\right]\end{array}\right]$ (5)