describe(deprecated)/variance - Help

stats[describe]

 variance
 Variance of a Statistical list

 Calling Sequence stats[describe, variance](data) stats[describe, variance[Nconstraints]](data) describe[variance](data) describe[variance[Nconstraints]](data)

Parameters

 data - statistical list Nconstraint - (optional, default=0) Number of constraints, 1 for sample, 0 for full population

Description

 • Important: The stats package has been deprecated. Use the superseding package Statistics instead.
 • The variance command (variance) of the stats[describe, ...] subpackage computes the variance of the given data.
 • The variance is defined to be the square  of the standard deviation.
 • Classes are assumed to be represented by the class mark, for example 10..12 has the value 11. Missing data are ignored.
 • The definition of standard deviation varies according to whether it is computed for the whole population, or only for a sample. The parameter Nconstraint provides for this. For more information on the subject, refer to describe[standarddeviation].
 • The command with(stats[describe],variance) allows the use of the abbreviated form of this command.

Examples

Important: The stats package has been deprecated. Use the superseding package Statistics instead.

 > $\mathrm{with}\left(\mathrm{stats}\right):$
 > $\mathrm{data1}≔\left[1,3,5\right]$
 ${\mathrm{data1}}{:=}\left[{1}{,}{3}{,}{5}\right]$ (1)
 > $\mathrm{data2}≔\left[2,3,5\right]$
 ${\mathrm{data2}}{:=}\left[{2}{,}{3}{,}{5}\right]$ (2)

the first list of data is more dispersed that the second one. Accordingly, its variance is larger

 > $\left[\mathrm{describe}[\mathrm{variance}]\left(\mathrm{data1}\right),\mathrm{describe}[\mathrm{variance}]\left(\mathrm{data2}\right)\right]:$$\mathrm{evalf}\left(\right)$
 $\left[{2.}{,}{3.}{,}{5.}\right]$ (3)

If these were random samples in a larger population, one would use

 > $\left[\mathrm{describe}[\mathrm{variance}[1]]\left(\mathrm{data1}\right),\mathrm{describe}[\mathrm{variance}[1]]\left(\mathrm{data2}\right)\right]:$$\mathrm{evalf}\left(\right)$
 $\left[{2.}{,}{3.}{,}{5.}\right]$ (4)