dist_f: The F Distribution

View source: R/dist_f.R

dist_fR Documentation

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

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)


distributional documentation built on March 31, 2023, 7:12 p.m.