Elective Data Analysis and Modeling

Data Analysis and ModelingUnit 18 min read

Data Analysis Basics: Types, Tools & Real-World Impact

Unit 1 of Data Analysis and Modeling introduces the core concepts of data analysis—its types, sources, lifecycle, and tools—while linking theory to real-world applications in Nepal (e.g., eSewa transactions, Daraz logistics) and global tech (Google search rankings, WhatsApp message routing). Learn how businesses and go

What is Data Analysis?

Data analysis is the process of inspecting, cleaning, transforming, and modeling data to discover useful information, draw conclusions, and support decision-making. It bridges the gap between raw data and actionable insights.

Key Components of Data Analysis

  1. Data: Raw facts and figures (numbers, text, images, etc.).
  2. Tools: Software like Excel, Python (Pandas), R, or SQL.
  3. Techniques: Statistical methods, machine learning, visualization.
  4. Outcome: Reports, dashboards, or automated decisions.

Types of Data Analysis

Data analysis is classified based on purpose, complexity, and output. Here’s a comparison table:

Type Purpose Example in Nepal Tools Used
Descriptive Summarizes historical data NTC’s monthly internet usage report Excel, Tableau
Diagnostic Explains why something happened eSewa analyzing failed transactions SQL, Python (Pandas)
Predictive Forecasts future trends Daraz predicting demand for Diwali sales Machine Learning (Python/R)
Prescriptive Recommends optimal actions Ncell optimizing call-drop reduction strategies Linear Programming, AI

The Data Analysis Lifecycle

Every analysis follows a structured cycle of steps. Visualize it below:

flowchart LR
    A["1. Define Problem"] --> B["2. Collect Data"]
    B --> C["3. Clean & Preprocess"]
    C --> D["4. Explore & Visualize"]
    D --> E["5. Model & Analyze"]
    E --> F["6. Interpret Results"]
    F --> G["7. Communicate Insights"]
    G -->|"Feedback Loop"| A

Step-by-Step Breakdown

  1. Define the Problem

    • Example: A bank wants to reduce loan defaults. Question: Which customer segments are most likely to default?
    • Tool: Problem statement template (e.g., "Reduce churn by 20% in 6 months").
  2. Collect Data

    • Sources:
      • Primary: Surveys (e.g., NEPSE investor sentiment polls).
      • Secondary: Public datasets (e.g., World Bank GDP data), APIs (e.g., Daraz sales data).
    • Real Example: Pathao collects rider location, trip duration, and payment data via its app.
  3. Clean and Preprocess Data

    • Common Issues:
      • Missing values (e.g., 10% of Ncell customer records have no call duration).
      • Duplicates (e.g., same transaction ID in eSewa data).
      • Inconsistent formats (e.g., "2023-12-31" vs. "31/12/2023").
    • Tool: Python’s pandas or Excel’s "Find & Replace."
  4. Explore and Visualize

    • Example: Analyzing Khalti’s transaction failures by hour.
      • Visual: A bar chart showing failure rates peaks at 3–5 PM (likely due to high volume).
      • Tool: Tableau or Python’s matplotlib.
    
    
  5. Model and Analyze

    • Apply statistical or machine-learning models.
    • Example: Predicting NEPSE stock prices using past trends (time-series forecasting).
  6. Interpret Results

    • Example: If a model shows that customers with <3 months tenure churn 3x more, the bank might offer them a loyalty discount.
  7. Communicate Insights

    • Tools: Dashboards (Power BI), reports (Word/PDF), or presentations (Canva).

In the Real World

  1. eSewa’s Fraud Detection

    • Idea: Anomaly Detection (a type of diagnostic analysis).
    • How: eSewa uses algorithms to flag unusual transaction patterns (e.g., a single user making 50 payments in 1 minute). This reduces fraud by 40% (as per their 2023 report).
  2. Daraz’s Supply Chain Optimization

    • Idea: Predictive Analytics.
    • How: Daraz’s AI predicts demand for products like Diwali gifts 3 months in advance, ensuring warehouses stock enough inventory. This reduced out-of-stock items by 25% in 2022.
  3. Ncell’s Network Performance

    • Idea: Descriptive + Prescriptive Analysis.
    • How: Ncell analyzes call-drop rates by tower location (descriptive). Then, it uses linear programming to optimize tower placements, reducing drops by 15% in Kathmandu.

