n = 1000
x = randn( n, 1 );
y = randn( n, 1 ) + 0.2*x;
r = corr(x,y)

  nsamples = 500;
  rs = zeros( nsamples, 1 );
for i = 1:nsamples
	  xs = x(randi(n,n,1));
ys = x(randi(n,n,1));
	  rs(i) = corr(xs,ys);
end

hist( rs, 20 )
