1

I'm trying to implement a mathematics library in C# .NET which includes some basic statistics. I need to be able to determine the inverse CDF of a Student's t-distribution from a given probability/confidence and degrees of freedom, but I cannot find any formulas for this. From what I've found there are various algorithms for this involving series and/or integration, both of which I have the capability to implement in my library. I've been able to implement the normal cdf and inverse cdf, and even the t cdf (with a lot of research), but I can't seem to find anything definite on the inverse. How does one compute this?

My intent is prioritizing accuracy over speed, up to the accuracy a double can store (64 bits). Anything more is unnecessary.

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
einsteinsci
  • 119
  • 2
  • 2
    In general--as your post suggests-- you can find many different ways to compute an inverse CDF. This variety occurs because different applications have different requirements for accuracy and they measure accuracy in different ways--in the tails, in the center, etc. It would therefore help to provide more details of your functional requirements concerning accuracy, precision, computational time, and even storage (for, after all, you could always store an enormous table of values and simply interpolate within it). – whuber Apr 07 '15 at 14:50
  • I am intending to go for accuracy over speed. Speed is not an issue unless it's ridiculously slow. However, any accuracy more than a `double` is overkill, and will likely be truncated by the system. – einsteinsci Apr 07 '15 at 14:55
  • Check also https://en.wikipedia.org/wiki/Quantile_function#Student.27s_t-distribution – Tim Sep 25 '16 at 07:11
  • Abramowitz & Stegun formula 26.7.5. – Stig Rosenlund Sep 24 '16 at 20:55

0 Answers0