compute the mean of an array of samples - Maple Help

Home : Support : Online Help : Science and Engineering : Signal Processing : Computing Statistics : SignalProcessing/MeanStandardDeviation

SignalProcessing[Mean] - compute the mean of an array of samples

SignalProcessing[StandardDeviation] - compute the standard deviation of an array of samples

SignalProcessing[MeanStandardDeviation] - compute, simultaneously, the mean and standard deviation of an array of samples

 Calling Sequence Mean(A) StandardDeviation(B) MeanStandardDeviation(B)

Parameters

 A - Array of real or complex numeric values; the signal B - Array of real numeric values; the signal

Description

 • The Mean(A) command returns the mean of the array A, defined as the value of the expression

$\frac{{\sum }_{k=1}^{N}{A}_{k}}{N}$

 where $N$ is the number of elements of A.
 • The StandardDeviation(B) command returns the standard deviation of the Array B, defined as the value of the expression

$\sqrt{\frac{{\sum }_{k=1}^{N}{\left({B}_{k}-\mathrm{\mu }\right)}^{2}}{N-1}}$

 where $N$ is the number of elements of B, and $\mathrm{\mu }$ is the mean of B.
 • The MeanStandardDeviation(B) command computes the mean and standard deviation of B simultaneously, and returns an expression sequence consisting of these values, respectively.
 • For all of these commands, Maple may convert the input signal. Before the code performing Mean runs, Maple converts A to a hardware datatype, first attempting float[8] and subsequently complex[8], unless it already has one of these datatypes. Similarly, before the code performing StandardDeviation or MeanStandardDeviation runs, B is converted to datatype float[8] if it does not have that datatype already. For this reason, it is most efficient if the input Array has an appropriate datatype already.

 • The SignalProcessing[Mean], SignalProcessing[StandardDeviation] and SignalProcessing[MeanStandardDeviation] commands are thread-safe as of Maple 17.

Examples

 > $\mathrm{with}\left(\mathrm{SignalProcessing}\right):$
 > $a:=\mathrm{Array}\left(\left[1,2,3,4,5\right],'\mathrm{datatype}'={'\mathrm{float}'}_{8}\right):$
 > $\mathrm{Mean}\left(a\right)$
 ${3.}$ (1)
 > $\mathrm{StandardDeviation}\left(a\right)$
 ${1.58113883008418976}$ (2)
 > $\mathrm{MeanStandardDeviation}\left(a\right)$
 ${3.}{,}{1.58113883008418976}$ (3)