Continuous Joint Distributions Chris Piech CS109, Stanford University

Similar documents
CS 109 Lecture 11 April 20th, 2016

1 Probability Density Functions

Continuous Random Variables Class 5, Jeremy Orloff and Jonathan Bloom

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

Discrete Mathematics and Probability Theory Spring 2013 Anant Sahai Lecture 17

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 17

7 - Continuous random variables

Review of Gaussian Quadrature method

Math 426: Probability Final Exam Practice

Review of Probability Distributions. CS1538: Introduction to Simulations

Section 6: Area, Volume, and Average Value

x = a To determine the volume of the solid, we use a definite integral to sum the volumes of the slices as we let!x " 0 :

Expectation and Variance

Derivations for maximum likelihood estimation of particle size distribution using in situ video imaging

4.1. Probability Density Functions

The Evaluation Theorem

8 Laplace s Method and Local Limit Theorems

Monte Carlo method in solving numerical integration and differential equation

Lecture 17. Integration: Gauss Quadrature. David Semeraro. University of Illinois at Urbana-Champaign. March 20, 2014

( x) ( ) takes at the right end of each interval to approximate its value on that

2.2 Background Correction / Signal Adjustment Methods

Problem Set 9. Figure 1: Diagram. This picture is a rough sketch of the 4 parabolas that give us the area that we need to find. The equations are:

10. AREAS BETWEEN CURVES

Continuous Random Variables

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Experiments, Outcomes, Events and Random Variables: A Revisit

Definite Integrals. The area under a curve can be approximated by adding up the areas of rectangles = 1 1 +

10 Vector Integral Calculus

Lecture 3 Gaussian Probability Distribution

Chapter 3 Single Random Variables and Probability Distributions (Part 2)

Chapter 6 Continuous Random Variables and Distributions

Chapter 5 : Continuous Random Variables

Chapter 2. Random Variables and Probability Distributions

Solution for Assignment 1 : Intro to Probability and Statistics, PAC learning

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15

Section 6.1 Definite Integral

Nondeterminism and Nodeterministic Automata

Suppose we want to find the area under the parabola and above the x axis, between the lines x = 2 and x = -2.

1B40 Practical Skills

JDEP 384H: Numerical Methods in Business

Bayesian Networks: Approximate Inference

CS667 Lecture 6: Monte Carlo Integration 02/10/05

Multiplying integers EXERCISE 2B INDIVIDUAL PATHWAYS. -6 ì 4 = -6 ì 0 = 4 ì 0 = -6 ì 3 = -5 ì -3 = 4 ì 3 = 4 ì 2 = 4 ì 1 = -5 ì -2 = -6 ì 2 = -6 ì 1 =

Lecture 2: January 27

n f(x i ) x. i=1 In section 4.2, we defined the definite integral of f from x = a to x = b as n f(x i ) x; f(x) dx = lim i=1

Thomas Whitham Sixth Form

Integrals - Motivation

Lecture 1: Introduction to integration theory and bounded variation

Things to Memorize: A Partial List. January 27, 2017

Surface maps into free groups

Lecture 2 : Propositions DRAFT

Lecture 21: Order statistics

Numerical integration

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O

Today. Recap: Reasoning Over Time. Demo Bonanza! CS 188: Artificial Intelligence. Advanced HMMs. Speech recognition. HMMs. Start machine learning

Linear Inequalities. Work Sheet 1

Lecture 3: Curves in Calculus. Table of contents

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Session Trimester 2. Module Code: MATH08001 MATHEMATICS FOR DESIGN

p-adic Egyptian Fractions

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

4.4 Areas, Integrals and Antiderivatives

MTH 505: Number Theory Spring 2017

Continuous Random Variables

2. VECTORS AND MATRICES IN 3 DIMENSIONS

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007

Section 4: Integration ECO4112F 2011

Polynomials and Division Theory

Numerical Integration

Line and Surface Integrals: An Intuitive Understanding

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

LECTURE NOTE #12 PROF. ALAN YUILLE

CHAPTER : INTEGRATION Content pge Concept Mp 4. Integrtion of Algeric Functions 4 Eercise A 5 4. The Eqution of Curve from Functions of Grdients. 6 Ee

Riemann is the Mann! (But Lebesgue may besgue to differ.)

Reasoning and programming. Lecture 5: Invariants and Logic. Boolean expressions. Reasoning. Examples

Bob Brown Math 251 Calculus 1 Chapter 5, Section 4 1 CCBC Dundalk

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

If we have a function f(x) which is well-defined for some a x b, its integral over those two values is defined as

Joint distribution. Joint distribution. Marginal distributions. Joint distribution

8. Complex Numbers. We can combine the real numbers with this new imaginary number to form the complex numbers.

Normal Distribution. Lecture 6: More Binomial Distribution. Properties of the Unit Normal Distribution. Unit Normal Distribution

Chapter 6 Techniques of Integration

CMSC 330: Organization of Programming Languages

5.1 How do we Measure Distance Traveled given Velocity? Student Notes

