An application of partial derivatives

112 Views Asked by At

Students always ask their professors: "What do I need to make on the next test in order to get a B?". I developed an application in R to help answer these questions. Even though I already derived the formula (see below) to do it, I am trying a second methodology (using partial derivatives) and it does not seem to work, which explains this present question.

1- Preliminaries

Grade categories

Courses have several grade categories (e.g. tests, homework assignments, quizzes, ...). Let the $n$ grade categories of a given course be $X_i$ with $i \in \{1, 2, ..., n\}$.

Scores in each grade category

Each grade category usually has several assessments throughout the semester/quarter. Let $X_{ij}$ denote the $j^{th}$ assessment score in the category $X_i$ with $j \in \{1, 2, ..., n_i\}$. For example, if $X_1$ refers to exams, then $X_{13}$ is the score obtained in the third exam. Note that $X_{ij}$ is a score out of 100. $n_i$ is the total number of assessments in $X_i$.

Grade category weights

The grade categories in a course are often weighed differently. Let $w_i$ represent the weight of grade category $X_i$ with $i \in \{1, 2, ..., n\}$. It is important to note that $w_i$ is in decimal form and not in percentage. For instance, if grade category $X_1$ accounts for 50% of the total grade, then $w_1 = 0.5$.

Grade category averages

$\bar{X_1}$ represent the average score of all $n_1$ assessments within the grade category $X_1$. If there were 3 assessments in the category $X_1$ and the scores were: $X_{11} = 75$, $X_{12} = 80$ and $X_{13} = 85$, then $\bar{X_1} = 80$. The general formula to compute $\bar{X_i}$ is:

$$ \bar{X_i} = \frac{\sum_{k = 1}^{n_i}X_{ik}}{n_i} $$

Total grade

Computing a student's total grade consists in:

  • computing the weighted average of each grade category
  • adjusting the sum of weighted averages by the sum of weights

The second step is important especially if the student wants to know their total grade before a specific grade category has been assessed. For example, let's consider a course with 3 grade categories: exams (50%), quizzes (20%) and homework (30%). If only exams and quizzes have been given (and no homework), then the sum of weighted averages of exams and quizzes must be adjusted by $0.7$ (i.e. 0.5 + 0.2 = 0.7). Let $G$ be the total grade, it is computed as:

$$ G = \frac{ \sum_{i = 1}^{n}w_i\bar{X_i} }{ \sum_{i = 1}^{n}w_i } $$

2- Computing the answer

My first methodology

Let $G^*$ be a student's desired total grade. The student wants to know what they should make in the next assessment of $X_1$ in order to reach $G^*$. The student's performance in the next assessment of $X_1$ is $X_{1(n_1 + 1)}$. Essentially, the student is hoping to bring up $\bar{X_1}$ high enough so that the total grade equal $G^*$. Let's denote the desired/target grade category average as $\bar{X_1}^*$

Given the above, $G^*$ can be expressed as:

$$ G^* = \frac{ \sum_{i = 1}^{n}w_i\bar{X_i} }{ \sum_{i = 1}^{n}w_i } \\ $$

$$ G^* = \frac{ w_1\bar{X_1}^* + \sum_{i = 2}^{n}w_i\bar{X_i} }{ \sum_{i = 1}^{n}w_i }\\ $$

Solving for $\bar{X_1}^*$, we obtain:

$$ \bar{X_1}^* = \frac{ \sum_{i = 1}^{n} w_i \ G^* - \sum_{i = 2}^{n}w_i\bar{X_i} }{ w_1 } \text{(equation 1)} $$

At this point, we need to expand $\bar{X_1}^*$:

$$ \bar{X_1}^* = \frac{ \sum_{i = 1}^{n_1 + 1}X_{1i} }{ n_1 + 1 } $$

which can be rewritten as:

$$ \bar{X_1}^* = \frac{ \sum_{i = 1}^{n_1}X_{1i} + X_{1(n_1+1)} }{ n_1 + 1 } $$

The last set of steps is to set (equation 1) to the expression for $\bar{X_1}^*$ and then solve for $X_{1(n_1+1)}$. The final result is:

$$ X_{1(n_1+1)} = \frac{ n_1 + 1 }{ w_1 }(\sum_{i = 1}^{n}w_i \ G^* - \sum_{i = 2}^{n}w_i\bar{X_i}) - \sum_{i = 1}^{n_1}X_{1i} $$

Finally... what I need help with

We know that the total grade is:

$$ G = \frac{ \sum_{i = 1}^{n}w_i\bar{X_i} }{ \sum_{i = 1}^{n}w_i } $$

The student is trying to increase it to $G^*$ by doing well in the assessment $X_{1(n_1+1)}$, which will increase $\bar{X_1}$ enough. I tried to obtain it by reasoning the following way: the student wants to increase $\bar{X_1}$ so that the impact on the total grade $G$ is just enough to take it to $G^*$:

$$ \frac{\Delta{G}}{\Delta{\bar{X_i}}} = G^* - G $$

Then, I expanded $G^*$ and found a mathematical expression for $X_{1(n_1+1)}$.

Is there any problem with this way of thinking? Or does the equation above not translate my line of thinking accurately? I ask because I was never able to obtain correct results using this methodology?

I hope I was clear enough and appreciate any help.

1

There are 1 best solutions below

1
On

Suppose the category $X_p$ contains $n$ elements, and that is the category in question; that is, we are asking what mark $P$ we need to get on a piece of work belonging to $X_p$ in order to get a grade $G^\ast$. Well, we know

$$G^\ast =\frac{G-w_p\bar{X}_p+w_p\bar{X}^\ast_p}{\sum_{i=1}^nw_i}$$

but

$$\bar{X}^\ast_p=\frac{n \bar{X}_p+P}{n+1}$$

then

$$P=\frac{n+1}{w_p}\left(G^\ast\sum_{i=1}^nw_i-G+w_p\bar{X}_p\right)-n\bar{X}_p$$