0% found this document useful (0 votes)
12 views6 pages

Data Preprocessing and Outlier Analysis

This document provides an introduction and objectives for a computer lab session on data preprocessing. The objectives are to understand data cleaning and identifying outliers using box plots. The contents section lists topics to be covered, including data types, measures of position, finding quartiles/deciles/percentiles, and interquartile range. Assessment is based on a lab sheet, project, midterm exam and final exam. Example datasets are provided to calculate required measures, identify outliers within and clean data of outliers. Take-home exercises ask students to identify outliers, clean data, and determine data types.

Uploaded by

Talha Javid
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views6 pages

Data Preprocessing and Outlier Analysis

This document provides an introduction and objectives for a computer lab session on data preprocessing. The objectives are to understand data cleaning and identifying outliers using box plots. The contents section lists topics to be covered, including data types, measures of position, finding quartiles/deciles/percentiles, and interquartile range. Assessment is based on a lab sheet, project, midterm exam and final exam. Example datasets are provided to calculate required measures, identify outliers within and clean data of outliers. Take-home exercises ask students to identify outliers, clean data, and determine data types.

Uploaded by

Talha Javid
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Business Analytics

Computer Lab # 1
Data Preprocessing
Objectives:
1. To understand data cleaning or data preprocessing so that outliers in the data could be
identified.
2. To understand box plots for finding outliers

Contents:
 Introduction to Data and Data Analysis
 Types of data
 Measures of positions
 Finding quartiles, deciles and percentiles in a dataset
 Interquartile range (IQR)

Assessment Mechanism
Assessment tools Sessional
Lab Sheet+ Lab Performance 15%
Project 20%
Midterm Exam 25%
Final Exam 40%

Recommended:

 Reference: Lecture 1 and 2 of BA class


Consider the following dataset
Dataset:
X=23,24,225,227,228,231,33,236,240,241,42,248,250,253,257,260,263,276,67,300,815,301

a) Determine the required measures of positions for finding the allowed minimum and maximum
values of the dataset
b) Determine the outliers in the dataset (using 1.5IQR and 0.5IQR).
c) Verify that data is cleaned from outliers (using both 1.5IQR and 0.5IQR)

Deliverables

Calculations:
Screen shots of SPSS results
Take home exercises (Practice exercises)
Question No. 1
For the dataset given below, determine the allowed minimum and maximum values of the dataset
to avoid the outliers also make box plot of it.

Dataset:
X= 2,12, 23, 63, 121, 123, 126, 131, 137, 138, 140, 147, 148, 150, 154,164, 364,356

Question No. 2
Determine the outliers in the following dataset without using the box plot approach (if any).

Dataset:
X= 2,37,225,227,228,231,33,236,240,241,42,248,270,253,257,260,263,276,67,300,815,901

Question No. 3
Determine the outliers in the following dataset using the box plot approach (if any).

Dataset:
X= 23,24,225,227,228,231,33,236,240,241,42,248,250,253,257,260,263,276,67,300,815,301

Question No. 4
For the following dataset, clean the data from the outliers (if any). What is the cleaned data?

Group Dataset

0 21

0 22

0 26

0 8

0 29

0 14

0 19

0 26

0 28

0 7

1 48

1 45
1 39

1 35

1 33

1 47

1 21

1 11

1 51

1 42

2 78

2 71

2 74

2 73

2 65

2 64

2 32

2 84

2 81

2 22

Question No. 5
What type of measure scale is being used in the following cases? (Data Type).

1. High school men soccer players classified by their athletic ability: Superior, Average, Above
average.

2. Baking temperatures for various main dishes: 350, 400, 325, 250, 300

3. The colors of crayons in a 24-crayon box.

4. Social security numbers.

5. Incomes measured in dollars


6. A satisfaction survey of a social website by number: 1 very satisfied, 2 somewhat satisfied, 3
not satisfied.

7. Political outlook: extreme left, left-of-center, right-of-center, extreme right.

8. Time of day on an analog watch.

9. The distance in miles to the closest grocery store.

10. The dates 1066, 1492, 1644, 1947, 1944.

11. The heights of 21 65 year-old women.

