In his course(1) class, person(1) took LENGTH
plural_form(exam(1), LENGTH).
His scores were toSentenceTex(SCORES).
In her course(1) class, person(1) took LENGTH
plural_form(exam(1), LENGTH).
Her scores were toSentenceTex(SCORES).
What was his average score on the plural_form(exam(1))?
What was her average score on the plural_form(exam(1))?
The average is the sum of his scores divided by the number of scores.
The average is the sum of her scores divided by the number of scores.
There are LENGTH
scores and their sum is SCORES.join(" + ") = SUM
.
His average score is SUM \div LENGTH = SUM / LENGTH
.
Her average score is SUM \div LENGTH = SUM / LENGTH
.
On the first COUNT
plural_form(exam(1), COUNT) of his course(1) class,
person(1) got an average score of OLD_AVG
.
On the first COUNT
plural_form(exam(1), COUNT) of her course(1) class,
person(1) got an average score of OLD_AVG
.
What does he need on the next exam(1) to have an overall average of NEW_AVG
?
What does she need on the next exam(1) to have an overall average of NEW_AVG
?
Let his score on the next exam(1) be x
.
Let her score on the next exam(1) be x
.
The sum of all of his scores is then COUNT \cdot OLD_AVG + x
.
The sum of all of her scores is then COUNT \cdot OLD_AVG + x
.
The same sum must also be equal to COUNT + 1 \cdot NEW_AVG
.
So, COUNT \cdot OLD_AVG + x = COUNT + 1 \cdot NEW_AVG
\begin{eqnarray}
COUNT \cdot OLD_AVG + x &=& COUNT + 1 \cdot NEW_AVG \\
COUNT * OLD_AVG + x &=& (COUNT + 1) * NEW_AVG \\
x &=& (COUNT + 1) * NEW_AVG - COUNT * OLD_AVG \\
x &=& ANS \\
\end{eqnarray}
person(1) has taken COUNT
plural_form(exam(1), COUNT)
and his average score so far is OLD_AVG
.
person(1) has taken COUNT
plural_form(exam(1), COUNT)
and her average score so far is OLD_AVG
.
If he gets 100
, a perfect score, on the remaining REMAINING
plural_form(exam(1), REMAINING), what will his new average be?
If she gets 100
, a perfect score, on the remaining REMAINING
plural_form(exam(1), REMAINING), what will her new average be?
If he gets 100
on the remaining plural_form(exam(1)), the sum of his scores will be
COUNT \cdot OLD_AVG + REMAINING \cdot 100 = SUM
.
If she gets 100
on the remaining plural_form(exam(1)), the sum of her scores will be
COUNT \cdot OLD_AVG + REMAINING \cdot 100 = SUM
.
His overall average will then be SUM \div COUNT + REMAINING = NEW_AVG
.
Her overall average will then be SUM \div COUNT + REMAINING = NEW_AVG
.