Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

R commands sheet

Binomial Distribution:

dbinom(x, n, p) gives the binomial probability density function with parameters


n and p at the values of x.

pbinom(x, n, p) gives the cumulative distribution function with parameters n


and p at the values of x.

Poisson Distribution:

dpois(x,lambda) gives the Poisson probability density function with parameter


lambda at the values of x.

ppois(x,lambda) gives the cumulative Poisson distribution function with


parameter lambda at the values of x.

Geometric Distribution:

dgeom(x, p) gives the geometric probability density function with parameter p


at the values of x.

pgeom(x,p) gives the cumulative geometric probability distribution function


with parameter p at the values of x.

Exponential Distribution:

pexp(x,lambda) gives the cumulative density function with parameter lambda


at the values of x.

Normal Distribution:

pnorm(x,mu,sigma) gives the cumulative normal distribution functions with


mean mu and standard deviation sigma, at the value of x.

qnorm(x,mu,sigma) gives the inverse function of the normal distribution with


mean mu and standard deviation sigma, at the value of x.

t Distribution

pt(x,v) gives the cumulative t distribution function with v degrees of freedom at


the value of x.

qt(x,v) gives the inverse function of the t distribution with v degrees of freedom
at the value of x.
Chi-Square Distribution

pchisq(x,v) gives the cumulative 2 distribution function with v degrees of


freedom at the value of x.

qchisq(x,v) gives the inverse function of the 2 distribution with v degrees of


freedom at the value of x.

F Distribution

pf(x,v1,v2) gives the cumulative F distribution function with v1 and v2 degrees


of freedom at the value of x.

qf(x,v1,v2) gives the inverse function of the F distribution with v1 and v2


degrees of freedom at the value of x.

You might also like