What is rounding?
Rounding is a way of adjusting a number (up or down) to make calculations and data visualisation easier to represent and understand. For example, instead of showing 5.342343 we would show 5 if rounding to a whole number or 5.3 if rounding to one decimal place.
How does The Happiness Index round scores?
There are 2 ways we use rounding in our platform, and we will explain why below:
Rounding to show average scores:
- When rounding average score calculations we round to one decimal place.
- If the number is below .5 we round down and if the number is .5 or above we round up.
- Example of rounding down: The answer to an average score calculation is 7.441, so we’d round this down and show 7.4
- Example of rounding up: The answer to an average score calculation is 7.872, so we’d round this up and show 7.9
Rounding to associate a colour to a score:
- When rounding to associate a colour with a score we round to the nearest whole number.
- Again if the number is below .5 we round down and if .5 or above we round up.
- Example of rounding down: The average score calculation is 7.441 so we’d round this down to a 7 and associate the colour for a score of 7.
- Example of rounding up: The average score calculation is rounded to 7.872 so we’d round this up to an 8 and associate the colour for a score of 8.
Why do we round to one decimal place for average score calculations and one whole place for associating a colour?
For average score calculations we round to one decimal place to maintain accuracy in the results we display.
It is important to show the nuances in scores. For example, if we rounded to the nearest whole number a score of 7.49 would be rounded down to a 7 and a score of 7.51 would be rounded up to a score of 8. Therefore, we would lose accuracy within the results and this would suggest a much larger disparity between the two results than there actually is.
When associating a score to a colour we round to the nearest whole number so we can use a 10 point colour scale that provides simplicity and allows the human eye to see the variations in the colours. If we associated a colour based on rounding to a decimal place there would be 100 colours on the scale and it would lose its variation.
Can two questions with the same average score have different colours associated to them?
Yes, this is possible in rare cases due to how our platform uses rounding. This will only happen when the average score falls within a small range (less than 0.1).
For example, if the answer to an average score calculation is 7.445 it will be rounded up to an average score of 7.5 for the average score, but it will be rounded down to a 7 for the colour to be associated with the score.
If another question in the survey has an average score calculation of 7.544 it will be rounded down to an average score of 7.5 for the average score, but it will be rounded up to an 8 for the colour to be associated to the score.
Therefore, you have 2 questions with an average score of 7.5, with 2 different colours associated to them.
As mentioned this only occurs when the scores are within a small range. To mitigate the visual impact of this anomaly we use an 11 colour scale which has an incremental gradient.
What colours do we use?
Below is an image of the 11 point colour scale we use at The Happiness Index. On the left you have the score and on the right you have the colour associated with the score.