FORCES
FORtran lib for Comp. Env. Sys.
|
Calculates the standard score / normalization (anomaly) / z-score. More...
Public Member Functions | |
real(sp) function, dimension(size(data, dim=1)) | standard_score_sp (data, mask) |
real(dp) function, dimension(size(data, dim=1)) | standard_score_dp (data, mask) |
Calculates the standard score / normalization (anomaly) / z-score.
In statistics, the standard score is the (signed) number of standard deviations an observation or datum is above the mean. Thus, a positive standard score indicates a datum above the mean, while a negative standard score indicates a datum below the mean. It is a dimensionless quantity obtained by subtracting the population mean from an individual raw score and then dividing the difference by the population standard deviation. This conversion process is called standardizing or normalizing (however, "normalizing" can refer to many types of ratios).
Standard scores are also called z-values, z-scores, normal scores, and standardized variables; the use of "Z" is because the normal distribution is also known as the "Z distribution". They are most frequently used to compare a sample to a standard normal deviate, though they can be defined without assumptions of normality (Wikipedia, May 2015).
\[ standard\_score = \frac{x - \mu_x}{\sigma_x} \]
where \( \mu_x \) is the mean of a population \( x \) and \( \sigma_x \) its standard deviation.
If an optinal mask is given, the calculations are over those locations that correspond to true values in the mask. data can be single or double precision. The result will have the same numerical precision.
[in] | real(sp/dp), dimension(:) :: data | data to calculate the standard score for |
[in] | logical, dimension(:),optinal :: mask | indication which cells to use for calculation If present, only those locations in mask having true values in mask are evaluated. |
Definition at line 88 of file mo_standard_score.f90.
real(dp) function, dimension(size(data, dim = 1)) mo_standard_score::standard_score::standard_score_dp | ( | real(dp), dimension(:), intent(in) | data, |
logical, dimension(:), intent(in), optional | mask | ||
) |
Definition at line 207 of file mo_standard_score.f90.
real(sp) function, dimension(size(data, dim = 1)) mo_standard_score::standard_score::standard_score_sp | ( | real(sp), dimension(:), intent(in) | data, |
logical, dimension(:), intent(in), optional | mask | ||
) |
Definition at line 178 of file mo_standard_score.f90.