function Vars=StateVariance(counts,sam,res) 
Varsi=zeros(sam/res);

for i=res:res:sam
Varsi(i/res)=var(efficiency(counts, i));
end

Vars=Varsi;