Re: [R] Convolve 2 uniform distributed variables

2012-05-24 Thread Prof. Dr. Matthias Kohl
take a look at the distr package library(distr) U <- Unif() U2 <- U + U # or U2 <- convpow(U, 2) plot(U2) # or curve(d(U2)(x), from = 0, to = 2) Best Matthias On 24.05.2012 08:29, c...@mail.tu-berlin.de wrote: Hi, I want to convolve 2 uniform distributed [0,1] variables, so that I get this gr

[R] Convolve 2 uniform distributed variables

2012-05-24 Thread corn
Hi, I want to convolve 2 uniform distributed [0,1] variables, so that I get this graphic: http://de.wikipedia.org/wiki/Benutzer:Alfred_Heiligenbrunner/Liste_von_Verteilungsdichten_der_Summe_gleichverteilter_Zufallsvariabler (second graphic) if I do u1<-seq(0,1,length=100) fu1=dunif(u1,min