F Distribution

DESCRIPTION:
Density, cumulative probability, quantiles and random generation for the F distribution.

USAGE:
df(x, df1, df2)
pf(q, df1, df2, ncp=0)
qf(p, df1, df2)
rf(n, df1, df2)

REQUIRED ARGUMENTS:
x:
vector of (positive) quantiles. Missing values (NAs) are allowed.
q:
vector of (positive) quantiles. Missing values (NAs) are allowed.
p:
vector of probabilities. Missing values (NAs) are allowed.
n:
sample size. If length(n) is larger than 1, then length(n) random values are returned.
df1:
degrees of freedom for the numerator. This is replicated to be the same length as p or q or the number of deviates generated. Non-integer values are allowed, but missing values are not.
df2:
degrees of freedom for the denominator. This is replicated to be the same length as p or q or the number of deviates generated. Non-integer values are allowed, but missing values are not.

OPTIONAL ARGUMENTS:
ncp:
vector of positive numbers giving the noncentrality parameter. See Chisquare for a description of the parameterization.

VALUE:
density (df), probability (pf), quantile (qf), or random sample (rf) for the F-distribution with degrees of freedom df1 and df2.

SIDE EFFECTS:
The function rf causes creation of the dataset .Random.seed if it does not already exist, otherwise its value is updated.

DETAILS:
Missing values (NA) are allowed.

Elements of q or p that are missing will cause the corresponding elements of the result to be missing.


BACKGROUND:
The F distribution takes values on the positive real line. It is the distribution of the ratio of two chi-squared variates each divided by its degrees of freedom. The chi-square in the numerator has df1 degrees of freedom, and the chi-square in the denominator has df2 degrees of freedom. By far the most common use of the F distribution is for testing hypotheses under the Gaussian assumption (see Normal). The F can also be used to give an approximate confidence interval for the binomial distribution.

REFERENCES:
Johnson, N. L. and Kotz, S. (1970). Continuous Univariate Distributions, vol. 2. Houghton-Mifflin, Boston.

SEE ALSO:
set.seed , Chisquare , Normal .

EXAMPLES:
1 - pf(stat, 4, 12) # p-value of stat
rf(10, 5, 15) #sample of 10 with 5 and 15 degrees of freedom

# power of a test for several noncentrality values 1 - pf(qf(.95, 4, 5), 4, 5, 0:10)