Next: , Previous: Noncentral Chi-squared Random Variable, Up: Functions and Variables for continuous distributions   [Contents][Index]

52.2.6 F Random Variable

Let S_1 and S_2 be independent random variables with a \(\chi^2\) distribution with degrees of freedom n and m, respectively. Then $$ F = {S_1/n \over S_2/m} $$ has an F distribution with n and m degrees of freedom.

Function: pdf_f (x,m,n)

Returns the value at x of the density function of a F random variable F(m,n), with m,n>0. To make use of this function, write first load("distrib").

The pdf is $$ f(x; m, n) = \cases{ B\left(\displaystyle{m\over 2}, \displaystyle{n\over 2}\right)^{-1} \left(\displaystyle{m\over n}\right)^{m/ 2} x^{m/2-1} \left(1 + \displaystyle{m\over n}x\right)^{-\left(n+m\right)/2} & $x > 0$ \cr \cr 0 & otherwise } $$

Categories:Package distrib ·
Function: cdf_f (x,m,n)

Returns the value at x of the distribution function of a F random variable F(m,n), with m,n>0.

The cdf is $$ F(x; m, n) = \cases{ 1 - I_z\left(\displaystyle{m\over 2}, {n\over 2}\right) & $x > 0$ \cr 0 & otherwise } $$

where $$ z = {n\over mx+n} $$

and \(I_z(a,b)\) is the beta_incomplete_regularized function.

(%i1) load ("distrib")$
(%i2) cdf_f(2,3,9/4);
                                            9  3  3
(%o2)       1 - beta_incomplete_regularized(-, -, --)
                                            8  2  11
(%i3) float(%);
(%o3)                  0.6675672817900802
Categories:Package distrib ·
Function: quantile_f (q,m,n)

Returns the q-quantile of a F random variable F(m,n), with m,n>0; in other words, this is the inverse of cdf_f. Argument q must be an element of [0,1].

(%i1) load ("distrib")$
(%i2) quantile_f(2/5,sqrt(3),5);
(%o2)                  0.5189478385736904
Categories:Package distrib ·
Function: mean_f (m,n)

Returns the mean of a F random variable F(m,n), with m>0, n>2. To make use of this function, write first load("distrib").

The mean is $$ E[X] = {n\over n-2} $$

Categories:Package distrib ·
Function: var_f (m,n)

Returns the variance of a F random variable F(m,n), with m>0, n>4. To make use of this function, write first load("distrib").

The variance is $$ V[X] = {2n^2(n+m-2) \over m(n-4)(n-2)^2} $$

Categories:Package distrib ·
Function: std_f (m,n)

Returns the standard deviation of a F random variable F(m,n), with m>0, n>4. To make use of this function, write first load("distrib").

The standard deviation is $$ D[X] = {\sqrt{2}\, n \over n-2} \sqrt{n+m-2\over m(n-4)} $$

Categories:Package distrib ·
Function: skewness_f (m,n)

Returns the skewness coefficient of a F random variable F(m,n), with m>0, n>6. To make use of this function, write first load("distrib").

The skewness coefficient is $$ SK[X] = {(n+2m-2)\sqrt{8(n-4)} \over (n-6)\sqrt{m(n+m-2)}} $$

Categories:Package distrib ·
Function: kurtosis_f (m,n)

Returns the kurtosis coefficient of a F random variable F(m,n), with m>0, n>8. To make use of this function, write first load("distrib").

The kurtosis coefficient is $$ KU[X] = 12{m(n+m-2)(5n-22) + (n-4)(n-2)^2 \over m(n-8)(n-6)(n+m-2)} $$

Categories:Package distrib ·
Function: random_f (m,n)
    random_f (m,n,k)

Returns a F random variate F(m,n), with m,n>0. Calling random_f with a third argument k, a random sample of size k will be simulated.

The simulation algorithm is based on the fact that if X is a Chi^2(m) random variable and Y is a \(\chi^2(n)\) random variable, then $$ F={{n X}\over{m Y}} $$

is a F random variable with m and n degrees of freedom, F(m,n).

To make use of this function, write first load("distrib").


Next: , Previous: Noncentral Chi-squared Random Variable, Up: Functions and Variables for continuous distributions   [Contents][Index]