librarylib/Stats.xtl
Stats: a small statistics library (a standard library, built into xetal). Import it with an alias of your choice: "s:" u_se< "Stats". It is a demo library, loaded only by that import: a small subset of X_eTaL-libraries' Statistics, which has much more (a program may use either). Names with l: are exported; the others are private to this file.
ˡm̲ean : Num a => a -> Float
ˡm̲ean ← [[f̲loat '+ r̲/] ÷ [f̲loat t̲ally]]
Used in: d̲eviations, ˡv̲ariance
ˡv̲ariance : Num a => a -> Float
The variance: the mean squared deviation from the mean.
ˢ⁼u̲se< "Stats"
ˢv̲ariance 2 4 4 4 5 5 7 9 4.0
ˡv̲ariance ← [ˡm̲ean [s̲quare d̲eviations]]
Used in: ˡs̲d
ˡs̲d : Num a => a -> Float
ˡs̲d ← { (ˡv̲ariance ⍵) ^ 0.5 }