A. Generate and plot the following: 1. A histogram for Gaussian "Normal" random variable with zero-mean and unit variance. Calculate its mean and variance. 2. Repeat 1 for a uniformly distributed...

1 answer below »



A. Generate and plot the following:


1. A histogram for Gaussian "Normal" random variable with zero-mean and unit variance. Calculate its mean and variance.


2. Repeat 1 for a uniformly distributed random variable on the interval [-1,1].


3. Repeat 1 for an exponentially distributed random variable with







B. Apply the following transformations on ::




a.




b.




Show the histograms of and . Calculate their means and variances and comment on your findings.




C. Verify the central limit theorem by performing the following tasks:




a. Generate 100 Gaussian "Normal" random variables (where each is of zero-mean and unit variance) and add them. Show the histograms for the first and the summed random variables. What is the mean and variance of the resultant random variable?




b. Repeat C(a) but with a sum of 2, 10, 100 random variables that are exponentially distributed with . What is the mean and variance of the resultant random variables, i.e., for the three cases 2, 10 and 100?





Answered Same DayDec 21, 2021

Answer To: A. Generate and plot the following: 1. A histogram for Gaussian "Normal" random variable with...

David answered on Dec 21 2021
119 Votes
SOLUTION:
A)
1. I generated a 100 random observations from N (0, 1). Let
X1 denote these observations. Then the code for plotting
its histogram and
computing its mean and variance in
matlab is:
% Run the following in matlab
x1=normrnd(0,1,100,1); % generates 100 observations from
N(0,1)
hist(x1)
m1=mean(x1)% computes mean of x1
v1= var(x1)% computes variance of x1


Here the histogram turns out as shown in the figure above
and the mean and variances are:
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3
0
5
10
15
20
25
Mean= m1= 0.1149
Variance = v1= 0.8680
2) I then generated 100 observations from U[-1,1] and
stored them in a variable named X2. And then obtain the
following results on histogram, mean and variance by
running the following code:
% Run the following in matlab
x2=unifrnd(-1,1,100,1); % generates 100 observations from
U(-1,1)
hist(x2)
m2=mean(x2)% computes mean of x2
v2= var(x2)% computes variance of x2

Mean m2= 0.0560
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
0
2
4
6
8
10
12
14
16
Variance v2=0.3529
3) I then generated 100 observations from exponential
distribution with mean 100 and stored them in a variable
named X3. And then obtain the following results on
histogram, mean and variance by running the following
code:
% Run the following in matlab
x3=exprnd(100,100,1); % generates 100 observations from
exponential with mean 100
hist(x3)
m3=mean(x3)% computes mean of x1
v3= var(x3)% computes variance of x1
0 100 200 300 400 500...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here