Re: Square root of a negative rral value



Terence wrote:

I found that running the converted program with the original check
data set that went with this, crashes on trying to take the square
root of a negative variable (to get the standard deviation as a
measure for selecting later optimum adjustments).

I was utterly lost to discover why all the many computational results
checked exactly to some 6 places, EXCEPT for one standard error and
its significance (both unused later) and the program crashing on one
square root operation before terminating correctly with a final table.

I have seen this many times. Note that six places isn't enough,
if the result is negative in the seventh place.

When the standard deviation is zero, or very close to zero
it is possible for rounding in the variance to give a
negative result. Probably better to set it to zero
instead of the sqrt() of the absolute value, but it will be
very small in any case.

See http://en.wikipedia.org/wiki/Standard_deviation#Definition_and_calculation

The popular standard deviation algorithm uses an identity that is
true mathematically, but not always numerically. That is, the
mean of the squares minus the square of the mean should be positive
but with some types of rounding, it isn't.

-- glen

.



Relevant Pages

  • Re: Standard Deviation
    ... differences from the mean is there, but the main information is in the most significant digits, rather than being computed as the difference between two very large numbers, i.e. in the least significant digits. ... standard deviation to prove your point, but the opposite can easily be ... squared deviations from the mean) OR the variance (the SS divided by N ... point was simply that with the "wrong kind of data" the square of SumX ...
    (borland.public.delphi.non-technical)
  • Re: Indian Test batting - stunning discovery
    ... Madhusudan Singh wrote: ... what is the standard deviation on SMG's score in won matches ... 2nd question of course being the root mean square. ...
    (rec.sport.cricket)
  • Re: negative adjusted r square
    ... > I am reciving a negative adjusted R square when running my regerssion. ... also find that the residual standard deviation is greater than the original ... Whatever statistics you care to look at you can be pretty confident ...
    (sci.stat.math)
  • Re: A Gambling Math Question
    ... The standard deviation is approximately sqrt. ... comes from the well-known normal approximation to the binomial ... The variance, which is the square of the standard deviation, can be ...
    (sci.math)
  • re:Finding Change in Standard Deviation....
    ... you get by squaring the standard deviation and adding the square of ... Finally get the new standard deviation from the new second moment and ... Posted Via Usenet.com Premium Usenet Newsgroup Services ...
    (sci.math)