Skip to main content
Paper has moved
Source Link
Toby Speight
  • 88.4k
  • 14
  • 104
  • 327

I have previously reviewed code that computes standard deviation using the mathematical formula E(x²) - E(x)², and warned against the use of this formula because floating-point precision is severely compromised by subtracting almost-equal numbers. I've started with the methods described in Incremental calculation of weighted mean and varianceIncremental calculation of weighted mean and variance by Tony Finch. However, I'm not an expert on numerical methods, so I'd like to know of any weaknesses in my version.

I have previously reviewed code that computes standard deviation using the mathematical formula E(x²) - E(x)², and warned against the use of this formula because floating-point precision is severely compromised by subtracting almost-equal numbers. I've started with the methods described in Incremental calculation of weighted mean and variance by Tony Finch. However, I'm not an expert on numerical methods, so I'd like to know of any weaknesses in my version.

I have previously reviewed code that computes standard deviation using the mathematical formula E(x²) - E(x)², and warned against the use of this formula because floating-point precision is severely compromised by subtracting almost-equal numbers. I've started with the methods described in Incremental calculation of weighted mean and variance by Tony Finch. However, I'm not an expert on numerical methods, so I'd like to know of any weaknesses in my version.

Reference my sources
Source Link
Toby Speight
  • 88.4k
  • 14
  • 104
  • 327

I have previously reviewed code that computes standard deviation using the mathematical formula E(x²) - E(x)², and warned against the use of this formula because floating-point precision is severely compromised by subtracting almost-equal numbers. I've started with the methods described in Incremental calculation of weighted mean and variance by Tony Finch. However, I'm not an expert on numerical methods, so I'd like to know of any weaknesses in my version.

I have previously reviewed code that computes standard deviation using the mathematical formula E(x²) - E(x)², and warned against the use of this formula because floating-point precision is severely compromised by subtracting almost-equal numbers. However, I'm not an expert on numerical methods, so I'd like to know of any weaknesses in my version.

I have previously reviewed code that computes standard deviation using the mathematical formula E(x²) - E(x)², and warned against the use of this formula because floating-point precision is severely compromised by subtracting almost-equal numbers. I've started with the methods described in Incremental calculation of weighted mean and variance by Tony Finch. However, I'm not an expert on numerical methods, so I'd like to know of any weaknesses in my version.

Tweeted twitter.com/StackCodeReview/status/1016334795343908864
Rollback to Revision 1
Source Link
Toby Speight
  • 88.4k
  • 14
  • 104
  • 327

I have previously reviewed code that computes standard deviation using the mathematical formula \$ E(x^2) - E(x)^2 \$ E(x²) - E(x)², and warned against the use of this formula because floating-point precision is severely compromised by subtracting almost-equal numbers. However, I'm not an expert on numerical methods, so I'd like to know of any weaknesses in my version.

I have previously reviewed code that computes standard deviation using the mathematical formula \$ E(x^2) - E(x)^2 \$ , and warned against the use of this formula because floating-point precision is severely compromised by subtracting almost-equal numbers. However, I'm not an expert on numerical methods, so I'd like to know of any weaknesses in my version.

I have previously reviewed code that computes standard deviation using the mathematical formula E(x²) - E(x)², and warned against the use of this formula because floating-point precision is severely compromised by subtracting almost-equal numbers. However, I'm not an expert on numerical methods, so I'd like to know of any weaknesses in my version.

added 5 characters in body
Source Link
Daniel
  • 4.6k
  • 2
  • 18
  • 40
Loading
Source Link
Toby Speight
  • 88.4k
  • 14
  • 104
  • 327
Loading