|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2006-07-14 09:01:54
Paul A Bristow wrote:
> With the negative binomial distribution function (or are there more
> than one but one is THE Standard one?), which is **THE** inverse?
>
> the one that tells you the number of failures (MathCAD qnbinom &
> DCDFLIB)
>
> or the one that tells you the success probability? (Cephes, Wikipedia
> & DCDFLIB)
I was wrong about wikipedia: they agree with MathCAD and Mathmatica I think,
I just read it wrong the first time :-(
> John's response to this question was faintly blasphemous ;-)
:-)
> Same question with F and chisqr of course...
>
> Both/all of course are potentially useful :-)
>
> (and I feel all should be provided).
If you look at Mathmatica's documentation here
http://documents.wolfram.com/mathematica/Add-onsLinks/StandardPackages/Statistics/DiscreteDistributions.html
They're reasonably precise on which parameters are the "parameterisation"
and which is the random variable. They use "quantile" to always invert the
random variable. However, quite often that may not be the most useful one
to invert IMO.
For example in the binomial distribution we have:
parameters:
N: number of trials.
p: probablity of success in one trial.
Random Variable:
n: number of successes.
So the quantile gives you number of successes expected at a given
probablity, but for many scientists, they'll measure the number of successes
and want to invert to get the probability of one success (parameter p).
Hopefully, I've actually got this right this time, I'm sure someone will
jump in if not.... ?
All of which means that in addition to a "generic" interface - however it
turns out - we will still need distribution-specific ad-hock functions to
invert for the parameterisation values, as well as the random variable.
Also still in learning mode yours, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk