Continuous Random Variables (most slides borrowed with permission from Andrew Moore of CMU and Google) http://www.cs.cmu.edu/~awm/tutorials Announcements • CS Welcome event – Thursday 3:30, ECCR 265 – poster presentations • Mozer lab research meeting – Wednesdays 11:00-12:30, ECCS 127 – Email me if you’d like to be on our mailing list Real-Valued Random Variables • Previous lecture on probability focused on discrete random variables – true, false – male, female – freshman, sophomore, junior, senior • Can sometimes quantize real variables to make them discrete – E.g., age, height, distance • Today: how to handle variables that cannot be quantized Probability Mass Vs. Density • Discreet RVs have a probability mass associated with each value of the variable – P(male)=.7, P(female)=.3 • Imagine if the variable had an infinite number of values instead of a finite number… 0.4 0.2 0.3 0.15 0.2 0.1 0.1 0.05 0 0 0.12 0.06 0.1 0.05 0.08 0.04 0.06 0.03 0.04 0.02 0.02 0.01 0 0 Probability Mass Vs. Density • Continuous RVs have a probability density associated with each value – Probability density function (PDF) • Density is derivative of mass • Notation: P(…) for mass, p(…) for density 0.4 0.2 0.3 0.15 0.2 0.1 0.1 0.05 0 0 0.12 0.06 0.1 0.05 0.08 0.04 0.06 0.03 0.04 0.02 0.02 0.01 0 0 = E[X2] - E[X]2 Density estimate of automobile weight and MPG Note change in notation: Previously used P(x^y) for joint = E[(Xi - mi )(Xj - m j )] Covariance Facts Consider 2D case with (X,Y) s xy2 = E[(Xi - mi )(X j - m j )] = E[Xi X j ] - mi m j s x2 = E[(Xi - mi )(Xi - mi )] = E[Xi2 ] - mi2 FALSE TRUE ? ? Mike’s Basic Advice on Continuous Random Variables • Ignore the fact that p(x) is a probability density function and treat it just as a mass function, and the algebra all works out. • Alternatively, turn densities to masses with dx terms, and they should always cancel out. • Don’t be freaked when you see a probability density >> 1. • Do be freaked if you see a probability mass or density < 0.
© Copyright 2026 Paperzz