AI summary by TwinMind

Expected Values for Continuous Variables!!!

StatQuest with Josh Starmer

19m 44s

Introduction and Prerequisites

  • Educational video by Josh Starmer on StatQuest
  • Topic: Expected values for continuous variables (Part 2)
  • Assumes familiarity with expected values Part 1 (discrete variables)
  • References previous example: Statsquatch's bet about Troll 2 movie
    • Expected value was 0.66 (gain 66 cents per bet on average)

Discrete vs Continuous Variables Definition

  • Discrete variables: Have discrete outcomes (like betting - lose $1 or gain $1)
  • Continuous variables: Come from measuring things, outcomes are continuous
  • Example scenario: Measuring waiting time between meeting people in Statland

Data Collection and Modeling

  • Initial data collection: Recording wait times (10, 30, 0, 10 seconds, etc.)
  • Problem with discrete intervals: Gaps in data, interval size concerns
  • Solution: Model with exponential distribution
  • Exponential distribution equation: f(x) = λe^(-λx)
    • λ (lambda) = rate parameter (people met per second)
    • Defines curve shape

Exponential Distribution Parameters

  • λ = 0.05: Fits collected data
  • λ = 0.1: Steeper slope, more people per second (green curve)
  • λ = 0.01: Flatter curve, fewer people per second (orange curve)
  • Curve extends theoretically to positive infinity

Probability Calculations

  • Probability of meeting someone ≤10 seconds: Integrate from 0 to 10
    • Result: 0.39 when λ = 0.05
  • Probability of meeting someone between 25.302-30.122 seconds: 0.06
  • Y-axis represents likelihood values (used in maximum likelihood estimation)
  • Total area under curve = 1

Approximating Continuous with Discrete

  • Divide time into 10-second intervals (rectangles)
  • Rectangle height = exponential function value at midpoint
  • Rectangle area = height × width = approximate probability
  • First interval (0-10 seconds):
    • Height at x=5: 0.04
    • Area: 0.04 × 10 = 0.4
    • Compare to exact integral: 0.39

Expected Value Calculation - Discrete Approximation

  • Using 10-second intervals:
    • First term: 10 × 0.4
    • Second term: 20 × 0.2
    • Result: 22 seconds average wait time
  • Using 5-second intervals: 21.8 seconds (better approximation)
  • As interval width → 0 and rectangles → infinity: exact calculation

Continuous Expected Value Formula

  • Discrete: E[X] = Σ(outcomes × probabilities)
  • Continuous: E[X] = ∫x·f(x)dx
  • Key differences:
    1. Replace sum with integral
    2. Replace probability with likelihood (y-axis coordinate)
  • Formula works for any continuous distribution

Mathematical Derivation for Exponential Distribution

  • E[X] = ∫₀^∞ x·λe^(-λx)dx
  • Integration by parts:
    • f(x) = x, f'(x) = 1
    • g'(x) = λe^(-λx), g(x) = -1/λ·e^(-λx)
  • L'Hôpital's rule applied for limit as x→∞
  • Final result: E[X] = 1/λ

Final Calculation and Answer

  • Given λ = 0.05
  • Expected waiting time = 1/0.05 = 20 seconds
  • Answer to Statsquatch's question: Average 20 seconds between meeting people

Key Takeaways

  • Expected values for discrete vs continuous variables very similar
  • Two main differences:
    1. Sum → Integral
    2. Probability → Likelihood
  • Formula: E[X] = 1/λ for exponential distribution

TwinMind

Get summaries like this for your own meetings

TwinMind takes notes in the background during meetings, lectures, and calls, then writes the summary for you.

Free plan to get started

No bot joins your calls

Phone, desktop & Chrome apps

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome