Look at packages distr* : they can do your example and might do what your real applications.

On Fri, 26 Dec 2008, Rory Winston wrote:

Hi

Firstly , happy Christmas to R-Help! Secondly, I wonder if anyone can help
me with the following query: I am trying to reproduce some explicit
probability calculations performed in APPL (a Maple extension for
computational probability). For instance, in APPL, to compute the
probability that the sum of 10 iid uniform variables [0,1] will be between 4
and 6, (i..e Pr( 4 < \sum_{i=1}^{10}X_i < 6)), I can type:

X := UniformRV(0, 1);
Y := ConvolutionIID(X, 10);
CDF(Y,6) - CDF(Y,4);

which gives the required probability .7222. Is there any way to perform
these type of calcuations in R in a general way? I realise that a lot of the
machinery behind these computations comes from Maple's symbolic engine, but
are there any R extensions for these kind of calculation?

Cheers
Rory

        [[alternative HTML version deleted]]

______________________________________________
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.


--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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