Skip to contents

Functions to compute the probability density function, cumulative distribution function, and quantile function for the Student's t distribution.

Usage

students_t_pdf(x, df = 1)

students_t_lpdf(x, df = 1)

students_t_cdf(x, df = 1)

students_t_lcdf(x, df = 1)

students_t_quantile(p, df = 1)

Arguments

x

quantile

df

degrees of freedom (default is 1)

p

probability (0 <= p <= 1)

Value

A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.

See also

Boost Documentation for more details on the mathematical background.

Examples

# Student's t distribution with 3 degrees of freedom
students_t_pdf(0, 3)
#> [1] 0.3675526
students_t_lpdf(0, 3)
#> [1] -1.000889
students_t_cdf(0, 3)
#> [1] 0.5
students_t_lcdf(0, 3)
#> [1] -0.6931472
students_t_quantile(0.5, 3)
#> [1] 0