| density_t | R Documentation |
Probability Density Function (PDF), Cumulative Density Function (CDF) and generation of random variables following a Student distribution.
density_t(df, x)
cdf_t(df, x)
random_t(df, n)
df |
degrees of freedom. |
x |
vector of quantiles. |
n |
number of observations. |
The functions density_XXX and cdf_t return numeric vectors of same length as x.
The functions random_XXX return random number (numeric vectors) of length n.
# Probability density function of T with 2 degrees of freedom.
z <- density_t(df = 2, .01 * seq(-100, 100, 1))
# Generating a random vector with each component drawn from a T(2) distribution
z <- random_t(2, 100)
# Computing the probabilty that the random variable X following a T distribution
# with df degrees of freedom is lower than x
z <- cdf_t(df = 12, x = 1.2)
z
z <- cdf_t(df = 12, x = c(0:10)) # array of values
z
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.