Question: [15] The Matlab function randn generates samples of a Gaussian random variable, with mean 0 and standard deviation 1. In this exercise, we will investigate

[15] The Matlab function randn generates samples of a Gaussian random variable, with mean 0 and standard deviation 1. In this exercise, we will investigate the ability of the function to generate truly Gaussian samples.

(a) [5] Let X be a unit-Gaussian random variable N(0, 1). Find the following probabilities by hand: P(0 X 0.5) and P(0.9 X 1).

(b) [5] Generate 1000 samples of unit-Gaussian random variable in MATLAB and store it in a vector X. Use the MATLAB hist function to create a histogram of the values in X with 100 bins. Please include your code and your output plot. Comment on the approximation to a unit-Gaussian.

(c) [5] Use the histogram to estimate probabilities calculated in part (a). You can do this by adding up the number of samples within the bins divided by the total number of samples, 1000. How close is your estimation to the actual probabilities?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!