function chs=chisquared
chs=[];
for i=1:1000
    U=rand(1,16);
    N=[sum(U<=.25) sum((U>.25)&(U<=.5)) sum((U>.5)&(U<=.75)) sum(U>.75)];
    chs=[chs sum((N-4).^2./4)];
end

    
    