Why detect outliers per group or segment rather than globally, and how does this relate to contextual outliers?

Quick Overview

Asks why outlier detection should often run within groups or segments, and how that idea matches the definition of contextual outliers. Tests whether you can explain what pooling segments does to a global detector, run a detector per segment and handle small groups.

Why detect outliers per group or segment rather than globally, and how does this relate to contextual outliers?

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

Why should you detect outliers per group or segment rather than globally, and how does this relate to contextual outliers? ```hint Mix two groups Picture two segments with very different means, pool them, and see what the pooled mean and standard deviation do to a z-score. ``` ### What a Strong Answer Covers - Explains what pooling heterogeneous segments does to a global detector, with an example - Connects per-group detection to the definition of a contextual outlier - Describes how to run a detector within each group - Explains what to do with groups too small or too degenerate for stable statistics - Covers context that cannot be split into clean groups, such as time of day ### Follow-up Questions - How would you choose the grouping key, and what goes wrong when it is too fine? - How would you detect contextual outliers when the context is continuous, such as hour of day or outside temperature? - Group sizes range from 5 to 50,000. How do you keep scores comparable across groups?

Overview: Asks why outlier detection should often run within groups or segments, and how that idea matches the definition of contextual outliers. Tests whether you can explain what pooling segments does to a global detector, run a detector per segment and handle small groups.

General logo
General
Nov 24, 2026
mediumData ScientistOtherStatistics & Math
0
0

Why should you detect outliers per group or segment rather than globally, and how does this relate to contextual outliers?

What a Strong Answer Covers Guidance

  • Explains what pooling heterogeneous segments does to a global detector, with an example
  • Connects per-group detection to the definition of a contextual outlier
  • Describes how to run a detector within each group
  • Explains what to do with groups too small or too degenerate for stable statistics
  • Covers context that cannot be split into clean groups, such as time of day

Follow-up Questions Guidance

  • How would you choose the grouping key, and what goes wrong when it is too fine?
  • How would you detect contextual outliers when the context is continuous, such as hour of day or outside temperature?
  • Group sizes range from 5 to 50,000. How do you keep scores comparable across groups?