Generation of sequence of Random Numbers with a Non-Uniform Distribution Using MATLAB

$19.00$14.001255 reads

Question

Suppose we only have a random number generator, which has a U(0, 1) distribution. But we want to generate a sequence of random numbers with a non-uniform distribution (e.g., Exp (2); Par(2)). Now, please

  • first use the random number generator to generate 105 uniformly (U(0; 1)) distributed samples;
  • then transform those samples to data points, which should have a Exp(2), or Par(2)
  • distribution;
  • finally plot those transformed samples by using the hist function.

 

       1. MATLAB codes, which should be in script _les (.m);

       2. Two figures, which should be in eps format (.eps).

 

Summary

This question belongs to MATLAB software and discusses about application of MATLAB to probability and statistics and how to generate a sequence of random numbers with a non-uniform distribution.

 

 

 

 

Add to Cart