<P> Notationally, the capital letter Y is used in specifying the model, while lower - case y in the definition of the residuals; that is because the former are hypothesized random variables and the latter are actual data . </P> <P> We can generalise this to multiple regression involving p parameters and covariates (e.g. p − 1 predictors and one mean), in which case the cost in degrees of freedom of the fit is p . </P> <P> The demonstration of the t and chi - squared distributions for one - sample problems above is the simplest example where degrees - of - freedom arise . However, similar geometry and vector decompositions underlie much of the theory of linear models, including linear regression and analysis of variance . An explicit example based on comparison of three means is presented here; the geometry of linear models is discussed in more complete detail by Christensen (2002). </P> <P> Suppose independent observations are made for three populations, X 1,..., X n (\ displaystyle X_ (1), \ ldots, X_ (n)), Y 1,..., Y n (\ displaystyle Y_ (1), \ ldots, Y_ (n)) and Z 1,..., Z n (\ displaystyle Z_ (1), \ ldots, Z_ (n)). The restriction to three groups and equal sample sizes simplifies notation, but the ideas are easily generalized . </P>

How many degrees of freedom in a t test