This document contains instructions for three exercises:
1. Implement the Box-Muller transform to generate random numbers from a Gaussian distribution and compare the results to the probability density function through a histogram.
2. Use the inverse transform method to generate exponentially distributed random numbers from uniformly distributed inputs based on the exponential probability density function, and compare the results to the given function through a histogram.
3. Plot histograms of sums of random variables from a uniform and exponential distribution for different values of N, and observe that the shapes resemble a Gaussian distribution, relating to the central limit theorem.
This document contains instructions for three exercises:
1. Implement the Box-Muller transform to generate random numbers from a Gaussian distribution and compare the results to the probability density function through a histogram.
2. Use the inverse transform method to generate exponentially distributed random numbers from uniformly distributed inputs based on the exponential probability density function, and compare the results to the given function through a histogram.
3. Plot histograms of sums of random variables from a uniform and exponential distribution for different values of N, and observe that the shapes resemble a Gaussian distribution, relating to the central limit theorem.
This document contains instructions for three exercises:
1. Implement the Box-Muller transform to generate random numbers from a Gaussian distribution and compare the results to the probability density function through a histogram.
2. Use the inverse transform method to generate exponentially distributed random numbers from uniformly distributed inputs based on the exponential probability density function, and compare the results to the given function through a histogram.
3. Plot histograms of sums of random variables from a uniform and exponential distribution for different values of N, and observe that the shapes resemble a Gaussian distribution, relating to the central limit theorem.
This document contains instructions for three exercises:
1. Implement the Box-Muller transform to generate random numbers from a Gaussian distribution and compare the results to the probability density function through a histogram.
2. Use the inverse transform method to generate exponentially distributed random numbers from uniformly distributed inputs based on the exponential probability density function, and compare the results to the given function through a histogram.
3. Plot histograms of sums of random variables from a uniform and exponential distribution for different values of N, and observe that the shapes resemble a Gaussian distribution, relating to the central limit theorem.
Implement the Box-Muller transform as a function and plot a histogram of the
resulting random numbers. Compare the result with the probability density function of a Gaussian distribution.
Inverse Transform
The exponential distribution has a probability density function fX (x, ) (a plot
for = 1 is shown in Fig. 1) defined by: ( ex , x 0, fX (x; ) = (1) 0, x < 0. Calculate the inverse transform. Generate 10000 exponentially distributed random numbers ( = 1) from uniformly distributed random numbers, plot a histogram and compare it to Fig. 1. Plot a normalized histogram using the trapz and bar commands.
The Central Limit Theorem
The random variables X1 , X2 , Xn are each defined as the sum of a uniformly
(interval [0, 1]) and an exponentially ( = 1) distributed random variable. PN Plot the histograms consisting each of 100000 samples of n=1 Xn for N = 1, 5, 10. Choose an appropriate number of bins for the histograms. What to the shapes remind you of? Why (Do a google search for the central limit theorem)?
Figure 1: The probability density function of the exponential distribution for