Worked Example: Analyzing Ncell Customer Churn

Problem: Ncell wants to identify which customers are likely to switch to NTC. We’ll use descriptive and diagnostic analysis on a sample dataset.

Step 1: Data Collection

Assume we have a dataset with:

  • Customer ID, tenure (months), monthly calls, data usage (GB), complaints filed, and churn status (Yes/No).
Customer ID Tenure (months) Calls Data Usage (GB) Complaints Churned?
C001 12 200 5 0 No
C002 3 150 2 3 Yes
C003 24 300 10 1 No

Step 2: Data Cleaning

  • Check for missing values: None here.
  • Convert "Churned?" to binary (Yes=1, No=0).

Step 3: Exploratory Analysis

Visual 1: Average calls and data usage by churn status.

graph LR
    A["Churned=No"] --> B["Avg Calls: 250"] --> C["Avg Data: 7 GB"]
    D["Churned=Yes"] --> E["Avg Calls: 160"] --> F["Avg Data: 3 GB"]

Observation: Churned customers use fewer calls and data.

Visual 2: Complaints vs. Tenure (scatter plot).


Insight: Customers with <6 months tenure and >2 complaints are high-risk.

Step 4: Modeling (Diagnostic)

  • Hypothesis: Customers with low tenure and high complaints are more likely to churn.
  • Test: Use a decision tree to classify churn risk.
  • Action: Ncell could target customers in the "High" group with retention offers.

Tools for Data Analysis

Tool Type Best For Example Use Case
Excel Spreadsheet Basic calculations, pivot tables NTC’s monthly revenue analysis
Python (Pandas) Programming Language Data cleaning, EDA Cleaning Daraz’s sales data
SQL Query Language Extracting data from databases Pulling eSewa transaction records
Tableau/Power BI Visualization Interactive dashboards NEPSE stock trend dashboards
R Statistics Advanced statistical modeling Predicting Khalti’s fraud rates

Advantages and Limitations of Data Analysis

Advantages Limitations
✅ Reduces guesswork in decision-making ❌ Requires clean, high-quality data
✅ Identifies trends (e.g., Diwali sales) ❌ Models can be biased if data is skewed
✅ Automates repetitive tasks (e.g., fraud detection) ❌ Needs skilled analysts for complex models
✅ Helps optimize resources (e.g., Ncell tower placement) ❌ Ethical concerns (e.g., privacy in customer data)

Exam Tip

  1. Define Clearly: Always start with a problem statement (e.g., "Analyze why Pathao drivers in Pokhara have low earnings").
  2. Show Steps Visually: Use flowcharts (like the lifecycle above) or tables to organize answers.
  3. Link to Nepal: Examiners love real-world ties. Mention eSewa, Daraz, or Ncell in your examples.
  4. Avoid Jargon: Explain terms like "EDA" (Exploratory Data Analysis) in simple words.
  5. Practical > Theoretical: Focus on how to apply concepts (e.g., "Use a pivot table in Excel to summarize NEPSE data") rather than just definitions.

Key Takeaways

  • Data analysis turns raw data into actionable insights for businesses and governments.
  • The lifecycle (problem → data → model → action) is universal, from eSewa to Google.
  • Visuals (charts, tables, trees) make complex data understandable—always include them in exams.
  • Tools like Excel and Python are essential; know when to use each.
  • Real-world applications (e.g., Daraz’s demand forecasting) show how theory works in practice.

Based on the PU BBA (PU) syllabus for Data Analysis and Modeling, unit 1.

Discussion

Loading…