## Degrees of Freedom

In the Chi-square test, my textbook says that degrees of freedom are the number of independent variables minus one so df = n - 1

does this mean that that n is equal to the number of observed values from the equation aka the number of times I've added together the numbers?

sum [(O-E)^2]/E

Is there an instance where it isn't equal to the number of observed values I have?

(there's an example in my book (but no answer) with an experiment with observed values of 2 trials of genetic crosses where observed in
trial 1 was 0.5
trial 2 was 0.3
but both of these values were measuring the same variable which was heterozygosity. The expected value is 0.8. Does this mean the df = 1? or is it 0 since there is only 1 independent variable?)

thanks!
 PhysOrg.com science news on PhysOrg.com >> King Richard III found in 'untidy lozenge-shaped grave'>> Google Drive sports new view and scan enhancements>> Researcher admits mistakes in stem cell study
 df=n-1, n means number of the random variables, in this case n is the number of trials. df=n-1=2-1=1