function ttt=stats1(th,theta,outl)
% averages entries across colums 4 and last
ttt=[theta;median(th)-theta;median(abs(th-repmat(theta,size(th,1),1)))];
if nargin>2
    ttt=[ttt;mean(abs(th)>outl)];
end
k=size(ttt,2);
if k>3
    ttt=[ttt(:,1:3) mean(ttt(:,4:k),2)];
end

end