METHODS OF APPROXIMATING THE RIEMANN INTEGRALS AND APPLICATIONS

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Numerical Analysis: Trapezoidal and Simpson s Rule

Orthogonal Polynomials

1 The Riemann Integral

7.1 Integral as Net Change and 7.2 Areas in the Plane Calculus

COSC 3361 Numerical Analysis I Numerical Integration and Differentiation (III) - Gauss Quadrature and Adaptive Quadrature

Section 5.4 Fundamental Theorem of Calculus 2 Lectures. Dr. Abdulla Eid. College of Science. MATHS 101: Calculus 1

MATH 1080: Calculus of One Variable II Fall 2017 Textbook: Single Variable Calculus: Early Transcendentals, 7e, by James Stewart.

Theoretical foundations of Gaussian quadrature

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

r 0 ( ) cos( ) r( )sin( ). 1. Last time, we calculated that for the cardioid r( ) =1+sin( ),

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7

Lecture 20: Numerical Integration III

Transcription:

Continuous Joint Distriutions Chris Piech CS09, Stnford University

CS09 Flow Tody Discrete Joint Distriutions: Generl Cse Multinomil: A prmetric Discrete Joint Cont. Joint Distriutions: Generl Cse

Lerning Gols. Know how to use multinomil. Be le to clculte lrge yes prolems using computer 3. Use Joint CDF

Motivting Exmples

Four Prototypicl Trjectories Recll logs

Log Review e y = x log(x) =y

Log Identities log( ) = log() + log() log(/) = log() log() log( n )=n log()

Products ecome Sums! log( ) = log() + log() log( Y i i )= X i log( i ) * Spoiler lert: This is importnt ecuse the product of mny smll numers gets hrd for computers to represent.

Four Prototypicl Trjectories Where we left off

Joint Proility Tle Wlk Bike Scooter Drive Mrginl Yer Freshmn 0.04 0.04 0.0 0.03 0. Sophomore 0.03 0.34 0.03 0.00 0.40 Junior 0.04 0. 0.0 0.00 0.5 Senior 0.07 0.08 0.0 0.00 0.6 5+ 0.04 0.07 0.00 0.0 0. Mrginl Mode 0. 0.73 0.06 0.05

The Multinomil Multinomil distriution n independent trils of experiment performed Ech tril results in one of m outcomes, with respective proilities: p, p,, p m where X i = numer of trils with outcome i m å i = p i = P c c ( X = c, X = c,..., X m = cm) = ç p p c, c,..., cm where æ n ö ç è ø Joint distriution m åci = i= n nd Multinomil # wys of ordering the successes æ ç èc, c n,..., c ö ø = c! c n!! c m m!... p c m m Proilities of ech ordering re equl nd mutully exclusive

The Multinomil Multinomil distriution n independent trils of experiment performed Ech tril results in one of m outcomes, with respective proilities: p, p,, p m where X i = numer of trils with outcome i m å i = p i = Count of ech word Joint distriution where m åci = i= n nd Multinomil # wys of ordering the successes æ ç èc, c n,..., c ö ø = c! c n!! c m m Proilities of ech word!

6-sided die is rolled 7 times Roll results: one, two, 0 three, four, 0 five, 3 six This is generliztion of Binomil distriution Binomil: ech tril hd possile outcomes Multinomil: ech tril hs m possile outcomes 7 3 0 0 6 5 4 3 6 40 6 6 6 6 6 6!!0!!0!3! 7! 3) 0,, 0,,, ( ø ö ç è æ = ø ö ç è æ ø ö ç è æ ø ö ç è æ ø ö ç è æ ø ö ç è æ ø ö ç è æ = = = = = = = X X X X X X P Hello Die Rolls, My Old Friends

Proilistic Text Anlysis According to the Glol Lnguge Monitor there re 988,968 words in the english lnguge used on the internet. The

Text is Multinomil P Exmple document: Py for Vigr with credit-crd. Vigr is gret. So re credit-crds. Risk free Vigr. Click for free. n = 8 Vigr = Free = Risk = Credit-crd: For = Proility of seeing this document spm spm = It s Multinomil! n!!!...! p vigrp free...p for The proility of word in spm emil eing vigr

Four Prototypicl Trjectories Who wrote the federlist ppers?

Old nd New Anlysis Authorship of Federlist Ppers 85 essys dvocting rtifiction of US constitution Written under pseudonym Pulius o Relly, Alexnder Hmilton, Jmes Mdison nd John Jy Who wrote which essys? o Anlyzed proility of words in ech essy versus word distriutions from known writings of three uthors

Four Prototypicl Trjectories Let s write progrm!

Text is Multinomil P Exmple document: Py for Vigr with credit-crd. Vigr is gret. So re credit-crds. Risk free Vigr. Click for free. n = 8 Vigr = Free = Risk = Credit-crd: For = Proility of seeing this document spm spm = It s Multinomil! n!!!...! p vigrp free...p for The proility of word in spm emil eing vigr

Continuous Rndom Vriles Joint Distriutions

Four Prototypicl Trjectories Continuous Joint Distriution

Riding the Mrguerite You re running to the us stop. You don t know exctly when the us rrives. You rrive t :0pm. Wht is P(wit < 5 min)?

Joint Drt Distriution P(hit within R pixels of center)? Wht is the proility tht drt hits t (456.34334355, 53.3443456)?

Joint Drt Distriution P(hit within R pixels of center)? Drt y loction 0. 0.005 Drt x loction

Joint Drt Distriution P(hit within R pixels of center)? Drt y loction 0. 0.005 Drt x loction

Joint Drt Distriution P(hit within R pixels of center)? Drt y loction Drt x loction

Joint Drt Distriution 900 y 0 x 900 In the limit, s you rek down continuous vlues into intestinlly smll uckets, you end up with multidimensionl proility density

Joint Proility Density Funciton A joint proility density function gives the reltive likelihood of more thn one continuous rndom vrile ech tking on specific vlue. 900 900 y 0 900 0 P ( < X, < Y ) = f X, ò ò Y ( x, x 900 y) dy dx

ò ò = < < ), ( ), ( P, Y X dx dy y x f Y X f X,Y (x, y) x y Joint Proility Density Funciton

plot y Acdemo Joint Proility Density Funciton P ( < X, < Y ) = f X, ò ò Y ( x, y) dy dx!

Multiple Integrls Without Ters l Let X nd Y e two continuous rndom vriles where 0 X nd 0 Y l We wnt to integrte g(x,y) = xy w.r.t. X nd Y: First, do innermost integrl (tret y s constnt): ò ò xy dx dy = ò æ ç è ò ö xy dx dy ø 0 y= 0 x= 0 y= 0 x= 0 y= 0 y= 0 Then, evlute remining (single) integrl: = ò é x yê ë ù ú û dy = ò y dy ò y= 0 y dy = é ê ë y 4 ù ú û 0 = - 0 =

Mrginliztion Mrginl proilities give the distriution of suset of the vriles (often, just one) of joint distriution. Sum/integrte over the vriles you don t cre out. p X () = X y p X,Y (, y) f X () = Z f X,Y (, y) dy f Y () = Z f X,Y (x, ) dx

Drts! Drt PDF y X-Pixel Mrginl x Y-Pixel Mrginl X N 900, 900 Y N 900 3, 900 5

Cumultive Density Function (CDF): ò ò - - = Y X Y X dx dy y x f F ), ( ), (,, ), ( ), (,, F f Y X Y X = Joint Cumultive Density Function

Joint CDF to s x +, y +, " to 0 s x -, y -,! plot y Acdemo

Jointly Continuous ò ò = < < ), ( ), ( P, Y X dx dy y x f Y X f X,Y (x, y) x y

Proilities from Joint CDF! " # < % " ', ) # < * ) ' =, -,. " ', ) '

Proilities from Joint CDF! " # < % " ', ) # < * ) ' =, -,. " ', ) '

Proilities from Joint CDF! " # < % " ', ) # < * ) ' =, -,. " ', ) '

Proilities from Joint CDF! " # < % " ', ) # < * ) ' =, -,. " ', ) ', -,. " #, ) '

Proilities from Joint CDF! " # < % " ', ) # < * ) ' =, -,. " ', ) ', -,. " #, ) '

Proilities from Joint CDF! " # < % " ', ) # < * ) ' =, -,. " ', ) ', -,. " #, ) ', -,. " ', ) #

Proilities from Joint CDF! " # < % " ', ) # < * ) ' =, -,. " ', ) ', -,. " #, ) ', -,. " ', ) #

Proilities from Joint CDF! " # < % " ', ) # < * ) ' =, -,. " ', ) ', -,. " #, ) ', -,. " ', ) # +, -,. " #, ) #

Proilities from Joint CDF! " # < % " ', ) # < * ) ' =, -,. " ', ) ', -,. " #, ) ', -,. " ', ) # +, -,. " #, ) #

Proility for Instgrm!

Gussin Blur In imge processing, Gussin lur is the result of lurring n imge y Gussin function. It is widely used effect in grphics softwre, typiclly to reduce imge noise. Gussin lurring with StDev = 3, is sed on joint proility distriution: Joint PDF f X,Y (x, y) = 3 e x +y 3 Joint CDF F X,Y (x, y) = x 3 y 3 Used to generte this weight mtrix

Gussin Blur Joint PDF f X,Y (x, y) = 3 e x +y 3 Joint CDF F X,Y (x, y) = Weight Mtrix x 3 y 3 Ech pixel is given weight equl to the proility tht X nd Y re oth within the pixel ounds. The center pixel covers the re where -0.5 x 0.5 nd -0.5 y 0.5 Wht is the weight of the center pixel? P ( 0.5 < X < 0.5, 0.5 < Y < 0.5) =P (X < 0.5,Y < 0.5) P (X < 0.5,Y < 0.5) P (X < 0.5,Y <0.5) + P (X < 0.5,Y < 0.5) 0.5 0.5 0.5 0.5 = 3 3 3 3 0.5 0.5 + 3 3 =0.566 0.566 0.4338 + 0.4338 =0.06

Four Prototypicl Trjectories Hve gret weekend!