Write a program (MATLAB) which generates exponential random variables, and use it to test the Central...

50.1K

Verified Solution

Question

Electrical Engineering

Write a program (MATLAB) which generates exponential randomvariables, and use it to test the Central Limit Theorem as follows.For various values of n (say, 5, 10, 20, 50, 100, 1000), generatesamples of the random variable Mn = 1/n \tiny \sum Xi where Xi areiid exponential random variables. A very simple method forgenerating exponential random variables is given on page 196 of thetextbook (read that section). Plot the discretized CDF for Mn (anapproximation of the CDF using discrete bins) for each nsuperimposed on the theoretical Gaussian CDF according to theCentral Limit Theorem (or plot them next to each other). Calculatethe sample mean and variance according to the material in the bookand compare these to the theoretical values. Comment briefly onyour results. Show all graphs and calculations. Include a copy ofyour code. Remember, you will need to generate a large number ofsamples of Mn for each n in order to get decent histograms. Isuggest at least 100+ samples. 100 samples of M1000 require 100,000exponential samples. You may choose any mean and variance you wantfor your exponential random numbers, but keep these fixed for allsamples so that the results are comparable. Using the programwritten for the previous problem, repeat the whole experiment, butnow choose a random mean and variance for each exponential sample.Thus, the Mn now will not be sums of identically distributed randomvariables. Show your results and comment. For this case, make surethat the distributions you use to choose your mean and variance ateach sample are fixed throughout. Write the code in MATLAB.

Answer & Explanation Solved by verified expert
3.9 Ratings (609 Votes)
Distribution of Random variables Initialization clear allclc Rate Exponential Distribution lambda4 Probability for bernoulli    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students