programdemos/stats.xtl

Using a library: Stats is a standard library, built into xetal (lib/Stats.xtl). The alias "s:" is this file's name for it: its exported names are used as s:m_ean and so on.

Run it with ./demos/stats.xtl or "xetal run demos/stats.xtl". It prints the mean, variance, standard deviation and range of v, then a mean of Floats; the expected values are in the comments.

source · imports s: lib/Stats.xtl

v : Int

value · line 13

The sample: eight Ints with mean 5 and standard deviation 2.

v ← 2 4 4 4 5 5 7 9