%% Exercice 1
B1=1000;
n1=500;
R1=[];
v=1;
for b1=1:B1
    ech=randn(1,n1);
    R1=[R1,var(ech,1)];
end
V1=cumsum(R1)./[1:B1];
W1=V1-v;
plot(W1,'r');
hold on;
plot(((n1-1)/n1-1)*ones(1,B1),'b');
%%
B2=1000;
n2=100;
ech1=randn(1,100)
R2=[];
v2=var(ech1,1);
for b2=1:B2
    ech2=ech1(randi([1,100],1,100));
    R2=[R2,var(ech2,1)];
end
V2=cumsum(R2)./[1:B2];
W2=V2-v2;
plot(W2,'g');
hold on;
%%


