
Boost : 
From: Paul A Bristow (pbristow_at_[hidden])
Date: 20060711 12:33:26
 Original Message
 From: boostbounces_at_[hidden]
 [mailto:boostbounces_at_[hidden]] On Behalf Of Deane Yang
 Sent: 11 July 2006 17:15
 To: boost_at_[hidden]
 Subject: Re: [boost] [math/staticstics/design] How best
 tonamestatisticalfunctions?

 > What about the Qs? (complements)

 In other words, 1  P. Right? One response is why do you
 need to define
 it, given how easy it is to get from the cumulative density function?

 If not, use a common name for it. Unfortunately, I don't have a good
 suggestion.
Perhaps not really needed? Is there an accuracy reason for both?
 I've always seen it referred to as the cumulative density function (CDF
for short).
Agree common  but not all.
 > But excessively long :(
 Compared to what? I personally am very grateful that I no longer see
 short, cryptic function and variable names in code.
OK, I'm persuaded, but what to others think?
 Here's a first stab (I'm sure it can be improved):

 class StudentsT
 {
 public:
 explicit StudentsT(double degrees_of_freedom);

 double density(double x) const;
 double cumulative_probability(double x) const;
 double quantile(double probability) const;
 // Also known as inverse cumulative.

 double degrees_of_freedom(double quantile, double probability)
const;

 // Functions below may return NaN, if undefined.
 double mean() const;
 double variance() const;
 double skewness() const;
 double kurtosis() const;
 };
Thanks  I think I like it.
Others views?
Paul
PS Never written a line of C in my life ;)
 Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk