Skip to Main Content
COM2MN109 • Data Analytics for Business
Module 2 Notes

MODULE II: DATA COLLECTION AND PREPARATION

Curricular Scope & Pedagogical Objective: Module II provides an exhaustive, academically rigorous, and operationally grounded study of data engineering and preparation within the Calicut University B.Com (Honours) curriculum for Data Analytics for Business (COM2MN109). This module investigates Stanley Smith Stevens' four foundational measurement scales (Nominal, Ordinal, Interval, Ratio); categorizes modern data forms (Quantitative vs. Qualitative, Big Data's 5 V's vs. Small Data); contrasts core data storage architectures (Structured, Semi-Structured, Unstructured data; Data Warehouses vs. Data Lakes); details the end-to-end data pre-processing pipeline (handling missingness, outlier detection via IQR, normalization, standardization, categorical encoding); and articulates data validation, hygiene auditing, and regulatory compliance protocols essential for ensuring organizational data integrity.

Unit 5: Measurement Scales: Nominal, Ordinal, Interval, and Ratio

5.1 The Theory of Measurement in Business Analytics

In empirical business research and data analytics, measurement is defined as the systematic assignment of numbers, symbols, or alphanumeric codes to characteristics of objects, individuals, or commercial transactions according to predefined, consistent rules. In 1946, Harvard psychophysicist Stanley Smith Stevens published his seminal paper establishing the four fundamental Levels of Measurement: Nominal, Ordinal, Interval, and Ratio.

Mastery of measurement scales is a mandatory prerequisite for every business analyst: the scale of measurement directly dictates which mathematical operations are valid, which summary statistics are permissible, and which machine learning algorithms or parametric tests can be legitimately applied to the dataset.

5.2 Detailed Taxonomy of the Four Levels of Measurement

1. Nominal Scale (Categorical / Qualitative)

Properties: The lowest and most basic level of measurement. Numbers or labels serve purely as qualitative identifiers or categorical tags to classify entities into mutually exclusive and collectively exhaustive categories. No inherent numerical order, magnitude, or distance exists between categories.
Permissible Statistics: Mode, Frequency distribution, Contingency tables, Chi-Square (χ2) tests, Cramer's V.
Commerce Examples: Customer Gender (1 = Male, 2 = Female), Payment Gateway (Razorpay, Stripe, Paytm), Product SKU Brand (Samsung, Apple, Sony), Geographic Sales Region (North, South, East, West).

2. Ordinal Scale (Ranked / Qualitative)

Properties: Data possesses the property of identity plus a meaningful, distinct relative order or ranking (greater than, less than, superior to). However, the mathematical intervals between adjacent ranks are unknown, non-uniform, and cannot be measured.
Permissible Statistics: Median, Quartiles, Percentiles, Spearman's Rank Correlation (ρ), Kendall's Tau, Mann-Whitney U test.
Commerce Examples: Customer Satisfaction Likert Scales (1 = Highly Dissatisfied to 5 = Highly Satisfied), Corporate Credit Ratings (AAA, AA, A, BBB, D), Education Level, Brand Preference Rankings.

3. Interval Scale (Ordered with Equal Spacing)

Properties: Possesses identity, order, and equal, standardized distances/intervals between adjacent scale points. However, it lacks a true absolute zero point; zero is arbitrary and does not indicate the total absence of the measured attribute. Ratios cannot be computed (e.g., 40°C is not "twice as hot" as 20°C).
Permissible Statistics: Mean, Standard Deviation, Variance, Pearson's Correlation (r), t-tests, ANOVA, Linear Regression.
Commerce Examples: Temperature in Celsius/Fahrenheit, Calendar Dates, Consumer Credit Risk Scores (CIBIL 300 to 900), Standardized Consumer Sentiment Index.

4. Ratio Scale (The Ultimate Quantitative Scale)

Properties: The highest, most mathematically powerful level of measurement. Possesses all properties of nominal, ordinal, and interval scales, PLUS a true, non-arbitrary absolute zero point (zero signifies complete absence of the property). All mathematical operations (+, −, ×, ÷) are valid.
Permissible Statistics: Geometric Mean, Harmonic Mean, Coefficient of Variation, all parametric and non-parametric tests.
Commerce Examples: Sales Revenue (₹0 means zero revenue), Net Profit, Unit Inventory Count, Customer Age, Return on Investment (ROI), Delivery Distance in kilometers.

5.3 Comparative Matrix of Measurement Scales

Scale Core Mathematical Properties Central Tendency & Dispersion Commercial Analytics Application
Nominal Identity / Equivalence (=, ≠) Mode; Entropy; Frequency Count Customer segmentation by demographic categories, channel classification, fraud flag binary indicators.
Ordinal Identity + Order / Direction (>, <) Median; Interquartile Range (IQR); Percentiles Customer feedback surveys, employee performance appraisal bands, product tiering (Silver, Gold, Platinum).
Interval Identity + Order + Equal Distances (+, −) Arithmetic Mean; Standard Deviation; Variance Brand perception indices, standardized psychographic rating instruments, financial creditworthiness scoring.
Ratio Identity + Order + Equal Intervals + Absolute Zero (+, −, ×, ÷) Arithmetic, Geometric, and Harmonic Means; Coefficient of Variation Revenue forecasting, margin optimization, inventory economic order quantity (EOQ), customer lifetime value (CLV).

Unit 6: Forms of Data: Quantitative vs. Qualitative & Big Data vs. Small Data

6.1 Quantitative Data vs. Qualitative Data in Commerce

Business data naturally divides into quantitative and qualitative formats, each requiring distinct analytical pipelines:

  • Quantitative Data: Information expressed in numerical terms, measuring quantity, amounts, or dimensions. It is further bifurcated into:
    • Discrete Quantitative Data: Countable numerical values that cannot be subdivided into fractional parts (e.g., number of store transactions, number of returned items, website visitor counts).
    • Continuous Quantitative Data: Measurable values that can take on an infinite continuum of fractional or decimal points within a given range (e.g., stock price fluctuations, transaction delivery latency in milliseconds, weight in grams).
  • Qualitative Data: Descriptive, non-numerical information capturing qualities, characteristics, subjective attitudes, and motivations. Analyzed using Content Analysis, Thematic Coding, Sentiment Analysis, and Natural Language Processing (NLP) to extract recurring themes from customer call logs, online reviews, and focus group transcripts.

6.2 The Big Data Paradigm: The 5 V's Framework

Big Data refers to datasets whose size, complexity, and velocity exceed the storage capacity and computational processing power of conventional relational database management systems. Formally, Big Data is characterized by the 5 V's:

1. Volume (Scale of Data)

Massive datasets scaling from Terabytes (TB) and Petabytes (PB) to Exabytes (EB). Generated by billions of smartphone clicks, IoT sensor telemetry, and automated financial trading streams.

2. Velocity (Speed of Generation & Streaming)

The extraordinary speed at which data is generated, collected, and processed in real time. E.g., credit card fraud engines analyzing transactions in under 50 milliseconds.

3. Variety (Diversity of Formats)

Heterogeneous data types encompassing structured SQL tables, semi-structured JSON feeds, and unstructured video, audio, PDFs, and sensor signals.

4. Veracity (Trustworthiness & Quality)

The reliability, data hygiene, and authenticity of incoming data streams. Noisy social media bots, missing fields, and spoofed IPs create immense veracity challenges.
5. Value (The Ultimate Commercial Purpose): The ability to extract quantifiable economic return, cost reductions, or revenue uplift from big data infrastructure investments. Without business value, big data represents a costly technological liability.

6.3 Small Data: The Counterbalance to Big Data

Popularized by global branding expert Martin Lindstrom, Small Data refers to small, contextual, human-scale clues, micro-observations, and emotional nuances that reveal consumer desires. While Big Data provides correlation across millions of anonymous data points (answering "What?"), Small Data delivers empathetic causation (answering "Why?").

The Synergy of Big + Small Data: Big data analytics identifies that sales of athletic sneakers are declining in suburban stores. Small data—derived from visiting a teenager's bedroom and observing worn-out sneaker heels—reveals that teenagers are using skateboards and seeking grip rather than running cushions. Combining Big Data scale with Small Data human insight creates breakthrough commercial strategies.

Unit 7: Types of Data Structures & Storage Architectures

7.1 Deep Dive: Structured, Semi-Structured, and Unstructured Data

Modern enterprise data is organized into three distinct structural paradigms:

1. Structured Data (Schema-on-Write)

• Architecture: Tabular relational models with predefined schema definitions, strict data types, and primary/foreign key relationships.
• Storage: RDBMS (PostgreSQL, MySQL, Oracle).
• ACID Compliance: Ensures absolute Atomicity, Consistency, Isolation, and Durability in transactional banking and ERP systems.

2. Semi-Structured Data (Self-Describing)

• Architecture: Does not conform to rigid relational tables, but possesses hierarchical internal markup tags, keys, and metadata.
• Formats: JSON, XML, YAML, BSON.
• Storage: NoSQL Document stores (MongoDB, Couchbase), Graph databases (Neo4j), and web server access logs.

3. Unstructured Data (Schema-on-Read)

• Architecture: Completely lacking in predefined structural models or relational schemas.
• Types: Audio calls, video surveillance, PDFs, medical MRI scans.
• Processing: Deep neural networks, Computer Vision, and Large Language Models (LLMs) parsing raw bytes.

7.2 Enterprise Storage Paradigms: Data Warehouse vs. Data Lake vs. Data Lakehouse

Architecture Data Nature & Schema Processing Pipeline Primary Users & Use Cases
Data Warehouse (e.g., Snowflake, BigQuery) Highly curated, cleansed, structured historical data. Schema-on-Write. ETL (Extract, Transform, Load): Data is transformed prior to ingestion. Business Analysts, C-suite executives; BI reporting, KPI dashboards, financial auditing.
Data Lake (e.g., AWS S3, Hadoop HDFS) Raw, uncurated data in native format (structured, semi, unstructured). Schema-on-Read. ELT (Extract, Load, Transform): Data is loaded immediately; transformed as needed. Data Scientists, ML Engineers; exploratory machine learning, deep neural network training.
Data Lakehouse (e.g., Databricks Delta Lake) Modern hybrid combining Data Lake storage cost with Data Warehouse ACID transaction reliability. Unified streaming + batch pipelines; direct SQL querying on object storage. Unified analytics platform serving both BI reporting and advanced AI/ML modeling concurrently.

Unit 8: Methods for Collecting, Cleaning, and Pre-Processing Data

8.1 Data Collection Methodologies in Business

Data collection is the foundational gateway of analytics, classified into:

  • Primary Data Collection: First-hand empirical data collected for the specific business research objective. Includes Point-of-Sale (POS) scanner checkouts, IoT sensor telemetry, online A/B testing experiment logs, customer feedback surveys, and automated web scraping using Python (BeautifulSoup, Scrapy).
  • Secondary Data Collection: Pre-existing data compiled by external entities for general purposes. Includes government census figures (e.g., Ministry of Statistics and Programme Implementation - MOSPI), RBI economic bulletins, stock exchange repositories, and commercial market syndication reports (Nielsen, Kantar).

8.2 The Data Pre-Processing Pipeline

Data scientists estimate that 70% to 80% of total project time is consumed in data preparation. Raw data is invariably dirty, incomplete, inconsistent, and improperly scaled. The pre-processing pipeline consists of four sequential stages:

Stage 1: Handling Missing Data

Missing data occurs due to sensor dropouts, customer survey omissions, or database migration errors:

  • Deletion Methods:
    • Listwise Deletion (Complete Case Analysis): Dropping entire rows that contain any missing attribute. Dangerous if missingness is not completely at random, leading to severe statistical bias and sample size loss.
    • Pairwise Deletion: Omitting cases only for specific calculations involving the missing variable.
  • Imputation Methods:
    • Mean / Median Imputation: Replacing missing numerical values with the column mean (for normal distributions) or median (for skewed distributions).
    • Mode Imputation: Replacing missing categorical values with the most frequent class.
    • Advanced Imputation: K-Nearest Neighbors (KNN) imputation, Multivariate Imputation by Chained Equations (MICE), or forward-fill for time-series.

Stage 2: Outlier Detection and Treatment

An outlier is an observation that deviates so significantly from other observations as to arouse suspicion that it was generated by a different mechanism or measurement error:

