Showing deviation of data on a fixed scale

18 Views Asked by At

I'm creating a chart in D3 which shows the Mode from a large (1mil +) dataset; and colors it according to the standard deviation of the dataset.

But the issue is that I need to map the range (Red color to Green color) to a fixed domain. Is there a statistical measure which helps to represent information about the deviation of the data on a fixed scale (0-1; -1to1; 0-100 etc)?

1

There are 1 best solutions below

0
On

You can perform a transformation on each standard deviation $SD_i$ so that all transformed values ($tSD_i$) are distributed in the range $0-1$. Simply call $x_{min}$ and $x_{max}$ the smallest and the largest among all $SD_i$, respectively, and then use

$$ \displaystyle tSD_i= \frac{SD_i-x_{min}}{x_{max}-x_{min}}$$