Skip to content

Commit

Permalink
Adjusting maths in final expanding box
Browse files Browse the repository at this point in the history
  • Loading branch information
jwarren-scottlogic committed Oct 29, 2024
1 parent 0e601b2 commit ee02332
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions _posts/2024-10-21-building-an-assignment-algorithm-2.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Finally, we landed on using the Z-score for aggregate compromise. The Z-score is

<details class="no-italic"><summary>Click the 'more' button for to see how we compared compromise and surplus difference exactly, along with the rationale.</summary>
<p>
\(\text{sorting score} = standardisedSurplusScore - standardisedCompromiseScore \)
\(\text{sorting score} \\= standardisedSurplusScore - standardisedCompromiseScore \)
</p>

<p>
Expand All @@ -168,26 +168,27 @@ Finally, we landed on using the Z-score for aggregate compromise. The Z-score is
\]

<p style="font-size: smaller; text-align: right;">
N.B. The Z score is calculated with the median to avoid extreme value skewing.
N.B. The Z score is calculated with <b>the median to avoid extreme value skewing.
</p>

<p>
And the \(\text{standardisedSurplusScore}\) is:
</p>

<p>
&emsp;&emsp;
\(\text{if maxSurplus} \neq 0 \text{ and attendee surplus difference} > 0 \text{:}\)
</p>

\[standardisedSurplusScore =
\frac{\text{attendee surplus difference}}{\text{max surplus difference}}
\[standardisedSurplusScore = \frac{\text{attendee surplus difference}}{\text{max surplus difference}}
\]

<p style="font-size: smaller; text-align: right;">
(here max surplus has to be positive)
</p>

<p>
&emsp;&emsp;
\(\text{if maxSurplus} \neq 0 \text{ and attendee surplus difference} < 0 \text{:}\)
</p>

Expand All @@ -200,6 +201,7 @@ Finally, we landed on using the Z-score for aggregate compromise. The Z-score is
</p>

<p>
&emsp;&emsp;
\(\text{if maxSurplus} = 0 \text{:}\)
</p>

Expand All @@ -208,11 +210,11 @@ Finally, we landed on using the Z-score for aggregate compromise. The Z-score is
\]

<div>
<p>
<h4>
The rationale behind this was as follows:
</p>
</h4>
<p>
The \(\text{standardisedSurplusScore}\) should be in comparison to the maximum value, otherwise the compromise would give an extreme value. We want the compromise to be in the same range of values as the \(\text{standardisedSurplusScore}\), except for the outlying compromise, and therefore (\(\frac{\text{mean surplus difference}}{\text{max surplus}}\)) brings the \(\text{standardisedCompromiseScore}\) into the relative range of values, and (\(\frac{\text{attendee Z score}}{2.72}\)) should be in the range of \(\pm 1.3\), with the larger values being extremal. When this overtakes the \(\text{standardisedSurplusScore}\), (surpassing the value just greater than 1), we want this to occur quite rapidly because extremal compromise is much more important to deal with. Therefore we cube it. Cubing not only rises quickly, but unlike squaring, it maintains the \(\pm\), which is important for capturing whether the value is above or below the median. After some fine tuning, it also appears to give an optimal result.
The \(\text{standardisedSurplusScore}\) should be in comparison to the maximum value, otherwise the compromise would give an extreme value. We want the compromise to be in the same range of values as the \(\text{standardisedSurplusScore}\), except for the outlying compromise, and therefore (\\frac{\text{mean surplus difference}}{\text{max surplus}}\) brings the \(\text{standardisedCompromiseScore}\) into the relative range of values, and \(\frac{\text{attendee Z score}}{2.72}\) should be in the range of \(\pm 1.3\), with the larger values being extremal. When this overtakes the \(\text{standardisedSurplusScore}\), (surpassing the value just greater than 1), we want this to occur quite rapidly because extremal compromise is much more important to deal with. Therefore we cube it. Cubing not only rises quickly, but unlike squaring, it maintains the \(\pm\), which is important for capturing whether the value is above or below the median. After some fine tuning, it also appears to give an optimal result.
<br>
The value of 2.72 comes from the fact that for a normal distribution, 95.4% of values are found within 2 standard deviations of the average and 99.7% of values are found within 3 standard deviations of the average. This gave a rough range between 2-3 and after some fine tuning, 2.72 gave the optimal result.
</p>
Expand Down

0 comments on commit ee02332

Please sign in to comment.