Lecture Materials

Learning Goals

By the end of Friday's lecture, you should be able to calculate a probability, expectation or variance of a continuous random variable, given its probability density function or cumulative density function



Concept Check


Questions & Answers

Q: How's baby Freya doing?

A1:  shes so amazing

Q: Will this class be curved up or down? And are there gonna be plus / minuses?

A1:  It certainly won’t be curved down, though it will be curved up if the quizzes turn out to be more difficult than we expect. And yes, there are -’s and +’s, though we’ve not given A+’s the last three quarters.

Q: do delta distributions work as pdfs?

A1:  You mean delta functions that are zero everywhere except at one location, where the function is infinite? Yes, they’re legal PDFs, though we won’t rely on them in CS109.

Q: Is it possible to have a pdf where P(X = c) > 0 for example if it was the dirac delta function?

A1:  You’re a quantum physicist, aren’t you? :) Yes, that’s different, because that’s a PDF where the density is infinite.

Q: How do we produce the PDF?

A1:  In this case of the Uniform Bus slide up right now, the PDF is given as Uni(0, 30), which is 0 everywhere except between 0 and 30 inclusive, where the density is 1/30.

A2:  It’s either drawn from you, or it’s simply given to you as a traditional function whose integral from -inf to +inf equals 1.

Q: On slide 39 it says that the E[X] = (beta - alpha) / 2 for a Uniform RV but on this slide is says that E[X] = 1/2 (alpha + beta). Are those the same?

A1:  good catch… I’ll have Chris fix it after lecture is over.

A2:  looks like a typo if that’s what it says.. the numerator should be the sum, not the difference.

Q: on the slide it said E[X] = (beta-alpha)/2, should it be (beta+alpha)/2?

A1:  yep, that’s a typo… I’ll have Chris correct it and republish the slides after lecture is over.

Q: What if we are interested in n>1 events in the next duration of time?

A1:  The second, however, would reframed to be Y = 2X, which is the exponential RV used to model the amount of time needed to see two events.

A2:  Neat question, though it can be interpreted two different ways. Do you mean what’s the probability that one or more earthquakes occur in the next year? or what’s the probabilty we need to wait just a year for two earthquakes?

A3:  The first one is governed by a Poisson, which the time range is fixed and the number of events is just said to be two or more.

Q: E.g. what's the probability there'll be two earthquakes in the next 30 years?

A1:  That’s better modeled as a Poission, where the unit of time is 30 years instead of 1 year.

Q: what do we do to the var and <x> if the value of lambda is uncertain (has its own variance)

A1:  fun question… because expectation is linear, the expectation would be framed in terms of E[lambda]. Similar for the variance, though it would be framed in terms of both E[lambda] and [lambda^2].

Q: do cumulative density functions also exist for discrete variables where the sum might get messy? e.g. poisson

A1:  in principle, yes, though you’re at the whim of the density function as to whether there’s a closed form for the sum. For the Poission, there isn’t. :)

Q: Is this just like a cumulative distribution function for a continous variable?

A1:  yes. :)

Q: So the range of the CDF must be bounded between 0 and 1?

A1:  yes, because any integral over a legit CDF must be nonegative, but it can’t be greater than one.

Q: For the earthquake scenerio, isn't it more useful to consider the conditional probability where you know when the last earthquake happened?

A1:  The way the problem was stated, the history of past earthquakes doens’t impact the rate of earthquakes going forward. What you’re proposing here is a more sophisticated, time-sensitive analysis. We touch on that during dead week, but there are many other courses dedicated to time-series probabilistic analysis. It’s mathematically more intense than anything we want to show here. :)

Q: did we previously get 0.002 because we expect 1 major earthquake ever 500 years?

A1:  yes!

Q: could you use exponential distribution to model the probability of a balloon exploding in your face while you're inflating it? Zoltak

A1:  If pressure increases at a constant rate, then it certainly could be, yes, though it would also be a function of the strength of the balloon and whether it’s consistent across all ballons.

Q: im a survivor

A1:  :)

A2:  you’re so brave to share your near-balloon-pop death story with all of us.