pepan {epandist}R Documentation

Cumulative distribution function (cdf) for an uncensored epanechnikov distribution

Description

The inverse of this function is qepan.

Usage

pepan(x = 0, mu = 0, r = 5^0.5)

Arguments

x

point on x-axis.

mu

mean of distribution.

r

half the range of the distribution, ie the distance from the mean to the smallest/largest value supported by the distribution. r=5^.5 corresponds to a standard deviation of 1.

Value

probability of value below x given mu and r.

Examples

#Probability of a value below -1.96:
pepan(x=-1.96,mu=0,r=5^.5)

#Cumulative distribution function of epanechnikov distribution:
curve(pepan(x),col='blue',xlim=c(-2.5,2.5),yaxs='i',xaxs='i',
main='Cumulative distribution function',ylab='Probability')

#Cumulative distribution function of standard normal distribution:
curve(pnorm(x),col='green',add=TRUE)

#Legend
legend(x=-2.5,y=1,legend=c('Epanechnikov cdf','Normal cdf'),lty=c(1,1),col=c('blue','green'))

[Package epandist version 1.1.1 Index]