Histogram overlay a plot

1. Suppose X is a random variable with the pdf  where b > 0. Suppose we can generate observations from f(z). Explain how we can generate observations from .

2. Determine a method to generate random observations for the logistic pdf, (4.4.11). Write an R function that returns a random sample of observations from a logistic distribution. Use your function to generate 10,000 observations from this pdf. Then obtain a histogram (use hist(x,pr=T), where x contains the observations). On this histogram overlay a plot of the pdf.

Posted in Uncategorized

Leave a Reply