# Continuous Variables generating from Simulation by Ross Sheldon.M

These questions are exercises from chapter Generating Continuous Variables.

14.Let $G$ be a distribution function with density $g$ and suppose, for constants $a < b$, we want to generate a random variable from the distribution function $$F(x)=\frac{G(x)−G(a)}{G(b)-G(a)}, a\le x\le b$$ (a) If $X$ has distribution $G$, then $F$ is the conditional distribution of $X$ given what information?

(b) Show that the rejection method reduces in this case to generating a random variable $X$ having distribution G and then accepting it if it lies between a and b.

26.Give an efficient algorithm to generate the first 10 times units of a non-homogeneous Poisson process having intensity function $$\lambda(t)=\left\{\begin{array}{ll} \frac{t}{5} &\textrm{0<t<5}\\ 1+5(t-5) &\textrm{5<x<10}. \end{array}\right.$$

For 14, I see it looks a combination of Uniform distribution and $F(G(X))$, this kind compound function. However, I just don't get it.

As for 26, I read the solution manual and I can use R to generate either non-homogeneous process. I think I can first get a $u\sim U[0,1]$, if this $u<5$, do the process with $\lambda(t)=\frac{t}{5}$, otherwise do the another process. I don't whether this way would work.

• For 14: it is conditionned by event $a<X<b$. – Jean Marie Apr 9 '17 at 8:12