Professional Documents
Culture Documents
Exponential Random Variable
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: