Example: The Inverse Cumulative Distribution Functions

Examples of the inverse cumulative distribution functions are exercised. Their use in this example typifies the manner in which other functions in the InvCdf class would be used.
using System;
using InvCdf = Imsl.Stat.InvCdf;

public class InvCdfEx1
{
    
    public static void  Main(String[] args)
    {
        
        // Inverse Beta
        double x = .5;
        double pin = 12.0;
        double qin = 12.0;
        double result = InvCdf.Beta(x, pin, qin);
      Console.Out.WriteLine("InvCdf.Beta(.5, 12., 12.) is {0,5:0.0000}", result);
        
        // Inverse Chi
      double prob = .99;
        int n = 2;
        result = InvCdf.Chi(prob, n);
      Console.Out.WriteLine("InvCdf.Chi(.99, 2) is {0,5:0.0000}", result);
    }
}

Output

InvCdf.Beta(.5, 12., 12.) is 0.5000
InvCdf.Chi(.99, 2) is 9.2103

Link to C# source.