 transform(deprecated)/divideby - Maple Help

stats[transform, divideby]

divide statistical data by a number or a descriptive statistic Calling Sequence stats[transform, divideby[divisor]](data) transform[divideby[divisor]](data) Parameters

 divisor - numerical value, or descriptive statistic function data - statistical list Description

 • Important: The stats package has been deprecated. Use the superseding package Statistics instead.
 • The function divideby of the subpackage stats[transform, ...] divides the data by the given divisor
 • Missing items remain unchanged.
 • The requested division is applied at each of the boundary points of classes. To ensure correct subsequent results, the requested divisor must preserve the order of the boundary points, and so must be positive.
 • If the divisor is not numeric, a call to stats[describe, divisor](data) is made to compute it.
 • It is usually more meaningful to compare two distributions when they are brought to a common scale. For example, to compare the dispersion of the data, it is convenient to divide the data by some appropriate measure of the dispersion (see describe[standarddeviation] for more information on this topic. Another common divisor is to use some "typical" value of the data, in other words, to use a central measure of the data. Refer to describe[mean] for more information on this topic.
 • The function transform[apply] is more general than transform[divideby]. A common procedure is to remove the mean from the data and then divide by the standard deviation. The function transform[standardscore] performs this transformation directly. Examples

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

 > $\mathrm{with}\left(\mathrm{stats}\right):$
 > $\mathrm{data1}≔\left[10,20,30,40\right]$
 ${\mathrm{data1}}{≔}\left[{10}{,}{20}{,}{30}{,}{40}\right]$ (1)
 > ${\mathrm{transform}}_{{\mathrm{divideby}}_{4}}\left(\mathrm{data1}\right)$
 $\left[\frac{{5}}{{2}}{,}{5}{,}\frac{{15}}{{2}}{,}{10}\right]$ (2)
 > $M≔{\mathrm{describe}}_{\mathrm{mean}}\left(\mathrm{data1}\right)$
 ${M}{≔}{25}$ (3)
 > ${\mathrm{transform}}_{{\mathrm{divideby}}_{\mathrm{mean}}}\left(\mathrm{data1}\right)={\mathrm{transform}}_{{\mathrm{divideby}}_{M}}\left(\mathrm{data1}\right)$
 $\left[\frac{{2}}{{5}}{,}\frac{{4}}{{5}}{,}\frac{{6}}{{5}}{,}\frac{{8}}{{5}}\right]{=}\left[\frac{{2}}{{5}}{,}\frac{{4}}{{5}}{,}\frac{{6}}{{5}}{,}\frac{{8}}{{5}}\right]$ (4)

Compare with another distribution

 > $\mathrm{data2}≔\left[10,24,26,40\right]$
 ${\mathrm{data2}}{≔}\left[{10}{,}{24}{,}{26}{,}{40}\right]$ (5)
 > ${\mathrm{describe}}_{\mathrm{mean}}\left(\mathrm{data2}\right)$
 ${25}$ (6)

The mean is the same. The range is the same. But the scaled data is quite different.

 > ${\mathrm{transform}}_{{\mathrm{divideby}}_{\mathrm{mean}}}\left(\mathrm{data1}\right):$$\mathrm{evalf}\left(\right)$
 ${25.}$ (7)
 > ${\mathrm{transform}}_{{\mathrm{divideby}}_{\mathrm{mean}}}\left(\mathrm{data2}\right):$$\mathrm{evalf}\left(\right)$
 ${25.}$ (8)
 > $\mathrm{plot}\left(\mathrm{zip}\left(\left(x,y\right)→\left[x,y\right],,\right)\right):$