Function goose::util::standard_deviation

source ·
pub fn standard_deviation(raw_average: f32, co_average: f32) -> f32
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:

  1. determine the average of the two numbers
  2. subtract the mean from each number, calculating two values (one positive, one negative)
  3. square each value and add them together (this is the “variance”)
  4. return the square root of this value (this is the “standard deviation”)