Learn R Programming

distributional (version 0.5.0)

dist_f: The F Distribution

Description

[Stable]

Usage

dist_f(df1, df2, ncp = NULL)

Arguments

df1, df2

degrees of freedom. Inf is allowed.

ncp

non-centrality parameter. If omitted the central F is assumed.

Details

We recommend reading this documentation on https://pkg.mitchelloharawild.com/distributional/, where the math will render nicely.

In the following, let \(X\) be a Gamma random variable with parameters shape = \(\alpha\) and rate = \(\beta\).

Support: \(x \in (0, \infty)\)

Mean: \(\frac{\alpha}{\beta}\)

Variance: \(\frac{\alpha}{\beta^2}\)

Probability density function (p.m.f):

$$ f(x) = \frac{\beta^{\alpha}}{\Gamma(\alpha)} x^{\alpha - 1} e^{-\beta x} $$

Cumulative distribution function (c.d.f):

$$ f(x) = \frac{\Gamma(\alpha, \beta x)}{\Gamma{\alpha}} $$

Moment generating function (m.g.f):

$$ E(e^{tX}) = \Big(\frac{\beta}{ \beta - t}\Big)^{\alpha}, \thinspace t < \beta $$

See Also

stats::FDist

Examples

Run this code
dist <- dist_f(df1 = c(1,2,5,10,100), df2 = c(1,1,2,1,100))

dist
mean(dist)
variance(dist)
skewness(dist)
kurtosis(dist)

generate(dist, 10)

density(dist, 2)
density(dist, 2, log = TRUE)

cdf(dist, 4)

quantile(dist, 0.7)

Run the code above in your browser using DataLab