Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dist_student_t

The (non-central) location-scale Student t Distribution


Description

[Stable]

Usage

dist_student_t(df, mu = 0, sigma = 1, ncp = NULL)

Arguments

df

degrees of freedom (> 0, maybe non-integer). df = Inf is allowed.

mu

The location parameter of the distribution. If ncp == 0 (or NULL), this is the median.

sigma

The scale parameter of the distribution.

ncp

non-centrality parameter delta; currently except for rt(), only for abs(ncp) <= 37.62. If omitted, use the central t distribution.

Details

The Student's T distribution is closely related to the Normal() distribution, but has heavier tails. As ν increases to , the Student's T converges to a Normal. The T distribution appears repeatedly throughout classic frequentist hypothesis testing when comparing group means.

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

In the following, let X be a central Students T random variable with df = ν.

Support: R, the set of all real numbers

Mean: Undefined unless ν ≥ 2, in which case the mean is zero.

Variance:

ν / (ν - 2)

Undefined if ν < 1, infinite when 1 < ν ≤ 2.

Probability density function (p.d.f):

f(x) = Γ((ν + 1) / 2) / (√(ν π) Γ(ν / 2)) (1 + x^2 / ν)^(- (ν + 1) / 2)

See Also

Examples

dist <- dist_student_t(df = c(1,2,5), mu = c(0,1,2), sigma = c(1,2,3))

dist
mean(dist)
variance(dist)

generate(dist, 10)

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

cdf(dist, 4)

quantile(dist, 0.7)

distributional

Vectorised Probability Distributions

v0.2.2
GPL-3
Authors
Mitchell O'Hara-Wild [aut, cre] (<https://orcid.org/0000-0001-6729-7695>), Earo Wang [ctb] (<https://orcid.org/0000-0001-6448-5260>), Matthew Kay [ctb] (<https://orcid.org/0000-0001-9446-0419>), Alex Hayes [aut] (<https://orcid.org/0000-0002-4985-5160>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.