calculate degrees of freedom for repeatability test