Statistics - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Statistics

  

DataSummary

  

compute seven summary statistics for a data sample

 

Calling Sequence

Parameters

Options

Description

Computation

Examples

References

Compatibility

Calling Sequence

DataSummary(A, options)

Parameters

A

-

data set or Matrix data set

options

-

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

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.

• 

summarize : false or embed; Display an embedded summary table. The default is false.

• 

weights : Vector of 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.

Description

• 

The DataSummary function computes seven summary statistics for the data set A. These are 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.

• 

For more information about computation in the Statistics package, see the Statistics[Computation] help page.

Examples

withStatistics:

XRandomVariableNormal10,3:

ASampleX,104:

The DataSummary command returns a Vector containing the summary statistics.

DataSummaryA

mean=9.92990696764101standarddeviation=2.98545650773550skewness=0.0320507381512090kurtosis=2.98747405235129minimum=1.61166425663017maximum=20.7830118018693cumulativeweight=10000.

(1)

DataSummaryA,output=mean,standarddeviation

9.92990696764101,2.98545650773550

(2)

DataSummaryA,output=minimum,mean,standarddeviation,maximum

1.61166425663017,9.92990696764101,2.98545650773550,20.7830118018693

(3)

Consider the following Matrix data set.

MMatrix3,1130,114694,4,1527,127368,3,907,88464,2,878,96484,4,995,128007

M31130114694415271273683907884642878964844995128007

(4)

For Matrix inputs, the DataSummary command outputs a Vector containing the corresponding summary statistics by column.

resultsDataSummaryM

resultsmean=3.20000000000000standarddeviation=0.836660026534076skewness=0.307344499543130kurtosis=1.47755102040816minimum=2.maximum=4.cumulativeweight=5.mean=1087.40000000000standarddeviation=264.571918388933skewness=0.933977457540904kurtosis=2.06146946749788minimum=878.maximum=1527.cumulativeweight=5.mean=1.11003400000000105standarddeviation=17953.9731201759skewness=0.223011885184364kurtosis=1.10201410391208minimum=88464.maximum=1.28007105cumulativeweight=5.

(5)

To display the summary for one of the columns:

results1

mean=3.20000000000000standarddeviation=0.836660026534076skewness=0.307344499543130kurtosis=1.47755102040816minimum=2.maximum=4.cumulativeweight=5.

(6)

If the input is a DataFrame object, then the result is a DataFrame that has the same column labels as the original input, and the row labels correspond to the output quantities requested.

dfDataFrameM,columns=a,b,c

dfabc1311301146942415271273683390788464428789648454995128007

(7)

df_resultsDataSummarydf

df_resultsabcmean3.200000000000001087.400000000001.11003400000000105standarddeviation0.836660026534076264.57191838893317953.9731201759skewness0.3073444995431300.9339774575409040.223011885184364kurtosis1.477551020408162.061469467497881.10201410391208minimum2.878.88464.maximum4.1527.1.28007105cumulativeweight5.5.5.

(8)

df_resultsb

mean1087.40000000000standarddeviation264.571918388933skewness0.933977457540904kurtosis2.06146946749788minimum878.maximum1527.cumulativeweight5.

(9)

The summarize option makes it possible to display an embedded table containing the results. Note that the embedded table is only for display and that the returned value of the DataSummary command is unchanged.

resultsDataSummaryM,summarize=embed:

 

1

2

3

mean

3.2

1087.4

1.110034105

standarddeviation

0.8366600265340756

264.5719183889326

17953.973120175935

skewness

0.30734449954313

0.9339774575409044

0.22301188518436363

kurtosis

1.4775510204081639

2.061469467497881

1.1020141039120812

minimum

2.0

878.0

88464.0

maximum

4.0

1527.0

1.280070105

cumulativeweight

5.0

5.0

5.0

Similar to the example above, the returned value for results is the same:

results1

mean=3.20000000000000standarddeviation=0.836660026534076skewness=0.307344499543130kurtosis=1.47755102040816minimum=2.maximum=4.cumulativeweight=5.

(10)

References

  

Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.

Compatibility

• 

The A parameter was updated in Maple 16.

• 

The Statistics[DataSummary] command was updated in Maple 2016.

• 

The summarize option was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

Statistics

Statistics[Computation]

Statistics[DescriptiveStatistics]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam