Probabilities in R: The normal distribution
R has functions to compute values of probability density functions (p.d.f.) and cumulative distribution functions (c.m.d.) for most common distributions.
Explanation
par(mfrow=c(2,1))
t<-seq(-5,5,0.01)
plot(t,dnorm(t),type="l")
x<-seq(-5,5,0.01)
plot(x,pnorm(x),type="l")
Top: The probability density function for the normal distribution. Bottom: The cumulative distribution function for the normal distribution.
For example the normal density: $$p(t)=\frac{1}{\sqrt{2\pi}}e^{-\frac{t^2}{2}}$$
Details
The p.d.f. for the normal distribution is $$p(t)=\frac{1}{\sqrt{2\pi}}e^{-\frac{t^2}{2}}$$ The c.d.f. for the normal distribution is $$\Phi(x)=\int\limits_{-\infty}^x\frac{1}{\sqrt{2\pi}}e^{-\frac{t^2}{2}}dt$$
Examples
\begin{xmpl} dnorm() gives the value of the normal p.d.f. \end{xmpl} \begin{xmpl} pnorm() gives the value of the normal c.d.f. \end{xmpl}