CSC317 Simulation and Modeling

Simulation and ModelingUnit 410 min read

Probability Distributions & Stochastic Processes: Types, Models & Applications

Unit 4 of Simulation and Modeling: Covers discrete/continuous probability distributions (binomial, Poisson, exponential, normal), their parameters, PDF/CDF, stochastic processes (Markov chains, renewal processes), and real-world applications in queueing, reliability, and financial modeling with visual examples and work

TAKEAWAYS:

  • Distributions are mathematical functions describing random variables: discrete (binomial, Poisson) vs. continuous (exponential, normal) with distinct PDF/CDF shapes and use cases.
  • Stochastic processes model systems evolving over time (e.g., Markov chains for state transitions, renewal processes for repeated events).
  • Key parameters (mean, variance, λ, μ) define distribution behavior and are critical for simulation inputs.
  • Real-world ties: Poisson models customer arrivals at Daraz, exponential models call durations in Ncell, and normal distributions appear in NEPSE stock returns.
  • Worked examples use small numbers to trace probability calculations step-by-step, linking theory to practical scenarios like loan interest or traffic flow.
  • Exam focus: Identify distributions from scenarios, calculate probabilities, and apply stochastic processes to simulate dynamic systems.

Core Concepts: Probability Distributions

12345678910-0.050.050.10.150.20.250.3xyP(X=3)=10.04%
Poisson distribution for λ=5 (highlighted: P(X=3)=10.04%)
0.511.522.533.544.550.150.20.250.30.350.40.450.5yP(X=4)=32.8%
Binomial distribution for n=5 trials, p=0.9 (highlighted: P(X=4)=32.8%)

1. Discrete vs. Continuous Distributions

Probability distributions describe how likely different outcomes are for a random variable. They are classified into two types:

  • Discrete Distributions: For countable outcomes (e.g., number of customers, defects).
    • Binomial Distribution: Models the number of successes in n independent trials (each with success probability p).
      • Parameters: n (trials), p (probability of success).
      • PDF: .
      • Example: Number of successful online orders (e.g., Daraz) out of 10 attempts, where each order succeeds with 80% probability.
      • Worked Example: Problem: A Daraz seller ships 5 orders/day with 90% success rate. What’s the probability of exactly 4 successful shipments? Solution:
00.150.30.440.59k=00.00001k=10.005k=20.0405k=30.1215k=40.32805k=50.59049Probability P(X=k) for Binomial(n=5, p=0.9)
Binomial distribution probabilities for n=5 trials, p=0.9 success probability (highlighted: P(X=4)=32.8%)
  • Poisson Distribution: Models rare events over time/space (e.g., customer arrivals, defects).

    • Parameters: λ (average rate of events per interval).
    • PDF: .
    • Example: Customers arriving at an eSewa kiosk (λ = 5/hour). Probability of 3 arrivals in 1 hour:
  • Continuous Distributions: For uncountable outcomes (e.g., time, measurement).

    • Exponential Distribution: Models time between independent events (e.g., call durations, machine failures).

      • Parameters: λ (rate parameter, inverse of mean).
      • PDF: .
      • Example: Ncell call durations average 2 minutes (λ = 1/2). Probability a call lasts >3 minutes:
    • Normal Distribution: Models symmetric, bell-shaped data (e.g., heights, stock returns).

      • Parameters: μ (mean), σ (standard deviation).
      • PDF: .
      • Example: NEPSE stock returns average 10% with σ=2%. Probability of returns >12%:

2. Comparative Table of Distributions

Distribution Type Parameters Use Case PDF/CDF
Binomial Discrete n, p Success/failure (e.g., Daraz orders)
Poisson Discrete λ Event counts (e.g., eSewa arrivals)
Exponential Continuous λ Time between events (e.g., Ncell calls)
Normal Continuous μ, σ Symmetric data (e.g., NEPSE returns)
123456-10000-8000-6000-4000-2000200040006000800010000xyGamma(3,1)Normal(0,1)
Example PDFs for continuous distributions (Gamma vs Normal) with matching table parameters

Stochastic Processes

Stochastic processes model systems evolving randomly over time. Key types:

