[R] get mean from cdf
peter dalgaard
pdalgd at gmail.com
Fri Sep 9 08:38:24 CEST 2011
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.zhang2010 at 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.mes at cbs.dk Priv: PDalgd at gmail.com
"Døden skal tape!" --- Nordahl Grieg
More information about the R-help
mailing list