dist_f {distributional} | R Documentation |
The F Distribution
Description
Usage
dist_f(df1, df2, ncp = NULL)
Arguments
df1 , df2 |
degrees of freedom. |
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
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)