An Introduction to
Statistics with Klong

Basic Statistical Functions

Here is another random data set X consisting of values of 10 with a normally distributed error in the range −10≤x≤10.

    X::{rndn(x;2)}'err(20;20;10+&30)
[10.0   7.65  8.24 10.0  10.59
 15.88 10.59  5.29 15.88 12.94
 11.76 10.0  12.35  5.29  4.71
 11.76  0.59 12.94 14.12 17.65
  6.47  6.47  8.82 12.94  8.82
 10.0  10.0   4.71  5.88  7.06]

The Klong statistics library offers the usual functions for computing the mean (mu), median (M), variance (var), standard deviation (sd), quartiles (qrt), range (rng), etc:

    mu(X)
9.64666666666666667
    M(X)
10.0
    var(X)
14.3358088888888882
    sd(X)
3.78626582385453863
    qrt(X)
[6.47 10.0 12.35]
    rng(X)
17.06

The scatter plot in fig.3 shows the above data set with the mean (solid line) and standard deviation (dashed lines) added.


Fig.3: larger. Klong

contact  |  privacy