THE INTERQUARTILE RANGE (IQR) OUTLIER DETECTION RULE STATISTICAL FENCE METHOD
IQR = Q3 − Q1  |  Lower Fence = Q1 − 1.5 × IQR  |  Upper Fence = Q3 + 1.5 × IQR
Where:
  • Q1 (First Quartile / 25th Percentile): Value below which 25% of data points fall.
  • Q3 (Third Quartile / 75th Percentile): Value below which 75% of data points fall.
  • Outlier Threshold: Any data point strictly < Lower Fence or > Upper Fence is classified as an empirical outlier.
  • Treatment Approaches: Trimming (removing outliers), Winsorization (capping extreme values at the 95th or 99th percentile boundary), or log transformations.

Stage 3: Feature Scaling (Normalization vs. Standardization)

Machine learning algorithms that calculate Euclidean distances (KNN, K-Means, SVM) or use gradient descent (Linear Regression, Neural Networks) are severely distorted if features have wildly differing numerical ranges (e.g., Age ranging 18-65 vs. Income ranging ₹20,000-₹5,00,000):

FEATURE SCALING FORMULAS NORMALIZATION VS. STANDARDIZATION
Xnorm=X−Xmin⁡Xmax⁡−Xmin⁡,Z=X−μσX_{ ext{norm}} = rac{X - X_{min}}{X_{max} - X_{min}}, quad Z = rac{X - mu}{sigma}
  • Min-Max Normalization: Rescales the feature strictly into the closed range [0, 1]. Highly sensitive to extreme outliers because outliers inflate and shrink normal values.
  • Z-Score Standardization: Transforms the feature to have a mean (μ) of 0 and a standard deviation (σ) of 1. Robust against outliers and essential for algorithms assuming normally distributed data.

Stage 4: Categorical Encoding

Machine learning algorithms require numerical matrices. Categorical variables must be converted through:

  • One-Hot Encoding (Dummy Variables): Creates a separate binary (0 or 1) column for each distinct category. To prevent multicollinearity (the dummy variable trap), one category is omitted ( columns for k categories).
  • Ordinal / Label Encoding: Assigns sequential integers reflecting natural ranked hierarchies (e.g., Low = 1, Medium = 2, High = 3).

Unit 9: Data Quality Assurance and Validation Techniques

9.1 Data Quality Assurance Protocols

Data quality assurance is the institutional process of profiling, auditing, and validating datasets to ensure they are fit for commercial decision-making. Key validation checks include:

1. Range & Domain Checks

Ensures numerical entries fall within physically possible business boundaries (e.g., Customer Age between 0 and 120; Discount Percentage between 0% and 100%).

2. Format & Syntax Matching

Enforces regular expression (Regex) patterns to validate structured strings (e.g., validating Indian PAN card format: 5 letters, 4 digits, 1 letter; GSTIN format; email addresses).

3. Referential Integrity Checks

Ensures foreign keys in transactional child tables correspond to valid, existing primary keys in master tables (e.g., an invoice cannot be recorded for a non-existent Customer ID).

4. Uniqueness & De-duplication

Identifying and merging duplicate customer records caused by slight typographic variations (using fuzzy string matching algorithms like Levenshtein distance).

9.2 Ethical Governance, Privacy Regulations & Anonymization

Modern data collection and preparation must operate under strict global and national legal compliance frameworks:

  • India's Digital Personal Data Protection Act (DPDP Act, 2023): Mandates explicit, clear consent before personal data collection; grants citizens the right to data erasure; and imposes penalties up to ₹250 Crores for catastrophic data breaches.
  • Data Anonymization & Pseudonymization: Removing Direct Identifiers (names, Aadhaar numbers, phone numbers) and hashing Indirect Identifiers (IP addresses, birthdates) to protect individual privacy while preserving analytical utility for machine learning modeling.

Analytical Application: Quantitative Exercises & Calculations

PRACTICAL PROBLEM 1: OUTLIER DETECTION VIA IQR FENCE METHOD

