Exact Formulas for Averages of Secular Coefficients