For the exponential random variable with p(x) = e^(−x) for 10> x ≥ 0, obtain the 4-level uniform quantizer using MATLAB. You have to vary the step size (delta) in order to find the optimum step size that would minimize the distortion D. ( formula of distortion is found on the graph ). Note, b1 = delta, b2 = 2*delta, b3 = 3*delta, b4 = 10 and Y1 = 0.5* delta, Y2 = 1.5*delta, Y3 = 2.5*delta, Y4 = 3.5* delta.
MATLAB Code:
close all
clear
clc
delta = 0.001:0.001:5;
D_List = zeros(1, length(delta));
parfor d = 1:length(delta)
b = [delta(d)*(0:3) 10];
y = delta(d)*(0.5:1:3.5);
D = 0;
for i = 1:4
D = D + integral(@(x) ((x - y(i)).^2) .* exp(-x), b(i),
b(i+1));
end
D_List(d) = D;
end
plot(delta, D_List)
xlabel('\Delta'), ylabel('D')
opt_delta = delta(D_List == min(D_List));
fprintf('Optimum delta = %.4f\n', opt_delta)
Output:
Optimum delta = 1.0310
Plot:
For the exponential random variable with p(x) = e^(−x) for 10> x ≥ 0, obtain the 4-level unifo...
Write a MATLAB code to obtain the 4-level uniform quantizer for the exponential random variable with p(x) = e^(−x ) for x ≥ 0.
FR2 (4+4+4 12 points) (a) Let XI, X2, X10 be a randoin sample from N(μι,σ?) and Yi, Y2, 10 , Y 15 be a random sample from N (μ2, σ2), where all parameters are unknown. Sup- pose Σ 1 (Xi X 2 0 321 (Y-Y )2-100. obtain a 99% confidence interval for σ of having the form b, 0o) for some number b (No derivation needed). (b) 60 random points are selected from the unit interval (r:0 . We want...