Moments of the ratio of two dependent quadratic forms