iblrig.misc.online_std

iblrig.misc.online_std(new_sample, new_count, old_mean, old_std)[source]

Update the mean and standard deviation of a group of values after a sample update.

Parameters:
  • new_sample (float) – The new sample to be included.

  • new_count (int) – The new count of samples (including new_sample).

  • old_mean (float) – The previous mean (N - 1).

  • old_std (float) – The previous standard deviation (N - 1).

Returns:

Updated mean and standard deviation.

Return type:

tuple[float, float]

Parameters: