function [vari,stand] = vari_stand(vec)

N = length(vec);
M = N-1;

mysum = 0;
for i = 1:N
    mysum = mysum + (vec(i)- mean(vec))^2;
end

vari  = mysum / M;   % Varaince for sample
stand = sqrt(vari);  % Standard deviation for sample

return
