| [reply] [Watch: Dir/Any] |
I'll preface this by saying I know just enough to be dangerous. But since you haven't got a reply yet, here goes...
Do you want the distribution function? Doesn't the mean and standard deviation determine that uniquely? Why do you need the target percentage?
I've seen the IGD page on Mathworld, and frankly I'd be concerned about coding that correctly, efficiently, etc. I note that Mathematica doesn't even have it yet.
Perhaps you can clarify your question (or perhaps it's just me in over my head).
-QM
--
Quantum Mechanics: The dreams stuff is made of
| [reply] [Watch: Dir/Any] |
Hmm...that's not quite it. What I have is the standard Gaussian distribution with a known mean (0) and standard deviation (1). Let's call that G(x). I also have a fixed percentage, let's say 0.85. What I need to find is a point z such that integral(G(x), -infinity, z) = 0.85. Does that make more sense?
thor
Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come
| [reply] [Watch: Dir/Any] |
I googled:
perl inverse gaussian distribution
and followed the link trail to:
http://home.online.no/~pjacklam/notes/invnorm/impl/acklam/perl/ltqnorm.pl
Though I haven't looked at it in detail, it looks like it's what you want.
Update: Wrapped it in a test script -- it's what you want.
| [reply] [Watch: Dir/Any] |
There is a Statistics::Distributions module; but I'm sure you know about that.
I'm a bit confused by your post (I'm easily confused, so don't be offended), in that you're saying you've got the distribution, the mean, the standard deviation, and a target percentage. Isn't this over-specified? Or do you want to be able to get z given a target percentage and vice versa?
Scanning CPAN does seem to indicate you'll have to roll your own; you might have success at http://lib.stat.cmu.edu, but you've probably already looked there.
Update: One of thor's replies un-confused (or, at least, I think it did) me; Statistics::Distributions gives n = F(z), but he needs the inverse of this. i.e., z = F-1(f).
| [reply] [Watch: Dir/Any] [d/l] [select] |
Everyone in this thread is WAY too smart for their own good ;) | [reply] [Watch: Dir/Any] |
Sorry - circular reference there. Perhaps I should have implemented my comment with WeakRef :)
| [reply] [Watch: Dir/Any] |