Mathematical notation for formulating a rank score This is a cross-post from Mathematics forum. As no one has answered it yet, I fIgured post here as well.

I would like to describe a transform I used to rank my data points. I have recoded my variable columns from $10$ measurements with different range to $n$ (for each measurement) where $n \in \{0,0.5,1\}$.    

For columns where measurements were expressed as categorical values I simply recoded the categorical value to either $0$, $0.5$ or $1$ and for continuous variables I recoded the lower quartile as $0$, interquartile as $0.5$ and upper quartile as $1$ and finally I summed the recoded values to produce a single score $\sum n_{i1,..i10} $ for each row. 

I am trying to write my method and I'd like to have it in mathematical notation. I was wondering if anyone could help me with this!
Here is my solution to the problem. I am posting it here in case anyone else come up with the same idea but did not know how to formulate it in mathematical notation!


  $$ \psi_i = \sum_{i=1}^9 S_i $$
  
  where $S_i$ is the score function and defined as:
  
  $$
S_i = \cases{
  0 &amp; \text{if $\theta(x_i) &lt; Q_1$ or $\theta(x_i) = $ benign/neutral} \\
  0.5 &amp; \text{if $Q_1 \leq \theta(x_i) &lt; Q_3$ or $\theta(x_i) = $ possibly damaging/uncertain} \\
  1 &amp; \text{if $\theta(x_i) \geq Q_3$ or $\theta(x_i) = $ damaging}
}
$$
  
  The $\theta(x_i)$ is the pathogenicity or conservation score for variant $x$ as defined by model $i$ and $Q$ denotes the quartile range for scores from M-CAP, CADD, GERP and Phylop models.