Mode - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

Student[Statistics]

  

Mode

  

compute the mode

 

Calling Sequence

Parameters

Description

Computation

Examples

References

Compatibility

Calling Sequence

Mode(A, numeric_option, output_option)

Mode(M, numeric_option, output_option)

Mode(X, numeric_option, output_option)

Parameters

A

-

data sample

M

-

Matrix data sample

X

-

algebraic; random variable

numeric_option

-

(optional) equation of the form numeric=value where value is true or false

output_option

-

(optional) equation of the form output=x where x is value, plot, or both

Description

• 

The Mode function computes the mode of a specified random variable or a data sample, and then puts the result into a set. The mode of a set of sample data is the most frequently occurring item in it.

• 

The first parameter can be a data sample (e.g., a Vector), a Matrix data sample, a random variable, or an algebraic expression involving random variables (see Student[Statistics][RandomVariable]).

• 

If the option output is not included or is specified to be output=value, then the function will return the value of the mode. If output=plot is specified, then the function will return a plot of the input data set and its mode. If output=both is specified, then both the value and the plot of the mode will be returned.

Computation

• 

By default, all computations involving random variables are performed symbolically (see option numeric below).

• 

The Mode function selects the values that occur most frequently in the data set. If values appear differently but have the same numeric value, such as , , and , then Mode will consider them equal. If values that appear differently are a mode of the data set, then Mode uses a floating point value equal to that mode if there is one in the data set, or an arbitrarily selected non-floating point value otherwise.

• 

By default, the mode is computed according to the rules mentioned above. To always compute the mode numerically, specify the numeric or numeric = true option.

Examples

Compute the mode of the binomial distribution with parameters  and .

(1)

Use numeric parameters.

(2)

(3)

This data sample has two modes:  and . The value  occurs in two versions: as a floating point value and as an integer. Mode uses the floating point value as the return value.

Use the numeric option.

(4)

Use the output=plot option.

Consider the following Matrix data sample.

(5)

Compute the mode of each of the columns.

(6)

Use the output=both option.

(7)

(8)

References

  

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

Compatibility

• 

The Student[Statistics][Mode] command was introduced in Maple 18.

• 

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

See Also

Statistics[Mode]

Student

Student[Statistics]

Student[Statistics][RandomVariable]

 


Download Help Document