Skip to content
CampusEduX

Problem 2: Detect Outliers Using the Z-score Method

Easypython
Learn the Concept: Outlier Detection

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.

Related Problems

  • Problem 1: Detect Outliers Using the IQR Method
    Easy · python
    Solve Problem
  • Problem 3: Remove Outliers from a Dataset
    Easy · python
    Solve Problem
  • Problem 4: Visualize Outliers with a Boxplot
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...