Explore Library
Code QuizAdvanced

Detecting Training-Serving Skew

Find the normalization mistake that breaks this skew z-score check.

Codepython
def detect_skew(train_mean, train_std, serve_values):
    serve_mean = sum(serve_values) / len(serve_values)
    z = (serve_mean - train_mean) / len(serve_values)
    return abs(z) > 3

What is the bug in this skew-detection code?