Function goose::util::standard_deviation [−][src]
Expand description
Calculate the standard deviation between two f32 numbers.
Standard deviation is the average variability between numbers. It indicates, on average, how far from the mean each value is. A high standard deviation suggests that values are generally far from the mean, while a low standard deviation suggests that values are close to the mean.
Standard deviation is calculated with the following steps:
- determine the average of the two numbers
- subtract the mean from each number, calculating two values (one positive, one negative)
- square each value and add them together (this is the “variance”)
- return the square root of this value (this is the “standard deviation”)