flowchart TD
    A["New Customer"] -->|"0.6"| B["Regular"]
    A -->|"0.1"| C["Lost"]
    B -->|"0.7"| B
    B -->|"0.2"| C
    C -->|"0.3"| B
    C -->|"0.7"| C
Markov chain transition paths (highlighted: New → Regular → Lost)

1. Markov Chains

  • Definition: A sequence of states where transitions depend only on the current state (memoryless property).
  • Example: Customer loyalty in a bank:
    • States: {New, Regular, Lost}.
    • Transition matrix:
      From\To   | New   | Regular | Lost
      ----------------------------
      New       | 0.3   | 0.6     | 0.1
      Regular   | 0.1   | 0.7     | 0.2
      Lost      | 0.0   | 0.3     | 0.7
      
    • Worked Example: Starting with a "New" customer, probability of being "Lost" after 2 steps:
    • Visualization:
0.60.10.10.20.30.7NewRegularLost
Markov chain transition probabilities (P(Lost at step 2) = 0.22 calculation shown in text)

2. Renewal Processes

  • Definition: Models repeated events where inter-arrival times are independent and identically distributed (i.i.d.).
  • Example: Bus arrivals at a Pokhara terminal (exponential inter-arrival times, λ = 1/10 minutes).
    • Worked Example: Probability no bus arrives in 5 minutes:

## In the Real World

  1. Daraz Order Processing:

    • Idea: Poisson distribution models order arrivals (λ = 20 orders/hour).
    • How: Simulate peak hours (e.g., 6–9 PM) to predict server load or staffing needs. Example: Probability of >25 orders in 1 hour:
  2. Ncell Customer Service:

    • Idea: Exponential distribution models call durations (λ = 1/3 minutes).
    • How: Estimate queue lengths. Example: Probability a call lasts >4 minutes:
  3. NEPSE Stock Returns:

    • Idea: Normal distribution models daily returns (μ = 0.5%, σ = 1.2%).
    • How: Assess risk. Example: Probability of a >2% return:
  4. Khalti Transaction Fraud:

    • Idea: Binomial distribution models fraudulent transactions (p = 0.001 per transaction).
    • Worked Example: Probability of ≥2 frauds in 1000 transactions:

## Exam Tip

  1. Identify the Right Distribution:

    • Discrete counts? → Binomial/Poisson.
    • Time between events? → Exponential.
    • Symmetric data? → Normal.
    • Example Question: "Customers arrive at a rate of 10/hour. What distribution models arrivals?" Answer: Poisson (λ = 10).
  2. Calculate Probabilities Step-by-Step:

    • Show all intermediate steps (e.g., binomial coefficients, Z-scores).
    • Use tables for normal distributions if calculators aren’t allowed.
  3. Stochastic Processes:

    • For Markov chains, multiply transition probabilities across steps.
    • For renewal processes, use the CDF of the inter-arrival distribution.
  4. Real-World Scenarios:

    • Link theory to examples like:
      • "A bank processes loans with exponential service times (μ = 5 loans/hour). What’s the probability a loan takes >10 minutes?" Solution: .
  5. Common Pitfalls:

    • Confusing Poisson (rate λ) with exponential (rate λ for time).
    • Forgetting to convert to Z-scores for normal distributions.
    • Misapplying binomial parameters (e.g., using n as probability).

In the real world

  • Daraz Order Processing: Uses Poisson distribution to model order arrivals (λ=20 orders/hour) for predicting peak-hour server load. Example: Probability of >25 orders in 1 hour is 8.21% (used for staffing decisions).
  • Ncell Customer Service: Applies exponential distribution (λ=1/3 minutes) to estimate call durations, helping optimize call-center staffing. Example: 60.65% chance no bus arrives in 5 minutes (renewal process for Pokhara terminal).
  • NEPSE Stock Returns: Normal distribution (μ=10%, σ=2%) models daily returns, guiding investment strategies. Example: 15.87% chance of returns >12%.

Based on the TU BSc CSIT syllabus for Simulation and Modeling (CSC317), unit 4.

Discussion

Loading…