Skip to content

Instantly share code, notes, and snippets.

@PragTob
Last active July 5, 2019 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PragTob/ed815974d54bb3adf547aef9e43ea879 to your computer and use it in GitHub Desktop.
Save PragTob/ed815974d54bb3adf547aef9e43ea879 to your computer and use it in GitHub Desktop.
Statistex statistis/2
iex> samples = [1, 3.0, 2.35, 11.0, 1.37, 35, 5.5, 10, 0, 2.35]
iex> Statistex.statistics(samples)
%Statistex{
average: 7.156999999999999,
frequency_distribution: %{
0 => 1,
1 => 1,
10 => 1,
35 => 1,
1.37 => 1,
2.35 => 2,
3.0 => 1,
5.5 => 1,
11.0 => 1
},
maximum: 35,
median: 2.675,
minimum: 0,
mode: 2.35,
percentiles: %{50 => 2.675},
sample_size: 10,
standard_deviation: 10.47189577445799,
standard_deviation_ratio: 1.46316833512058,
total: 71.57,
variance: 109.6606011111111
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment