Intro to Probability Instructor: Alexandre Bouchard

Similar documents
Joint Probability Distributions and Random Samples (Devore Chapter Five)

SDS 321: Introduction to Probability and Statistics

Recitation 2: Probability

n(1 p i ) n 1 p i = 1 3 i=1 E(X i p = p i )P(p = p i ) = 1 3 p i = n 3 (p 1 + p 2 + p 3 ). p i i=1 P(X i = 1 p = p i )P(p = p i ) = p1+p2+p3

Perhaps the simplest way of modeling two (discrete) random variables is by means of a joint PMF, defined as follows.

2 (Statistics) Random variables

Math 3215 Intro. Probability & Statistics Summer 14. Homework 5: Due 7/3/14

Single Maths B: Introduction to Probability

Intro to Probability Instructor: Alexandre Bouchard

EXAM # 3 PLEASE SHOW ALL WORK!

1 Random Variable: Topics

Lecture 02: Summations and Probability. Summations and Probability

Random Variables. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

STAT 430/510: Lecture 10

Review of Probability. CS1538: Introduction to Simulations

Lecture Notes 1 Probability and Random Variables. Conditional Probability and Independence. Functions of a Random Variable

Order Statistics and Distributions

Lecture Notes 1 Probability and Random Variables. Conditional Probability and Independence. Functions of a Random Variable

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 16 Notes. Class URL:

conditional cdf, conditional pdf, total probability theorem?

EE514A Information Theory I Fall 2013

Introduction to Stochastic Processes

Math Review Sheet, Fall 2008

Grundlagen der Künstlichen Intelligenz

RYERSON UNIVERSITY DEPARTMENT OF MATHEMATICS MTH 514 Stochastic Processes

Probability review. September 11, Stoch. Systems Analysis Introduction 1

Chapter 4 Multiple Random Variables

Multivariate distributions

Math 416 Lecture 2 DEFINITION. Here are the multivariate versions: X, Y, Z iff P(X = x, Y = y, Z =z) = p(x, y, z) of X, Y, Z iff for all sets A, B, C,

Basics of Probability

Machine Learning. Bayes Basics. Marc Toussaint U Stuttgart. Bayes, probabilities, Bayes theorem & examples

Data Modeling & Analysis Techniques. Probability & Statistics. Manfred Huber

This does not cover everything on the final. Look at the posted practice problems for other topics.

MATH 180A - INTRODUCTION TO PROBABILITY PRACTICE MIDTERM #2 FALL 2018

M378K In-Class Assignment #1

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

3 Multiple Discrete Random Variables

UCSD ECE 153 Handout #20 Prof. Young-Han Kim Thursday, April 24, Solutions to Homework Set #3 (Prepared by TA Fatemeh Arbabjolfaei)

ORIE 4741: Learning with Big Messy Data. Generalization

Review (probability, linear algebra) CE-717 : Machine Learning Sharif University of Technology

STAT 430/510: Lecture 15

T k b p M r will so ordered by Ike one who quits squuv. fe2m per year, or year, jo ad vaoce. Pleaie and THE ALTO SOLO

SDS 321: Introduction to Probability and Statistics

Lecture 25: Review. Statistics 104. April 23, Colin Rundel

Preliminary Statistics Lecture 2: Probability Theory (Outline) prelimsoas.webs.com

Review (Probability & Linear Algebra)

6.041/6.431 Fall 2010 Quiz 2 Solutions

ISyE 6739 Test 1 Solutions Summer 2015

ECE 302 Division 2 Exam 2 Solutions, 11/4/2009.

ECE353: Probability and Random Processes. Lecture 7 -Continuous Random Variable

Lecture 1: Basics of Probability

UCSD ECE153 Handout #27 Prof. Young-Han Kim Tuesday, May 6, Solutions to Homework Set #5 (Prepared by TA Fatemeh Arbabjolfaei)

