Understanding z-score

Z-score refers to the standard deviations the element is away from the mean.

It is given by the following formula:

Understanding z-score

Here X represents the value of the element, σ is the standard deviation, and μ is the population mean.

Interpreting z-scores

  • z-score<0: The element is less than the mean
  • z-score>0: The element is greater than the mean
  • z-score=0: The element is equal to the mean
  • z-score=0.5: The element is 0.5 SD greater than the mean

In Julia, it is implemented as follows:

julia> zscore(X,  μ, σ) 

μ and σ are optional as they can be calculated by the function.

Get Julia for Data Science now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.