Tally - Maple Help
www.fgks.org   »   [go: up one dir, main page]

For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Online Help
All Products    Maple    MapleSim

Statistics

  

Tally

  

compute absolute frequencies

 

Calling Sequence

Parameters

Description

Options

Notes

Examples

Calling Sequence

Tally(X, options)

Parameters

X

-

data sample

options

-

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

Description

• 

The Tally function returns a table of distinct elements in X together with their frequencies. (See also Statistics[TallyInto]).

• 

The first parameter X is the data set, given as e.g. a Vector.

Options

  

The options argument can contain one or more of the options shown below.

• 

output=list or table -- Set the type of output returned. The default value is list. In either case, the output consists of equations of the form element=frequency.

• 

weights=Array or list -- A vector of weights (one dimensional rtable). If weights are given, the Tally function will return distinct elements in X paired with their cumulative weights. Note that the weights provided must have type/realcons and the returned frequencies are floating-point, even if the problem is specified with exact values. Both the data array and the weights array must have the same number of elements.

Notes

• 

If the value of the output option is set to output=list, the order of elements in the list is session dependent.

Examples

withStatistics:

AArray3,3,3,1,1,a,b,b,a,a,a,a,π,π,π,π

A33311abbaaaaππππ

(1)

TallyA

1=2,3=3,b=2,a=5,π=4

(2)

TallyA,output=table

table1=2,3=3,b=2,a=5,π=4

(3)

CArray3,3,1,a,b,π

C331abπ

(4)

WArray0.25,0.5,0.125,0.5,0.375,0.5625

W0.250.50.1250.50.3750.5625

(5)

TallyC,weights=W

1=0.125000000000000,3=0.750000000000000,b=0.375000000000000,a=0.500000000000000,π=0.562500000000000

(6)

See Also

Statistics

Statistics[Computation]

Statistics[FrequencyTable]

Statistics[Sort]

Statistics[TallyInto]