Random Variables. Cumulative Distribution Function (CDF) Amappingthattransformstheeventstotherealline.

Bivariate Distributions. Discrete Bivariate Distribution Example

CS145: Probability & Computing

Formulas for probability theory and linear models SF2941

Quantitative Methods in Economics Conditional Expectations

Lecture 11. Probability Theory: an Overveiw

Lecture 2: Repetition of probability theory and statistics

Data Analysis and Monte Carlo Methods

CS37300 Class Notes. Jennifer Neville, Sebastian Moreno, Bruno Ribeiro

ECE302 Exam 2 Version A April 21, You must show ALL of your work for full credit. Please leave fractions as fractions, but simplify them, etc.

EE4601 Communication Systems

Data Mining Techniques. Lecture 3: Probability

Final Exam. Math Su10. by Prof. Michael Cap Khoury

Random Signals and Systems. Chapter 3. Jitendra K Tugnait. Department of Electrical & Computer Engineering. Auburn University.

A Probability Primer. A random walk down a probabilistic path leading to some stochastic thoughts on chance events and uncertain outcomes.

STAT 414: Introduction to Probability Theory

P (x). all other X j =x j. If X is a continuous random vector (see p.172), then the marginal distributions of X i are: f(x)dx 1 dx n

Notes on probability : Exercise problems, sections (1-7)

STAT 430/510 Probability Lecture 7: Random Variable and Expectation

Class 8 Review Problems solutions, 18.05, Spring 2014

Mathematics 426 Robert Gross Homework 9 Answers

MATH 450: Mathematical statistics

Topic 6 Continuous Random Variables

Independent random variables

0 otherwise. Page 100 Exercise 9: Suppose that a random variable X has a discrete distribution with the following p.m.f.: { c. 2 x. 0 otherwise.

HW Solution 12 Due: Dec 2, 9:19 AM

Math 3B: Lecture 11. Noah White. October 25, 2017

Lecture 1: Probability Fundamentals

Chapter 5 continued. Chapter 5 sections

STAT 418: Probability and Stochastic Processes

ECE 4400:693 - Information Theory

STAT 516 Midterm Exam 3 Friday, April 18, 2008

Bivariate distributions

Conditional distributions

Continuous distributions

Review: mostly probability and some statistics

Introduction to Probability Theory

Probability concepts. Math 10A. October 33, 2017

Multivariable Calculus and Matrix Algebra-Summer 2017

Lecture 13: Conditional Distributions and Joint Continuity Conditional Probability for Discrete Random Variables

ENGG2430A-Homework 2

Machine Learning. Instructor: Pranjal Awasthi

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

1 Joint and marginal distributions

More than one variable

DO NOT OPEN THIS QUESTION BOOKLET UNTIL YOU ARE TOLD TO DO SO

Lecture 10: Normal RV. Lisa Yan July 18, 2018

HW1 (due 10/6/05): (from textbook) 1.2.3, 1.2.9, , , (extra credit) A fashionable country club has 100 members, 30 of whom are

Transcription:

www.stat.ubc.ca/~bouchard/courses/stat302-sp2017-18/ Intro to Probability Instructor: Alexandre Bouchard

Announcements Graded midterm available after lecture Webwork due tonight

Regrading policy IF you would like a partial regrading, you should, BEFORE or ON Friday March 15 Tuesday 20th, hand in to me at the beginning of a lecture: your exam a clean piece of paper stapled to it that clearly (i) explains the question(s) you would like us to regrade AND (ii) the issue(s) you would like to raise NOTE: for fairness, the new grade for the question could stay the same, increase, or, in certain cases, decrease (except if the request is limited to the points mentioned in last Friday mass email)

Plan for today Sum of continuous random variables Conditional densities

Ex 53 Review: transformations Suppose I tell you that is the distribution of Richter scales What is the distribution of the amplitudes? For simplicity: Assume Richter scale X ~ Uniform(0, 1) What is the distribution of Y = exp(x)?

Review: recipe for transformations Suppose I tell you that is the distribution of Richter scales What is the distribution of the amplitudes? For simplicity: Assume Richter scale X ~ Uniform(0,1) What is the distribution of exp(x)? Recipe for finding the distribution of transforms of r.v. s 1 Find the CDF Density fx Richter: Amplitude: 0 1 1 2 3 4 5 6 7 8 9 10 2 Differentiate to find the density

Review: recipe for transformations Suppose I tell you that is the distribution of Richter scales What is the distribution of the amplitudes? For simplicity: Assume Richter scale X ~ Uniform(0,1) What is the distribution of exp(x)? 1 Find the CDF F Y (y) =P (exp(x) apple y) = P (X apple log(y)) Why? = F X (log(y)) = 1 [1,e] (y) log(y)

Why P(exp(X) y) = P(X log(y)) Because (exp(x) y) = (X log(y)), which is true because: log is increasing, i.e. x 1 x 2 iff log(x 1 ) log(x 2 ) this means I can take log on both sides of the inequality: (exp(x) y) = (log(exp(x)) log(y)) log/exp are invertible: log(exp(z)) = z, so (log(exp(x)) log(y)) = (X log(y))

Review: recipe for transformations Suppose I tell you that is the distribution of Richter scales What is the distribution of the amplitudes? For simplicity: Assume Richter scale X ~ Uniform(0,1) What is the distribution of exp(x)? 2 Differentiate to find the density f Y (y) = df Y (y) dy at points where FY is differentiable =1 [1,e] (y) 1 y

Sums of independent discrete random variables (exact method)

Sum of independent r.v.s: summary Approximations: Central limit theorem (Normal approximation) Use software/ppl Exact methods: Binomial distribution (works only for sum of Bernoullis) Today: general, exact method CONVOLUTIONS

Ex 68 Simple example X: outcome of white dice Y: outcome of black dice Example: computing P(X + Y = 4)

Simple example

Application Not convinced? Play this game: Settler of Catan

Prop 16 General formula for discrete r.v.s If: Z = X + Y Then: p Z (z) = y = p X (z y) p Y (y).

Sums of independent continuous random variables

Sum of continuous r.v.s X: a continuous r.v. with density fx Y: a continuous r.v. with density fy Assume they are indep: f(x, y) = fx(x) fy(y) What is the density fz of the sum Z = X + Y? Recipe for finding the distribution of transforms of r.v. s 1 Find the CDF Density fx Richter: Amplitude: 0 1 1 2 3 4 5 6 7 8 9 10 2 Differentiate to find the density

Ex 69 Example Let X and Y be independent and both uniform on [0, 1] y What is the density fz of the sum Z = X + Y? x

Example Let X and Y be independent and both uniform on [0, 1] y 1 Find the CDF What is the density fz of the sum Z = X + Y? x FZ(z) = P(Z z) example: z = 1 P( Z 1 ) = P( X + Y 1 ) =?

Example Let X and Y be independent and both uniform on [0, 1] y 1 Find the CDF P(Z z) for all z What is the density fz of the sum Z = X + Y? x example: z = 1 P( Z 1 ) = P( X + Y 1 ) y A = {(x,y) : x + y 1} = P( (X, Y) A ) = = Z A Z 1 = 1/2 f(x, y) dx dy Z 1 1 1 x f(x, y) dy dx x

Example Let X and Y be independent and both uniform on [0, 1] y 1 Find the CDF P(Z z) for all z x What is the density fz of the sum Z = X + Y? P( Z z ) = P( X + Y z ) = Definition of the = CDF F(y) = Z 1 Z z 1 1 Z 1 1 Z 1 1 f X (x) x f X (x)f Y (y) dy Z z 1 f X (x)(f Y (z x f Y (y) dy x)) dx dx dx

Example Let X and Y be independent and both uniform on [0, 1] y x What is the density fz of the sum Z = X + Y? 1 Find the CDF Differentiate to find the 2 density FZ(z) = P( Z z ) f Z (z) = df Z(z) = dz Under regularity conditions, you = can interchange integrals and derivatives = = Z 1 1 Z 1 1 Z 1 1 Z 1 1 f X (x)f Y (z x)dx Chain rule of f X (x) df Y (z x) calculus dx dz d f X (x)f Y (z x) (z x) dx dz f X (x)f Y (z x)dx

Prop 16b Sum of continuous r.v.s X: a continuous r.v. with density fx Y: a continuous r.v. with density fy What is the density fz of the sum Z = X + Y? f Z (z) = = f X (z y) f Y (y) dy f X (x) f Y (z x) dx Terminology: convolution

Ex 69 Let X and Y be independent and both uniform on [0, 1] y What is the density fz of the sum Z = X + Y? x Note: Not equal to the sum of the densities!!!

Conditional densities

Def 26* Conditional PMF and density Conditional PMF given y p X Y (x y) = joint PMF marginal PMF = p(x, y) p Y (y) Conditional density given y f X Y (x y) = joint density marginal density = f(x, y) f Y (y) * if denominator is non-zero

Prop 17a Rewriting chain rule For any events A, B, with P(A) > 0: P( A, B) = P(A) P(B A) p(x, y) =p X (x)p Y X (y x) Correspondence? A = (X = x), B = (Y = y)

Prop 17b Rewriting Bayes rule P (H E) = P (H)P (E H) P (E) H: hypothesis (unknown), E: evidence/observation p Z X (z x) = p Z(z)p X Z (x z) p Y (y) Correspondence? H = (Z = z), E = (X = x)

Prop 17c Density versions Chain rule Bayes rule densities PMFs Events P (A, B) =P (A)P (B A) p(x, y) =p X (x)p Y X (y x) f(x, y) =f X (x)f Y X (y x) P (H E) = P (H)P (E H) P (E) p Z X (z x) = p Z(z)p X Z (x z) p X (x) f Z X (z x) = f Z(z)f X Z (x z) f X (x)

Usual warning f and p behave similarly in formulas (replacing sums by integrals) BUT: as always, f(x, y), fx(x), fy(y) and fx Y(x y) are NOT probabilities. We integrate over a region to get probabilities For fx(x), fy(y) and fx Y(x y), use a single integral For f(x, y), use a double integral

Example: Using conditioning to predict the number of future members of the human species

Ex 72 Simple problem I have a measuring tape, but you do not know how long is it. Length of tape: Z I go in a separate room, unroll it fully, and pick a number at random from the tape. Random point on tape: Y If I tell you Y, how should we optimally guess Z?

Ex 72 Model I have a measuring tape, but you do not know how long is it. Z ~ Unif(0, 5) Length of tape: Z Let s say we think it s less than 5m I go in a separate room, unroll it fully, and pick a number at random from the tape. Y Z ~ Unif(0, Z) Random point on tape: Y

Ex 72 More dramatic version: how to predict the number of future members of the human species? I have a measuring tape, but you do not know how long is it (Z). Total number of humans to ever live, future and past (in trillion) I go in a separate room, unroll it fully, and pick a number (Y) at random from the tape. Number of humans that were born before present (from archeological records, ~0.06 trillion) If I tell you Y, how should we optimally guess Z? Can we guess (probabilistically) how many more human there will be? http://en.wikipedia.org/wiki/doomsday_argument

Conditional probability: continuous case Beliefs before new info (prior) fz(z) Conditioning Updated beliefs fz Y(z y) New information (observation): a fixed point y

Ex 72 Exercises: see handout Write fz(z) and fy Z(y z) Write f(z,y) Compute fy(y) Z ~ Unif(0, 5) Y Z ~ Unif(0, Z) Observed: Y 0.06 Compute fz Y(z y) Compute the conditional expectation: Z 1 E[Z Y ]= 1 zf Z Y (z Y )dz

Useful formulas for continuous random variables Marginalization Z +1 Uniform density U Unif(a, b) f X (x) = 1 f(x, y) dy f U (u) = 1 (a,b)(u) b a Conditional density given y f X Y (x y) = joint density marginal density = f(x, y) f Y (y)

Ex 72a Z ~ Unif(0, 5) Joint density? Y Z ~ Unif(0, Z) Observed: Y 0.06 A. 1 [y,5] (z) y 5 1 [0,z] (y) z Hint: B. 1 [0,5] (y) 5 1 [0,y] (z) y C. D. 1 [0,5] (z) 5 1 [0,5] (z) 5 1 [0,z] (y) z 1 [0,5] (y) 5

Ex 72a Z ~ Unif(0, 5) Joint density? Y Z ~ Unif(0, Z) Observed: Y 0.06 A. 1 [y,5] (z) y 5 1 [0,z] (y) z Hint: B. 1 [0,5] (y) 5 1 [0,y] (z) y C. D. 1 [0,5] (z) 5 1 [0,5] (z) 5 1 [0,z] (y) z 1 [0,5] (y) 5

Z ~ Unif(0, 5) Joint density Y Z ~ Unif(0, Z) Observed: Y 0.06 1 (0,5) (z) 5 1 (0,z) (y) z f(z,y){ { { fz(z) fy Z(y z)

Ex 72b Marginal of Y, fy(y) For 0 < y < 5: Z ~ Unif(0, 5) Y Z ~ Unif(0, Z) Observed: Y 0.06 A. 1 5 (log 5 log y) B. log 5 log y C. 2 2 y 2 25 D. 1 5 2 2 y 2 25

Ex 72b Marginal of Y, fy(y) For 0 < y < 5: Z ~ Unif(0, 5) Y Z ~ Unif(0, Z) Observed: Y 0.06 A. 1 5 (log 5 log y) B. log 5 log y C. 2 2 y 2 25 D. 1 5 2 2 y 2 25

Posterior density, f Z Y (z y) f Z Y (z y) = 1 (0,5)(z)1 (0,z) (y) z(log(5) log y) At y = 0.06, get: 1.5 Density of Z Approximation of f(x) 1.0 0.5 0.0 0 1 2 3 4 5 x

Carter catastrophe Density of Z At y = 0.06, get: 1.5 Approximation of f(x) 1.0 0.5 0 1 2 3 4 5 x - Does not mean humanity will come to an end! Why? 0.0 - Assumptions (e.g. that our birth rank should be viewed uniform among all human births) still hotly debated - Choice of prior on Z: are we over-pessimistic/optimistic by assuming a uniform prior density on [0,5]? - However, note that the math is solid (think about the measuring tape example if uncomfortable with Carter s assumptions) Brandon Carter; McCrea, W. H. (1983). "The anthropic principle and its implications for biological evolution".philosophical Transactions of the Royal Society of London. A310 (1512): 347 363. doi:10.1098/rsta.1983.0096.

Ex 72c Conditional expectation Z ~ Unif(0, 5) Y Z ~ Unif(0, Z) Observed: Y 0.06 f Z Y (z y) = 1 (0,5)(z)1 (0,z) (y) z(log(5) log y) At y = 0.06... E[Z Y ]= Z 1 1 zf Z Y (z Y )dz... A. 1.5 B. 1.23 C. 1.117 D. 0.9714

Ex 72c Conditional expectation Z ~ Unif(0, 5) Y Z ~ Unif(0, Z) Observed: Y 0.06 f Z Y (z y) = 1 (0,5)(z)1 (0,z) (y) z(log(5) log y) At y = 0.06... E[Z Y ]= Z 1 1 zf Z Y (z Y )dz... A. 1.5 B. 1.23 C. 1.117 D. 0.9714