Skip to content

Computational Probability

6 messages · Rory Winston, Gabor Grothendieck, Brian Ripley +1 more

#
Try a simulation approach.  vignette("rv") for more info.
mean   sd 1% 2.5% 25% 50% 75% 97.5% 99% sims
[1] 0.72 0.45  0    0   0   1   1     1   1 2500
On Fri, Dec 26, 2008 at 7:42 AM, Rory Winston <rory.winston at gmail.com> wrote:
#
Actually the last line could be simplified to just:
mean   sd sims
[1] 0.72 0.45 2500


On Fri, Dec 26, 2008 at 8:33 AM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
#
Look at packages distr* : they can do your example and might do what your 
real applications.
On Fri, 26 Dec 2008, Rory Winston wrote:

            

  
    
#
indeed one could use package distr ...

library(distr)
X <- Unif(Min = 0, Max = 1)
Y <- convpow(X, 10)
p(Y)(6) - p(Y)(4)

Best
Matthias
Prof Brian Ripley wrote: