Probability 3.1 Discrete Random Variables Basics Anna Karlin Most slides by Alex Tsun
Agenda ● Intro to Discrete Random Variables ● Probability Mass Functions ● Cumulative Distribution function ● Expectation
Flipping two coins
Random Variable
20 balls numbered 1..20 ● Draw a subset of 3 uniformly at random. ● Let X = maximum of the numbers on the 3 balls. 9 1 11 1 I support 203 a 20 b 18 c d F
Random Variable
Identify those RVs a b c d Which cont Whichhas Range 42,3 a a b b 4 c d d
Random Picture
Flipping two coins
Flipping two coins i
Flipping two coins
Probability Mass Function (PMF)
Probability Mass Function (PMF)
20 balls numbered 1..20 ● Draw a subset of 3 uniformly at random. ● Let X = maximum of the numbers on the 3 balls.
Probability Mass Function (PMF)
20 balls numbered 1..20 ● Draw a subset of 3 uniformly at random. ● Let X = maximum of the numbers on the 3 balls. ● Pr (X = 20) a Kaka ● Pr (X = 18) b Ypg c Ma d ag
<latexit sha1_base64="sRHOyOvZfuCwr5D5z+nUz+WLjz4=">AB7nicbVDLSgNBEOz1GeMr6tHLYBDiJexGQY9BQTxGMA9IljA7mU2GzM4uM71iCPkILx4U8er3ePNvnCR70MSChqKqm+6uIJHCoOt+Oyura+sbm7mt/PbO7t5+4eCwYeJUM15nsYx1K6CGS6F4HQVK3ko0p1EgeTMY3kz95iPXRsTqAUcJ9yPaVyIUjKVmrfdVunpjHQLRbfszkCWiZeRImSodQtfnV7M0ogrZJIa0/bcBP0x1SiY5JN8JzU8oWxI+7xtqaIRN/54du6EnFqlR8JY21JIZurviTGNjBlFge2MKA7MojcV/PaKYZX/lioJEWu2HxRmEqCMZn+TnpCc4ZyZAlWthbCRtQTRnahPI2BG/x5WXSqJS983Ll/qJYvc7iyMExnEAJPLiEKtxBDerAYAjP8ApvTuK8O/Ox7x1xclmjuAPnM8f9lKOqg=</latexit> <latexit sha1_base64="hL+FaLtOT9luwfLW3Ut08xl3Pcw=">AB6HicbVDLTgJBEOzF+IL9ehlIjHxRHbRI9ELx4hkUcCGzI79MLI7OxmZtZICF/gxYPGePWTvPk3Dr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HsHM0nQj+hQ8pAzaqzU7pCeQPLUL1fcqjsHWSVeTiqQo9Evf/UGMUsjlIYJqnXcxPjZ1QZzgROS71UY0LZmA6xa6mkEWo/m587JWdWGZAwVrakIXP190RGI60nUWA7I2pGetmbif953dSE137GZIalGyxKEwFMTGZ/U4GXCEzYmIJZYrbWwkbUWZsQmVbAje8surpFWrehfV2v1lpX6Tx1GEziFc/DgCupwBw1oAoMxPMrvDmJ8+K8Ox+L1oKTzxzDHzifP3objwE=</latexit> Cumulative distribution function(CDF) The cumulative distribution function (CDF) of a random variable specifies for each possible real number , F X ( x ) x the probability that , that is X ≤ x F X ( x ) = P ( X ≤ x )
Homeworks of 3 students returned randomly ● Each permutation equally likely ● X: # people who get their own homework Prob Outcome w X(w) 1/6 1 2 3 3 1/6 1 3 2 1 pmf 1/6 2 1 3 1 I 1/6 2 3 1 0 1/6 3 1 2 0 1/6 3 2 1 1 43 ko L's g
Probability Alex Tsun Joshua Fan
Flipping two coins
Expectation
Homeworks of 3 students returned randomly ● Each permutation equally likely ● X: # people who get their own homework ● What is E(X)? Prob Outcome w X(w) 1/6 1 2 3 3 1/6 1 3 2 1 1/6 2 1 3 1 1/6 2 3 1 0 1/6 3 1 2 0 1/6 3 2 1 1 nXHP w X t X 312 P 312 X 231 P 231 tX 321 P 321 t X 2B P 2B X 123 P123 X 132 P 132
Flip a biased coin until get heads (flips independent) With probability p of coming up heads Keep flipping until the first Heads observed. Let X be the number of flips until done. ● Pr(X = 1) a pk ● Pr(X = 2) k fl p b ● Pr(X = k) tp c p d p u p
Flip a biased coin until get heads (flips independent) With probability p of coming up heads Keep flipping until the first Heads observed. Let X be the number of flips until done. What is E(X)? A x'I k o osx at
Flip a biased coin independently Probability p of coming up heads, n coin flips X: number of Heads observed. ● Pr(X = k) a K p k b pkapy E a pj c d 2 pka p'T
Repeated coin flipping Flip a biased coin with probability p of coming up Heads n times. Each flip independent of all others. X is number of Heads. What is E(X)? A 20 p I a 4 b 5 c 10 d
Repeated coin flipping Flip a biased coin with probability p of coming up Heads n times. X is number of Heads. What is E(X)?
Flip a Fair coin independently ● Probability p of coming up heads, n coin flips ● X: number of Heads observed.
Probability 3.2 More on Expectation Alex Tsun
Agenda ● Linearity of Expectation (LoE) ● Law of the Unconscious Statistician (Lotus)
Linearity of Expectation (Idea) Let’s say you and your friend sell fish for a living. ● Every day you catch X fish, with E[X] = 3 . ● Every day your friend catches Y fish, with E[Y] = 7 . how many fish do the two of you bring in ( Z = X + Y ) on an average day? E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10 You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea) Let’s say you and your friend sell fish for a living. ● Every day you catch X fish, with E[X] = 3 . ● Every day your friend catches Y fish, with E[Y] = 7 . how many fish do the two of you bring in ( Z = X + Y ) on an average day? E[Z] = E[X + Y] = You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea) Let’s say you and your friend sell fish for a living. ● Every day you catch X fish, with E[X] = 3 . ● Every day your friend catches Y fish, with E[Y] = 7 . how many fish do the two of you bring in ( Z = X + Y ) on an average day? E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10 You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea) Let’s say you and your friend sell fish for a living. ● Every day you catch X fish, with E[X] = 3 . ● Every day your friend catches Y fish, with E[Y] = 7 . how many fish do the two of you bring in ( Z = X + Y ) on an average day? E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10 You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (LoE)
Linearity of Expectation (Proof)
Recommend
More recommend