fCdf

Evaluates the F distribution function.

Synopsis

fCdf (f, dfDenominator, dfNumerator)

Required Arguments

float f (Input)
Point at which the F distribution function is to be evaluated.
float dfNumerator (Input)
The numerator degrees of freedom. The argument dfNumerator must be positive.
float dfDenominator (Input)
The denominator degrees of freedom. The argument dfDenominator must be positive.

Return Value

The probability that an F random variable takes a value less than or equal to the input point, f.

Description

The function fCdf evaluates the distribution function of a Snedecor’s F random variable with dfNumerator and dfDenominator. The function is evaluated by making a transformation to a beta random variable and then by evaluating the incomplete beta function. If X is an F variate with \(\nu_1\) and \(\nu_2\) degrees of freedom and \(Y=(\nu_1X)/(\nu_2+ \nu_1 X)\), then Y is a beta variate with parameters \(p=\nu_1/2\) and \(q=\nu_2/2\).

The function fCdf also uses a relationship between F random variables that can be expressed as follows:

\(F_F(f,\nu_1,\nu_2)=1-F_F(1/f,\nu_2,\nu_1)\) where \(F_F\) is the distribution function for an F random variable.

../../_images/Fig9-15.png

Figure 9.22 — Plot of \(F_F(f,1.0,1.0)\)

Example

This example finds the probability that an F random variable with one numerator and one denominator degree of freedom is greater than 648.

from __future__ import print_function
from numpy import *
from pyimsl.math.fCdf import fCdf

f = 648.0
df_numerator = 1.0
df_denominator = 1.0

p = 1.0 - fCdf(f, df_numerator, df_denominator)
print("The probability that an F(1,1) variate ", end=' ')
print("is greater than 648 is %6.4f" % (p))

Output

The probability that an F(1,1) variate  is greater than 648 is 0.0250