Calculate the z-score of a data point relative to a dataset's mean and standard deviation.
The z-score standardizes a value by expressing how many standard deviations it lies from the mean: z = (x − μ) / σ. A z-score of 0 means the value equals the mean; positive z-scores are above the mean, negative below. Assuming an approximately normal distribution, the z-score maps directly to a percentile via the standard normal cumulative distribution function (CDF). Z-scores are widely used in ML for feature standardization and for flagging statistical outliers (commonly |z| > 2 or |z| > 3).
z = (x - mu) / sigma
There's no universal cutoff, but |z| > 2 is often used to flag 'unusual' values (roughly the outer 5% of a normal distribution) and |z| > 3 to flag 'extreme' outliers (roughly the outer 0.3%).
Yes — the percentile shown uses the standard normal CDF, which is only an accurate percentile estimate if the underlying data is approximately normally distributed; for heavily skewed data, the z-score is still valid as a standardized distance measure, but the percentile interpretation may be inaccurate.
Standardization transforms every value in a feature to its z-score, giving the transformed feature a mean of 0 and standard deviation of 1 — this is a standard preprocessing step before training many ML models, especially those sensitive to feature scale like SVMs, k-NN, and neural networks.
Yes — any value below the mean produces a negative z-score; the sign simply indicates direction (below vs. above the mean), while the magnitude indicates distance in standard deviations.