Example: The Probability Density Functions

Various probability density functions are exercised. Their use in this example typifies the manner in which other functions in the Pdf class would be used.

import com.imsl.stat.Pdf;

public class PdfEx1 {

    public static void main(String args[]){

        //F Probability density function
        double result = Pdf.F(1.0, 100.0, 100.0);
        System.out.println("Pdf.F(1.0, 100.0, 100.0) is "+result);

        result = Pdf.normal(0.0, 0.0, 5.0);
        System.out.println("Pdf.normal(0.0, 0.0, 5.0) is "+result);
    }
}

Output

Pdf.F(1.0, 100.0, 100.0) is 1.9897309346795427
Pdf.normal(0.0, 0.0, 5.0) is 0.07978845608028655
Link to Java source.