#1




Inverse Incomplete Beta Function
Hi, my name is Brian Russell. I live and work in Calgary, Alberta and just joined this forum, which is great because I have a question.
I am currently putting together code using NR in C++ that I successfully implemented using MathCad. The problem is to compute both forward and inverse Student's t CDF values. I realize from Chapter 6 that the forward problem requires using the incomplete beta function. However, to compute the inverse CDF I need the inverse incomplete beta function. Is this in NR and I have just missed it? Or has someone figured out a neat way to compute it (perhaps table lookup) from the forward function? 
#2




Calculating the Inverse Beta Function.
I was having the same issue and there is nothing I could find that calculates this. In the end I came up with this.
Assuming that you have an implementation of the incomplete beta function. The following code calculates the Inverse Beta function. It produces results very close to the Excel BetaInv function /// <summary> /// Returns the inverse of the cumulative beta probability density function. /// </summary> /// <param name="p">Probability associated with the beta distribution.</param> /// <param name="alpha">Parameter of the distribution.</param> /// <param name="beta">Parameter of the distribution.</param> /// <param name="A">Optional lower bound to the interval of x.</param> /// <param name="B">Optional upper bound to the interval of x.</param> /// <returns>Inverse of the cumulative beta probability density function for a given probability</returns> public double InverseBeta(double p, double alpha, double beta, double A, double B) { double x = 0;} 
Thread Tools  
Display Modes  

