Nmax=100000;
x=%pi/2*rand(Nmax,1,'u');y=x.*sin(x);
N=Nmax/100:Nmax/100:Nmax;err=[];err2=[];
for i=1:100
  y1=y(1:N(i));
  IN=%pi/2/N(i)*sum(y1);
  VN=1/(N(i)-1)*sum((%pi/2*y1-IN).*(%pi/2*y1-IN));
  err=[err;abs(IN-1)];
  err2=[err2;2*sqrt(VN)/sqrt(N(i))];
end
xbasc();
plot2d1('gll',[N',N'],[err,err2],leg='erreur effective@intervalle de confiance a 95%');