z=(1:50000)';
x1=cumsum(normrnd(0,1,50000,1))./z;
x2=cumsum(stabrnd(1.7,50000))./z;
x3=cumsum(stabrnd(1.3,50000))./z;
x4=cumsum(trnd(1,50000,1))./z;
%figure
plot(z,x1,'r',z,x2,'g',z,x3,'b',z,x4,'k')
title('Law of Large Numbers for Stable, a=2 (red), a=1.7 (green) a=1.3 (blue%) a=1 (black)')
xlabel('n')
ylabel('sample mean of n random variables')