F Distribution

DESCRIPTION:

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

USAGE:

df(x, df1, df2, log=F) 
pf(q, df1, df2, ncp=0) 
qf(p, df1, df2) 
rf(n, df1, df2, bigdata=F) 

REQUIRED ARGUMENTS:

x
vector or bdVector of (positive) quantiles. Missing values ( NAs) are allowed.
q
vector or bdVector of (positive) quantiles. Missing values ( NAs) are allowed.
p
vector or bdVector 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 or bdVector of positive numbers giving the noncentrality parameter. See Chisquare for a description of the parameterization.
bigdata
a logical value; if TRUE, an object of type bdVector is returned. Otherwise, a vector object is returned. This argument can be used only if the bigdata library section has been loaded.
log
a logical scalar; if TRUE, df will return the log of the density, not the density itself.

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.

For details on the uniform random number generator implemented in S-PLUS, see the set.seed help file.

REFERENCES:

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

SEE ALSO:

, , .

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)