On Sep 9, 2011, at 03:51 , Jeff Newmiller wrote:

> The diff function would be helpful.


...or not:

> sum(ppois(0:1000, lambda=2.345, lower=F))
[1] 2.345

(if this was homework: the hard bit is to figure out _why_ this works.)

> annie Zhang <annie.zhang2...@gmail.com> wrote:
> 
> Hi All,
> 
> How can I get the expected value from a discrete cdf? Is there any R
> function that can do this?
> 
> Thanks,
> Annie

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com
"Døden skal tape!" --- Nordahl Grieg

______________________________________________
R-help@r-project.org 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