12. Common letter grades A, B, C, D, F

Common questions

Powered by AI

Data outliers can significantly impact statistical analysis by skewing results, affecting measures like mean and standard deviation, and leading to misleading interpretations. They can distort statistical models, causing unreliable predictions. Strategies to mitigate their effects include using robust statistical methods like median or mode, transforming data, employing trimmed means, and, importantly, identifying and possibly removing outliers to ensure accurate representation of the dataset .

Different data types require specific methods for preprocessing and analysis. Categorical data, such as nominal data like colors, can be re-coded numerically for analysis but do not have inherent order. Ordinal data like satisfaction ratings, while ordered, do not have equal intervals and need special statistical tests. Interval data like temperature can be added and subtracted but not multiplied or divided. Ratio data like income support the full range of arithmetic operations due to a true zero point, allowing meaningful mean and standard deviation calculations. Each type influences the choice of preprocessing techniques and statistical tools used in data analysis .

In a box plot, outliers are visually identified as data points that are plotted as individual dots outside the whiskers. The whiskers extend to the smallest and largest values within 1.5 times the interquartile range (IQR) from the first and third quartile, respectively. Outliers provide information about anomalies in the dataset that can impact data analysis, indicating potential errors in data collection or natural variation that need further investigation .

To determine the allowed minimum and maximum values to identify outliers in a dataset, one can use measures of position such as quartiles and the interquartile range (IQR). The first step is to calculate the first (Q1) and third quartile (Q3) of the dataset. Then, find the IQR by subtracting Q1 from Q3. The allowed minimum is calculated as Q1 - 1.5*IQR and the allowed maximum as Q3 + 1.5*IQR. Values outside this range are considered outliers .

Using a variety of assessment tools, such as sessional labs, projects, midterm, and final exams, is significant in evaluating students' understanding of data analysis concepts as it caters to diverse learning styles and provides a comprehensive evaluation of both theoretical knowledge and practical application skills. Different assessment methods encourage deep understanding, critical thinking, and the ability to analyze and solve real-life data problems, ensuring students can apply concepts effectively in various contexts .

To identify outliers without using a box plot, one can still use statistical calculations such as quartiles and the interquartile range (IQR). First, determine Q1 and Q3, and calculate IQR as the difference between them. Outliers are typically defined as any data point beyond Q1 - 1.5*IQR for lower outliers, and Q3 + 1.5*IQR for upper outliers. This process is critical in data analysis to ensure data integrity and avoid skewed results due to extreme values .

Data measurement scales include nominal, ordinal, interval, and ratio. Nominal scales classify data without a specific order, such as colors in a crayon box. Ordinal scales categorize data with an inherent order, such as classifying soccer players as Superior, Average, and Above average. Interval scales measure data with equal intervals between values but without a true zero point, like temperatures in degrees Fahrenheit. Ratio scales, such as measuring income in dollars, have both equal intervals and a true zero point, allowing for a meaningful interpretation of ratios .

Understanding the interquartile range (IQR) is important because it measures statistical dispersion and provides insights into the central dispersion of a dataset. It helps in identifying outliers by establishing a range where most data points fall. Analyzing the IQR assists in revealing data trends, such as clustering or spread, and highlights whether the data is concentrated around the median or spread out, thus contributing to more effective data interpretation and decision-making .

Calculating quartiles contributes to understanding a dataset's distribution by dividing the dataset into four equal parts, providing more detailed insights into the data's spread and concentration around the median. Unlike mean and standard deviation, which are affected by extreme values, quartiles are robust against outliers and offer a better representation of the data's distribution, particularly in skewed datasets. Quartiles reveal where data values are concentrated and the extent of variability, whereas mean and standard deviation focus on central tendency and overall variability .

To clean a dataset from outliers, first, identify the outliers using statistical methods like the interquartile range (IQR). Calculate Q1, Q3, and IQR, then determine the boundaries using the formulas Q1 - 1.5*IQR and Q3 + 1.5*IQR. Remove any data points outside these boundaries. Cleaning outliers is critical for maintaining the accuracy of data analysis, as outliers can skew results and lead to incorrect conclusions .

You might also like