emel v0.3.0 Emel.Math.Statistics View Source
Link to this section Summary
Functions
A number that gives you an idea of how random an outcome will be based on the probability_values
of each of the possible outcomes in a situation
A measure of difference between two continuous variables
The probability of event A occurring given that event B has occurred
The ratio of same values between vector_a
and vector_b
Link to this section Functions
A number that gives you an idea of how random an outcome will be based on the probability_values
of each of the possible outcomes in a situation.
Examples
iex> Emel.Math.Statistics.entropy([0.5, 0.5])
1.0
iex> Emel.Math.Statistics.entropy([0.999, 0.001])
0.011407757737461138
iex> Emel.Math.Statistics.entropy([0.25, 0.25, 0.25, 0.25])
1.0
iex> Emel.Math.Statistics.entropy([0.8, 0.05, 0.05, 0.1])
0.5109640474436812
A measure of difference between two continuous variables.
Examples
iex> Emel.Math.Statistics.mean_absolute_error([0.0, 1.0], [0.0, 1.0])
0.0
iex> Emel.Math.Statistics.mean_absolute_error([5.0, 1.0, 0.0, 0.5], [0.0, 1.0, -3.0, 0.5])
2.0
Link to this function
posterior_probability(prior_probability_B, prior_probability_A, probability_B_given_A)
View Source
The probability of event A occurring given that event B has occurred.
Examples
iex> Emel.Math.Statistics.posterior_probability(0.8, 0.4, 0.5)
0.25
iex> Emel.Math.Statistics.posterior_probability(0.4, 0.5, 0.1)
0.125