Suppose that y is an n times 1 observable random vector that
     Suppose that y is an n times 1 observable random vector that follows the linear model  y = X  beta +  ,  where  beta is a p times 1 vector of unknown parameters,  is an observable random vector whose distribution is N(Q, sigma2I), and sigma2 is an unknown positive parameter. Let p* = rank(X) and Px = X(X\'X)-X\'.  Let A be an n times n symmetric and idempotent matrix of constants. Let r = rank(A). Find constants c1, c2, and c3 and an n times 1 vector of constants  a such that C1+  a\'  y + c2  y\'  A  y has a central x2 distribution with degrees of freedom c3. 
  
  Solution
Since A is symmetric and idempotent A2=A
Hence diagonal entries of A are either 0 or 1
If r = Rank (A)
r = no of non zero rows in matrix A
Hence there are c3 independent variables with sum following chi square distribution.
Df = c3

