# Relationship between ratios and averages of ratios?

My colleague and I were wondering: For a weighted average of ratios - what weight would need to be assigned to each term in the expression such that the result of the weighted average was the same as the sum of the numerators in the ratios divided by the sum of the denominators in the ratios:

$\displaystyle \frac{\sum_{i = 1}^{n} x_i }{\sum_{i = 1}^{n} y_i} = \frac{\sum_{i = 1}^{n} ( (\frac{x_i}{y_i}) ? ) }{n}$

In the equation above, what would the "?" need to be such that the equality holds?

-

Well, I suppose this isn't a terribly insightful answer, but $$\frac{\sum_{i=1}^n x_i}{\sum_{i=1}^n y_i}=\frac{\sum_{i=1}^n\big(\!\frac{x_i}{y_i}\!\big)\cdot w_i}{n}$$ where $$w_i=\frac{ny_i}{\sum_{i=1}^ny_i},$$ because $$\frac{\displaystyle\sum_{i=1}^n\left(\frac{x_i}{y_i}\right)\cdot \left(\frac{ny_i}{\sum_{i=1}^ny_i}\right)}{n}=\displaystyle\sum_{i=1}^n\left(\frac{x_i}{y_i}\right)\cdot \left(\frac{y_i}{\sum_{i=1}^ny_i}\right)=\sum_{i=1}^n\left(\frac{x_i}{\sum_{i=1}^ny_i}\right)=\frac{\sum_{i=1}^n x_i}{\sum_{i=1}^n y_i}.$$