> dbinom(1:5,size=1000,prob=0.0005)
[1] 0.3033791010 0.0758068339 0.0126155111 0.0015729946 0.0001567486
> sum(dbinom(1:5,size=1000,prob=0.0005))
[1] 0.3935312
> diff(pbinom(q=c(0,5),size=1000,prob=0.0005))
[1] 0.3935312
> diff(pbinom(q=c(5,0),size=1000,prob=0.0005, lower=FALSE))
[1] 0.3935312


All the distribution functions have variants:
p probability
d density
q quantile
r random numbers

See the help files, for example ?pbinom

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to