stats[transform, divideby]
divide statistical data by a number or a descriptive statistic
Calling Sequence
Parameters
Description
Examples
stats[transform, divideby[divisor]](data)
transform[divideby[divisor]](data)
divisor
-
numerical value, or descriptive statistic function
data
statistical list
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.
with⁡stats:
data1≔10,20,30,40
transformdivideby4⁡data1
52,5,152,10
M≔describemean⁡data1
M≔25
transformdividebymean⁡data1=transformdividebyM⁡data1
25,45,65,85=25,45,65,85
Compare with another distribution
data2≔10,24,26,40
describemean⁡data2
25
The mean is the same. The range is the same. But the scaled data is quite different.
transformdividebymean⁡data1:evalf⁡
25.
transformdividebymean⁡data2:evalf⁡
plot⁡zip⁡x,y↦x,y,,:
See Also
describe(deprecated)[mean]
describe(deprecated)[standarddeviation]
Statistics
transform(deprecated)[apply]
transform(deprecated)[multiapply]
transform(deprecated)[standardscore]
transform(deprecated)[subtractfrom]
Download Help Document