Re: [R] Help plotting a histogram of X~Exp(1)

2009-03-22 Thread BowlesMcCann
> > If you are looking for methods to handle random variables in R, you > may want to look at the series of packages all beginning with "distr": > distr, distrDoc, distrEx, distrMod, distrSim, distrTeach, distrTEst. > > -- > David Winsemius > On Mar 22, 2009,

[R] Help plotting a histogram of X~Exp(1)

2009-03-22 Thread BowlesMcCann
I want to plot a histogram of X~Exp(1) where X is the sum of Y + Z. To do this, should I simulate values of Y and Z using Y<-runif(100) and Z<-runif(100)? And where do I go from there? Many thanks. -- View this message in context: http://www.nabble.com/Help-plotting-a-histogram-of-X%7EExp%281%2

[R] How do I use R to model this exponential random variable problem?

2009-03-08 Thread BowlesMcCann
Suppose a house is cleaned by three people in succession. The time it takes each cleaner in hours is an Exp(0.5). Assume that the time required for each cleaner is independent. How would I use simulation in R to estimate the probability that it takes longer than a total of 5 hours for the house t