%problem 2
 alpha=3/4;
for n=1:1000000
    x(n)=randn(N,1);
    f(n)=exp(-abs(x(n)));
    g1(n)=(x(n)*exp(-abs(x(n))^alpha))/f(n);
    g2(n)=(exp(-abs(x(n))^alpha))/f(n);
    s=sum(g2);
    miu(n)=sum(g1)/s;
    g3(n)=((x(n)-miu(n))^2)*exp(-abs(x(n))^alpha)/f(n);
    variance(n)=sum(g3)/s;
    g4(n)=((x(n)-miu(n))^4)*exp(-abs(x(n))^alpha)/f(n);
    kurtosis(n)=(sum(g4)/s)/variance(n)^2;
    
    
end
figure(1);
plot(miu);
figure(2);
plot(variance);
figure(3);
plot(kurtosis);
