commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <p...@steitz.com>
Subject Re: [math] exceptions or NaN from Univariate
Date Wed, 14 May 2003 05:04:03 GMT
O'brien, Tim wrote:
> On Tue, 2003-05-13 at 23:13, Phil Steitz wrote:
> <snip/>
> 
>>On second thought, I agree with you.  You are correct that if we really 
>>want to throw something for "insufficient data" situations, we should 
>>require n >= 1 for the mean and either force n >= 2 for variance, std 
>>dev or modify these to return 0 if n < 2.  May not be worth the trouble.
> 
> 
> I think NaN is a good answer for unanswerable questions like "What is
> the mean of an empty set?" or "What is the length of a point?"  Nothing
> prevents you from asking the question, and throwing an exception just
> seems unnecessary.
> 
> Modifying variance and standard deviation to return 0 when n = 1 makes
> sense.  

What about n = 0?

> 
> Tim
> 
> 
>>Phil
>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message