Case Scenario: A retail store records the daily sales revenue (in ₹ thousands) across a sorted sample of 12 business days:
Dataset (₹ Thousands): [ 12, 14, 15, 16, 18, 19, 20, 22, 24, 25, 28, 65 ]
Calculate the First Quartile (Q1), Third Quartile (Q3), Interquartile Range (IQR), Lower and Upper Fences, and identify any empirical outliers.

Step 1: Calculate Quartile Positions (n = 12):
• Position of Q1 = 0.25 × (n + 1) = 0.25 × 13 = 3.25th position
Value at 3rd position = 15; 4th position = 16.
Q1 = 15 + 0.25 × (16 − 15) = ₹15.25 Thousand

• Position of Q3 = 0.75 × (n + 1) = 0.75 × 13 = 9.75th position
Value at 9th position = 24; 10th position = 25.
Q3 = 24 + 0.75 × (25 − 24) = ₹24.75 Thousand

Step 2: Calculate Interquartile Range (IQR):
IQR = Q3 − Q1 = ₹24.75 − ₹15.25 = ₹9.50 Thousand

Step 3: Establish Tukey's Outlier Fences:
• Lower Fence = Q1 − (1.5 × IQR) = 15.25 − (1.5 × 9.50) = 15.25 − 14.25 = ₹1.00 Thousand
• Upper Fence = Q3 + (1.5 × IQR) = 24.75 + (1.5 × 9.50) = 24.75 + 14.25 = ₹39.00 Thousand

Step 4: Identify Outliers:
Any value < ₹1.00 Thousand or > ₹39.00 Thousand is an empirical outlier.
• The value ₹65 Thousand exceeds the Upper Fence (₹39.00 Thousand).
• Managerial Action: Day 12 (₹65,000) represents an extreme outlier. The analyst should investigate if this was a bulk institutional B2B sale or a typographical data entry error before training predictive models.

PRACTICAL PROBLEM 2: FEATURE SCALING (MIN-MAX NORMALIZATION & Z-SCORE)

Case Scenario: A customer's annual income is ₹7,50,000. In the complete customer dataset:
• Minimum Income (Xmin) = ₹2,00,000
• Maximum Income (Xmax) = ₹12,00,000
• Mean Income (μ) = ₹6,00,000
• Standard Deviation (σ) = ₹1,50,000
Calculate both the Min-Max Normalized score and the Z-Score Standardized value.

Step 1: Min-Max Normalization (Scaling to [0, 1]):
Xnorm = (X − Xmin) ÷ (Xmax − Xmin)
Xnorm = (7,50,000 − 2,00,000) ÷ (12,00,000 − 2,00,000)
Xnorm = 5,50,000 ÷ 10,00,000 = 0.55

Step 2: Z-Score Standardization (Mean = 0, Std Dev = 1):
Z = (X − μ) ÷ σ
Z = (7,50,000 − 6,00,000) ÷ 1,50,000
Z = 1,50,000 ÷ 1,50,000 = +1.00

Step 3: Analytical Interpretation:
• Normalized score of 0.55 indicates the customer sits slightly above the middle of the empirical income spectrum.
• Z-score of +1.00 indicates the customer's income lies exactly one standard deviation above the population mean.

Real-World Empirical Corporate Case Studies

CASE STUDY 1: The Mars Climate Orbiter — The $125 Million Data Unit Conversion Disaster

In September 1999, NASA's $125 Million Mars Climate Orbiter spacecraft plunged fatally into the Martian atmosphere and disintegrated. An exhaustive post-mortem forensic investigation uncovered a catastrophic failure in basic data preparation and standardization.

The Data Discrepancy: Subcontractor Lockheed Martin wrote software algorithms that calculated thruster acceleration data using English Imperial units (Pounds of Force-seconds). However, NASA's navigation systems expected and processed the incoming data in Metric units (Newtons-seconds). Because no data validation checks were embedded to verify unit scale consistency, the software passed incompatible numerical values, causing the spacecraft's trajectory to be off by 105 miles.

Key Takeaway: Without strict data dictionary standards and automated unit validation checks, raw numerical data is toxic to analytical algorithms.

CASE STUDY 2: Target's Predictive Analytics — Data Cleansing & Privacy Ethics

