1. Home
  2. Explore
  3. Computer Science
  4. Continuous Random Variables

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Continuous Random Variables

Speaker 1Speaker 2

Continuous Random Variables

5:26
0:00-5:26
  1. Anna

    Alright, Michael, today's lecture was packed. The professor started with a really personal story about losing vision in one eye and how it actually became a blessing in disguise. But the real focus was on random variables—both new discrete ones and then a big jump into continuous.

  2. Michael

    Right, that personal story was powerful, but the learning goal stuck with me: being able to pick up a new random variable quickly without re-deriving all the math. Like, if someone hands you a Borel distribution for a server queue, you should know what questions to ask—the story, the support, the PMF, expectation, variance.

  3. Anna

    Exactly. And they started with two new discrete ones: the geometric and the negative binomial. The geometric counts the number of trials until your first success. So if each coin flip has probability p of heads, the number of flips until you get heads is geometric. It can take values 1, 2, 3, …—never zero, because you can't get heads without flipping.

  4. Michael

    And the negative binomial is like the geometric's bigger sibling: it counts the total number of trials until you get r successes, not just one. So if you need to catch two Pokemon, each with probability p of catching one, the number of Pokeballs you throw until you've caught two is negative binomial. The support is r, r+1, r+2, …

  5. Anna

    Great summary. Then the professor hit us with examples to practice matching a real problem to a distribution. First, the dating one: if each person you date has a 0.2 probability of being 'the one', what's the average number of people you'll date before you find them? That's geometric, so expectation is 1/p = 5. Standard deviation uses variance (1-p)/p².

  6. Michael

    And then the jury selection example from a Supreme Court case—Justice Breyer used a binomial to model the number of minority jurors in a 12-person jury, with p = 60/1000 from the community demographics. But someone in class pointed out that sampling without replacement violates the binomial's independence assumption.

  7. Anna

    Right, the professor acknowledged that the hypergeometric distribution would be exact, but the binomial approximation was close—0.5241 vs 0.5261. So it's a good lesson: small violations of assumptions don't always break your answer, but you need to be aware of them.

  8. Michael

    Then the Bitcoin mining problem really tested our ability to pick the right random variable. For part (a), probability that the first try mines a Bitcoin—that's just (1/2)^G, since you need G zeros in a row. But part (b) asked: probability you need fewer than 100 attempts to mine two Bitcoins. Two ways to model it—either as a negative binomial with r=2 and p=(1/2)^G, asking P(X<100), or as a binomial with n=99 and p=(1/2)^G, asking P(≥2 successes). Both work.

  9. Anna

    That was a great demonstration of flexible thinking. But then the professor pivoted to continuous random variables, and that's where things got really interesting. The motivation: not everything is discrete. Time until an earthquake, or the exact time a bus arrives—those are continuous. You can't ask the probability of it arriving exactly at 2:17:00.000… You need a probability density function, or PDF.

  10. Michael

    The PDF is the derivative of the cumulative probability. So instead of a PMF that gives probabilities directly, you integrate the PDF over an interval to get a probability. The professor used the bus example: if you break time into smaller and smaller bins, the histogram smooths into a curve, and the area under that curve between two times gives the probability.

  11. Anna

    And they introduced two key continuous distributions: the uniform and the exponential. Uniform is simple—constant PDF over an interval [α, β]. If the bus arrival time is uniform from 0 to 30 minutes, the probability you wait less than 5 minutes (arriving at 15 minutes) is the area from 15 to 20, which is (20-15)/(30-0) = 5/30.

  12. Michael

    Then the exponential—the continuous friend of the Poisson. It models time until an event, like the next earthquake. Its PDF is λ e^{-λ x}, and λ is the same rate as the Poisson: average events per unit time. The expectation is 1/λ and variance is 1/λ². So the professor's earlier question about a major earthquake at Stanford: λ=0.002 earthquakes per year. Probability of a quake in the next 30 years is P(Y<30) for exponential Y.

  13. Anna

    But here's the best part: they showed us the cumulative distribution function, or CDF, which is the integral of the PDF. For an exponential, the CDF is 1 - e^{-λ x}. So you can answer P(Y<30) by just plugging 30 into that formula—no integration needed. And for P(Y>30), it's 1 minus the CDF. For P(Y between 1 and 2), you subtract CDF(2) - CDF(1).

  14. Michael

    Exactly. So the final earthquake example: what's the probability of a major earthquake in the next 4 years? With λ=0.002, P(Y<4) = 1 - e^{-0.002*4} = about 0.008. That's a 0.8% chance. The professor ended by saying that's the power of continuous random variables—you inherit all this machinery once you recognize the story.

  15. Anna

    And the big takeaway from the whole lecture: whether discrete or continuous, learning a new random variable means understanding its story, its possible values, its PMF or PDF, and its expectation and variance. That skill will carry you far beyond this course.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent