# Weighted average with multiple weighing criteria

I've tried searching for a general method for calculating a weighted average with multiple weight variables, but no luck so far (almost all search results are related to Excel implementation and I don't know Excel formulae).

Let's say I have a vector $X = (x_1, x_2, ..., x_n)$ and two weight vectors $U = (u_1, u_2, ..., u_n)$ and $V = (v_1, v_2, ..., v_n)$. The weighted average of $x_1, x_2, ..., x_n$ using just $U$ as weight would be $\frac{u_1 x_1 + u_2 x_2 + ... + u_n x_n}{u_1 + u_2 + ... + u_n}$.

But what's the weighted average of $x_1, x_2, ..., x_n$ using both $U$ and $V$ as weights? Would it just be $\frac{u_1 v_1 x_1 + u_2 v_2 x_2 + ... + u_n v_n x_n}{u_1 v_1 + u_2 v_2 + ... + u_n v_n}$?

(EDIT) To give some context, here's a crude example: let's say I have a bunch of students whose average marks I want to estimate. I could do so using past data on students' performance.

Assume that students have 2 "characteristics" - subject (can be either subject A or subject B) and school (school X or school Y). Now I know that the test group of students being analyzed is divided as follows: 60% of them study subject A and 40% subject B. Also 70% of them study in school X and 30% in school Y.

I have past data from which I calculate the average marks for:

1. subject A students = 80,
2. subject B students = 85,
3. school X students = 70,
4. school Y students = 90.

I want to estimate the average marks for the test set of students which reflects the proportions of the characteristics I described above. So let's say there was only 1 characteristic, i.e. the subject, then my estimate would simply be $80 \times .6 + 85 \times .4$, but what should my estimate be if I want to incorporate both the characteristics?

• Could you explain the intended meanings of these weights and what you hope the "multiply weighted" average would reflect? – whuber Aug 25 '17 at 20:54
• @whuber: I edited the question with the kind of application I had in mind. Hopefully that clarifies the motivation behind the question! – user9343456 Aug 25 '17 at 21:07