| density_chi2 | R Documentation |
Density, cumulative distribution function and random generation for chi-square distribution.
density_chi2(df, x)
cdf_chi2(df, x)
random_chi2(df, n)
df |
degrees of freedom. |
x |
vector of quantiles. |
n |
number of observations. |
numeric vector
Functions density_XXX and cdf_XXX return numeric vectors of same length as x.
Function random_XXX returns a numeric vector of length n.
# Probability density function for a Chi-Square distribution with 3 degrees of freedom.
z <-density_chi2(df = 3,.01 * seq(-100, 100, 1))
# Computing the probability that the random variable X following a Chi-Square distribution
# with df degrees of freedom is lower than x
cdf_chi2(df = 3, x= 1:10)
# Generating a random vector with each component drawn from a Chi-square distribution
# with df degrees of freedom
z <- random_chi2(df = 3, n = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.