You are on page 1of 3

1.

Exponential Random Variable:

Code:
pd = makedist('Exponential','mu',1);
x = 0:15;
y = 1-cdf(pd, x);
figure(1);
plot(x,y);
z=[1:15];
hold on;
plot(z,1./z);
hold on;
plot(z,1./z.^2);
hold on;
plot(z,z.*exp(-z+1));
grid on;
legend('Actual Distribution','Markov','Chebyshev','Chernoff');

Plots:
2. Geometric Random Variable:

Code:
x=[1:30];
y = 1-geocdf(x,0.5);
figure(1);
plot(x,y,'kd');
grid on;
hold on;
plot(x,2./(x),'*');
hold on;
plot(x,2./(x).^2,'*');
hold on;
plot(x,2.^(-x+1),'*');
legend('Actual Distribution','Markov','Chebyshev','Chernoff');

Plots:
Comments:

In case of exponential the bound generated by Chebyshev is better than


the bound generated by Markov inequality. The initial bound generated
by Chernoff is not as good as Markov and Chebyshev but as the value of
‘a’ increases the Chernoff bound gives better approximation than Markov
and Chebyshev.
In case of Geometric Random variable the bound generated by Chernoff
is better than Chebyshev and Chebyshev is better than Markov.

You might also like