In 2012, retail giant Target used customer transaction data to build a predictive pregnancy score. By analyzing checkout purchase histories, statistician Andrew Pole discovered that women in their second trimester began buying unscented lotions, large zinc and magnesium vitamin supplements, and cotton balls.

Ethical Dilemma: Target used this model to send promotional baby product discount coupons to a high school teenager whose father had no knowledge of her pregnancy. The father angrily confronted the local Target manager, only to discover later that Target's predictive algorithm was correct.

Regulatory & Brand Impact: The backlash forced Target to rethink data ethics. They subsequently blended baby advertisements with unrelated items (lawnmowers, wine glasses) so that personalized predictive marketing appeared random rather than invasive.

CASE STUDY 3: Walmart — Predictive Logistics and Hurricane Analytics

In 2004, ahead of Hurricane Frances striking Florida, Walmart's analytics team mined trillions of bytes of historical POS scanner data from previous hurricane seasons to anticipate consumer demand.

Unusual Data Correlations: While conventional intuition predicted surges in flashlights, batteries, and bottled water, analytics revealed that the top-selling items ahead of hurricanes were Strawberry Pop-Tarts (which do not require cooking and have long shelf lives) and beer. Walmart dispatched hundreds of extra truckloads of strawberry Pop-Tarts and beer to Florida stores, selling out completely and generating record emergency revenue.

Exam Preparation & University Review Questions

CALICUT UNIVERSITY B.COM (FYUGP) HIGH-FREQUENCY EXAMINATION QUESTIONS
Part A: Short-Answer Questions (Conceptual - 2 Marks Each)
  1. What are Stanley Smith Stevens' four levels of measurement?
  2. Why can we not calculate the arithmetic mean for an Ordinal variable?
  3. Define "Big Data" and list its 5 V's.
  4. What is "Small Data" according to Martin Lindstrom?
  5. Differentiate between Listwise Deletion and Mean Imputation.
  6. State the formula for detecting outliers using the Interquartile Range (IQR) method.
  7. What is the difference between Min-Max Normalization and Z-Score Standardization?
  8. What is "One-Hot Encoding"?
Part B: Short-Essay / Analytical Questions (5 Marks Each)
  1. Explain Stanley Smith Stevens' four measurement scales with appropriate commerce examples and permissible statistical operations.
  2. Compare and contrast Data Warehouses, Data Lakes, and Data Lakehouses across schema, processing pipeline, and use cases.
  3. Describe the major techniques utilized by data analysts to identify and handle missing data.
  4. Explain the necessity of feature scaling in machine learning algorithms, contrasting normalization and standardization.
  5. Discuss data validation rules (range checks, regex format matching, referential integrity) in corporate data governance.
Part C: Comprehensive Essay Questions (10 / 15 Marks Each)
  1. "Data preparation consumes 80% of a data analyst's effort, but guarantees 100% of the model's reliability." Critically examine this statement. Detail the comprehensive data pre-processing pipeline, including missing value handling, outlier treatment via IQR fences, feature scaling, and categorical encoding.
  2. Elaborate the concepts of Big Data and Small Data. Analyze the 5 V's of Big Data and discuss how corporate enterprises synergistically integrate Big Data analytics with Small Data human insights, citing the Walmart and Target case studies.
  3. Critically evaluate the structural paradigms of data (Structured, Semi-Structured, Unstructured) and their respective database storage technologies. How do ETL and ELT pipelines support enterprise business intelligence and decision-making?
Key Takeaways for Examination Success:
  • Remember Stevens' acronym NOIR: Nominal, Ordinal, Interval, Ratio. Always state the absolute zero rule for Ratio scales.
  • In IQR outlier problems, clearly show the 4 steps: Calculate Q1 and Q3 → Derive IQR = Q3 − Q1 → Establish Fences: Q1 − 1.5(IQR) and Q3 + 1.5(IQR) → Flag data points.
  • Always distinguish between ETL (Warehouse: transform before loading) and ELT (Lake: load raw, transform on-demand).
  • Quote the Mars Climate Orbiter as the quintessential example of unit conversion disaster in data preparation.
Acing your exams is just a click away!
Visit www.degreelive.in to download the next module for free.

Finished reading Module 2?

Save this module as a PDF for offline study or advance to the next module.

Next: Module 3