Skip to content
C

Problem 2: Detect Outliers Using the Z-score Method

Easypython

Problem Description

Write a Python program that calculates the Z-score for each value in a list and identifies any values with an absolute Z-score greater than 2.

Input

A list of numbers.

Output

A list of detected outliers based on the Z-score method.

Constraints

  • The list will contain at least 5 numbers.

Example Input

text
[50, 52, 49, 51, 53, 200]

Example Output

text
Outliers: [200]

Concepts Covered

Mean, standard deviation, Z-score calculation.

Input (stdin)

Output

Run your code to see output here...