Introduction

Prescriptive analysis is the third and most advanced type of analytics. It goes beyond descriptive and predictive analytics by not only forecasting future outcomes but also suggesting actions to achieve desired results. This module will cover the fundamental concepts of prescriptive analytics, including optimization and simulation techniques.

Key Concepts

What is Prescriptive Analytics?

Prescriptive analytics uses mathematical models and algorithms to recommend actions that can help achieve specific business goals. It answers the question, "What should we do?" by providing actionable insights.

Importance of Prescriptive Analytics

  • Decision Support: Helps in making informed decisions by providing actionable recommendations.
  • Optimization: Identifies the best course of action among various alternatives.
  • Efficiency: Improves operational efficiency by optimizing resources and processes.
  • Risk Management: Assists in identifying and mitigating risks.

Techniques in Prescriptive Analytics

Optimization

Optimization involves finding the best solution from a set of feasible solutions. It is widely used in resource allocation, scheduling, and supply chain management.

Types of Optimization

  1. Linear Programming (LP): Used for problems where the objective function and constraints are linear.
  2. Integer Programming (IP): Similar to LP but solutions are restricted to integer values.
  3. Non-linear Programming (NLP): Deals with problems where the objective function or constraints are non-linear.

Example of Linear Programming

Consider a company that produces two products, A and B. The profit per unit of product A is $40, and for product B, it is $30. The company has 100 hours of labor and 180 units of raw material available. Product A requires 2 hours of labor and 3 units of raw material per unit, while product B requires 1 hour of labor and 2 units of raw material per unit. The goal is to maximize profit.

Objective Function: \[ \text{Maximize } Z = 40A + 30B \]

Constraints: \[ 2A + 1B \leq 100 \quad \text{(Labor constraint)} \] \[ 3A + 2B \leq 180 \quad \text{(Material constraint)} \] \[ A, B \geq 0 \]

Simulation

Simulation involves creating a model to replicate the behavior of a system. It is useful for analyzing complex systems where analytical solutions are not feasible.

Types of Simulation

  1. Monte Carlo Simulation: Uses random sampling to estimate the probability of different outcomes.
  2. Discrete Event Simulation: Models the operation of a system as a sequence of discrete events.
  3. Agent-Based Simulation: Models the interactions of autonomous agents to assess their effects on the system.

Example of Monte Carlo Simulation

Consider a project with uncertain completion times for its tasks. The project manager wants to estimate the probability of completing the project within a given time frame.

Steps:

  1. Define the probability distributions for the completion times of each task.
  2. Generate random samples from these distributions.
  3. Calculate the total project completion time for each set of samples.
  4. Repeat the process many times to build a distribution of total completion times.
  5. Analyze the results to estimate the probability of meeting the deadline.

Practical Exercise

Exercise: Optimization with Excel Solver

Problem: A company needs to determine the optimal production mix of two products to maximize profit. The constraints include labor hours and raw material availability.

Steps:

  1. Open Excel and enter the data for the objective function and constraints.
  2. Use the Solver add-in to set up the optimization problem.
  3. Define the objective cell, variable cells, and constraints.
  4. Run Solver to find the optimal solution.

Solution:

|       | A       | B       | Total   |
|-------|---------|---------|---------|
| Profit| $40     | $30     |         |
| Labor | 2 hours | 1 hour  | <= 100  |
| Material | 3 units | 2 units | <= 180 |
|-------|---------|---------|---------|
| Optimal Solution | 30 units | 40 units |         |

Exercise: Monte Carlo Simulation with Python

Problem: Estimate the probability of completing a project within 30 days, given uncertain task durations.

Steps:

  1. Define the probability distributions for task durations.
  2. Use Python to generate random samples and calculate total project duration.
  3. Repeat the process and analyze the results.

Solution:

import numpy as np

# Define task durations (in days) as random variables
task1 = np.random.normal(5, 1, 1000)
task2 = np.random.normal(10, 2, 1000)
task3 = np.random.normal(7, 1.5, 1000)

# Calculate total project duration
total_duration = task1 + task2 + task3

# Estimate the probability of completing within 30 days
probability = np.mean(total_duration <= 30)
print(f"Probability of completing within 30 days: {probability:.2f}")

Summary

In this module, we explored the concepts of prescriptive analytics, focusing on optimization and simulation techniques. We discussed various types of optimization and simulation methods and provided practical examples and exercises to reinforce the concepts. Prescriptive analytics is a powerful tool that helps businesses make data-driven decisions to achieve their goals efficiently.

© Copyright 2024. All rights reserved