[R] Rv generation

nmi13 nmi13 at ext.canterbury.ac.nz
Thu Sep 14 08:16:31 CEST 2006


Hi,
 Can Someone inform me how to generate RV's using the below CDF, by inverse 
technique.
Thanks for your help and time.

My CDF is as follows
\[
F(x)=0 \ \text{if} \  x < 0\]\[
F(x)=\{\frac{x-x_i}{x_{i+1}-x_{i}}*(p_{i+1}-p_{i})\}+p_{i}\
\forall \ x_{i}\leq x < x_{i+1} \]
\[ F(x)=1 \ \text{if} \  x > x_{i+1}
\]
Regards
Murthy



More information about the R-help mailing list