Skip to content
  • Klaus Aehlig's avatar
    Use more efficient statistics for the standard deviation · b3aa93a2
    Klaus Aehlig authored
    
    
    Instead of using the full sample as statistics providing
    enough information to compute the standard deviation, use
    a slightly more elaborate one. It contains the standard
    statistics count, sum, and sum of squares, which can also
    very easily be updated. However, computing the standard
    deviation from these values unfortunately is not precise
    enough for our purpose (small difference of large values).
    Therefore, we also carry the naively computed variance in
    the statistics. The latter can also be updated using the
    standard statistics and, moreover, this can be done in a
    way that does not introduce too large inaccuracies for a
    small number of updates.
    
    Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
    Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
    b3aa93a2