I was wondering what the general formula is for calculating the weight (%) of each category in a gradebook given the individual grade for each category and the final grade. For example, lets say category 1 was a 96%, category 2 was a 93% and category 3 was a 89% and the total was 92.7%, what formula could I use to determine that category 1 and 3 were worth 30% and category 2 was worth 40%. I am looking for a formula that scales up, meaning for n categories given individuals and the final grade the weight of each category can be calculated.
Thanks
What you are essentially after is a regression. In mathematical terms, you have
$$\sum w_i x_i = S$$
$$\sum w_i = 1$$
With only this much data, you cannot analytically solve this system. There isn't a unique solution for $n > 2$. Since there isn't a way to solve it analytically, you will have to follow an iterative process so that at the end of each step, the weights refine and bring the sum closer and closer to $S$. Which solution you end up on depends on your initial guess for the weights
Let us consider the function
$$f(\bar{w}) = \sum_{i=1}^nw_ix_i - S$$
We take an initial guess as $w^{(0)}_i = \frac{1}{n} \forall i \in \{1,2...,n\}$
Now,$\nabla f = \bar{x}$
Let the next guess be $\bar{w}^{(1)} = \bar{w}^{(0)} - (\bar{x}^T\bar{x})^{-1}\bar{x}^Tf(\bar{w}^{0})$
And keep refining till you get close to within a given error of $S$