Visual Break Continuous Random Variable Image rendered using PBRT Realistic Image Synthesis SS2018
Visual Break Continuous Random Variable Image rendered using PBRT Realistic Image Synthesis SS2018
Continuous Random Variable • For lighting application, we might want to define probability of sampling illumination from each light source in the scene based on its power Φ i Φ i p i = P j Φ j Here, the probability is relative to the total power � 48 Realistic Image Synthesis SS2018
Probability Density Functions � 49 Realistic Image Synthesis SS2018
Probability density function 0 2 x • Consider a continuous RV that ranges over real numbers: , where [0 , 2) the probability of taking on any particular value is proportional to the x value 2 − x • It is twice as likely for this random variable to take on a value around 0 as it is to take around 1, and so forth. � 50 Realistic Image Synthesis SS2018
Probability density function • The probability density function (PDF) formalizes this idea: it describes the relative probability of a RV taking on a particular value. • Unlike PMF , the values of the PDFs are not the probabilities as such: a PDF must be integrated over an interval to yield a probability � 51 Realistic Image Synthesis SS2018
Probability density function For uniform random variables: For non-uniform random variables: ( 1 x ∈ [0 , 1) p ( x ) could be any function p ( x ) = 0 otherwise � 52 Realistic Image Synthesis SS2018
Probability density function Uniform distribution Non-uniform distribution constant pdf � 53 Realistic Image Synthesis SS2018
Probability density function Uniform distribution Non-uniform distribution constant pdf � 54 Realistic Image Synthesis SS2018
Probability density function Some properties of PDFs: p ( x ) > 0 Z ∞ p ( x ) dx = 1 −∞ � 55 Realistic Image Synthesis SS2018
Probability density function Z b x ∈ [ a, b ) p ( x ) dx = 1 a constant pdf a b � 56 Realistic Image Synthesis SS2018
Probability density function Z b x ∈ [ a, b ) p ( x ) dx = 1 a constant pdf Z b C C dx = 1 p ( x ) = C a Z b C dx = 1 a a b C ( b − a ) = 1 1 C = b − a � 57 Realistic Image Synthesis SS2018
Probability density function Z b x ∈ [ a, b ) p ( x ) dx = 1 a constant pdf Z b C C dx = 1 p ( x ) = C a Z b 1 p ( x ) = C dx = 1 b − a a a b C ( b − a ) = 1 1 C = b − a � 58 Realistic Image Synthesis SS2018
Cumulative distribution function • The PDF is the derivative of the random variable's CDF: p ( x ) � 59 Realistic Image Synthesis SS2018
Cumulative distribution function • The PDF is the derivative of the random variable's CDF: p ( x ) p ( x ) = dP ( x ) dx : cumulative distribution function (CDF) , P ( x ) also called cumulative density function � 60 Realistic Image Synthesis SS2018
Cumulative distribution function • The PDF is the derivative of the random variable's CDF: p ( x ) Z x p ( x ) = dP ( x ) P ( x ) = p ( x ) dx dx −∞ : cumulative distribution function (CDF) , P ( x ) also called cumulative density function � 61 Realistic Image Synthesis SS2018
Cumulative distribution function ( Z x 1 x ∈ [0 , 1) p ( x ) = P ( x ) = p ( x ) dx 0 otherwise −∞ constant pdf 1 � 62 Realistic Image Synthesis SS2018
Cumulative distribution function Z x p ( x ) P ( x ) = p ( x ) dx −∞ Non-constant pdf 1 � 63 Realistic Image Synthesis SS2018
Visual Break � 64 Image rendered using PBRT Realistic Image Synthesis SS2018
Probability: Integral of PDF • Given the arbitrary interval in the domain, integrating the PDF gives [ a, b ] the probability that a RV lies inside that interval: Z b P ( x ∈ [ a, b ]) = p ( x ) dx a p ( x ) a b � 65 Realistic Image Synthesis SS2018
Examples: Sampling PDFs � 66 Realistic Image Synthesis SS2018
Constant Sampling PDFs Random 2D Jittered 2D 1 1 0 1 0 1 � 67 Realistic Image Synthesis SS2018
Constant Sampling PDFs Random 1D 0 1 ξ ∈ [0 , 1) Sampling a unit domain with uniform random samples � 68 Realistic Image Synthesis SS2018
Constant Sampling PDFs Random 1D Random 1D 0 1 ξ ∈ [0 , 1) Sampling a unit domain with uniform random samples � 69 Realistic Image Synthesis SS2018
Constant Sampling PDFs Random 1D ( C x ∈ [0 , 1) p ( x ) = 0 otherwise 0 1 ξ ∈ [0 , 1) Sampling a unit domain with uniform random samples � 70 Realistic Image Synthesis SS2018
Constant Sampling PDFs Jittered 1D 0 1 Sampling each stratum with uniform random samples � 71 Realistic Image Synthesis SS2018
Constant Sampling PDFs Jittered 1D ∆ 0 1 ∆ = 1 N Sampling each stratum with uniform random samples � 72 Realistic Image Synthesis SS2018
Constant Sampling PDFs Jittered 1D Probability density of generating a sample in an -th stratum is given by: i ∆ i p ( x i ) = ??? 0 1 ∆ = 1 N Sampling each stratum with uniform random samples � 73 Realistic Image Synthesis SS2018
Constant Sampling PDFs Jittered 1D Probability density of generating a sample in an -th stratum is given by: i ∆ i ( x ∈ [ i N , i +1 N ) N p ( x i ) = 0 1 ∆ = 1 0 otherwise N Sampling each stratum with uniform random samples � 74 Realistic Image Synthesis SS2018
Joint PDFs Jittered 1D ∆ i First, we divide the domain into equal strata. 0 1 Second, we sample the domain. ∆ = 1 N This implies that two samples are correlated to each other. � 75 Realistic Image Synthesis SS2018
Joint PDFs Jittered 1D ∆ i First, we divide the domain into equal strata. 0 1 Second, we sample the domain. ∆ = 1 N This implies that two samples are correlated to each other. For two di ff erent strata and what is the joint PDF for jittered sampling ? i j , p ( x i , x j ) = ??? � 76 Realistic Image Synthesis SS2018
Conditional and Marginal PDFs � 77 Realistic Image Synthesis SS2018
Joint PDF For two random variables and , the joint PDF is given by: p ( x 1 , x 2 ) X 1 X 2 � 78 Realistic Image Synthesis SS2018
Joint PDF For two random variables and , the joint PDF is given by: p ( x 1 , x 2 ) X 1 X 2 p ( x 1 , x 2 ) = p ( x 2 | x 1 ) p ( x 1 ) � 79 Realistic Image Synthesis SS2018
Joint PDF For two random variables and , the joint PDF is given by: p ( x 1 , x 2 ) X 1 X 2 p ( x 1 , x 2 ) = p ( x 2 | x 1 ) p ( x 1 ) where, : conditional density function p ( x 2 | x 1 ) X 1 = x 1 : marginal density function p ( x 1 ) X 2 = x 2 � 80 Realistic Image Synthesis SS2018
Joint PDF For two random variables and , the joint PDF is given by: p ( x 1 , x 2 ) X 1 X 2 p ( x 1 , x 2 ) = p ( x 2 | x 1 ) p ( x 1 ) where, : conditional density function p ( x 2 | x 1 ) X 1 = x 1 : marginal density function p ( x 1 ) X 2 = x 2 � 81 Realistic Image Synthesis SS2018
Joint PDF For two random variables and , the joint PDF is given by: p ( x 1 , x 2 ) X 1 X 2 p ( x 1 , x 2 ) = p ( x 1 | x 2 ) p ( x 2 ) where, : conditional density function p ( x 1 | x 2 ) X 1 = x 1 : marginal density function p ( x 2 ) X 2 = x 2 � 82 Realistic Image Synthesis SS2018
Marginal PDF Z p ( x 1 ) = p ( x 1 , x 2 ) dx 2 R Z p ( x 2 ) = p ( x 1 , x 2 ) dx 1 R We integrate out one of the variable. � 83 Realistic Image Synthesis SS2018
Conditional PDF p ( x 1 | x 2 ) = p ( x 1 , x 2 ) p ( x 2 ) p ( x 2 | x 1 ) = p ( x 1 , x 2 ) p ( x 1 ) The conditional density function is the density function for given that x i some particular has been chosen. x j � 84 Realistic Image Synthesis SS2018
Conditional PDF If both and are independent then: x 1 x 2 p ( x 1 | x 2 ) = p ( x 1 ) p ( x 2 | x 1 ) = p ( x 2 ) � 85 Realistic Image Synthesis SS2018
Conditional PDF If both and are independent then: x 1 x 2 p ( x 1 | x 2 ) = p ( x 1 ) p ( x 2 | x 1 ) = p ( x 2 ) That gives: p ( x 1 , x 2 ) = p ( x 1 ) p ( x 2 ) � 86 Realistic Image Synthesis SS2018
Joint PDF of Jittered 1D Sampling i j 0 1 For two di ff erent strata and what is the joint PDF for jittered sampling ? i j , p ( x i , x j ) = ??? � 87 Realistic Image Synthesis SS2018
Joint PDF of Jittered 1D Sampling i j 0 1 p ( x 1 , x 2 ) = p ( x 1 | x 2 ) p ( x 2 ) � 88 Realistic Image Synthesis SS2018
Joint PDF of Jittered 1D Sampling i j 0 1 p ( x 1 , x 2 ) = p ( x 1 | x 2 ) p ( x 2 ) p ( x 1 , x 2 ) = p ( x 1 ) p ( x 2 ) � 89 Realistic Image Synthesis SS2018
Joint PDF of Jittered 1D Sampling i j 0 1 ( p ( x i ) p ( x j ) i 6 = j p ( x i , x j ) = 0 otherwise � 90 Realistic Image Synthesis SS2018
Joint PDF of Jittered 1D Sampling i j 0 1 ( p ( x i ) p ( x j ) i 6 = j p ( x i , x j ) = 0 otherwise ( N 2 i 6 = j p ( x i , x j ) = Since , p ( x i ) = N 0 otherwise � 91 Realistic Image Synthesis SS2018
Visual Break � 92 Image rendered using PBRT Realistic Image Synthesis SS2018
Expected Value � 93 Realistic Image Synthesis SS2018
Expected value • Expected value: average value of the variable N X E [ X ] = x i p i i =1 • example: rolling a die E [ X ] = 1 · 1 6 + 2 · 1 6 + 3 · 1 6 + 4 · 1 6 + 5 · 1 6 + 6 · 1 6 = 3 . 5 � 94 Realistic Image Synthesis SS2018
Expected value • Expected value: average value of the variable N X E [ X ] = x i p i i =1 • example: rolling a die E [ X ] = 1 · 1 6 + 2 · 1 6 + 3 · 1 6 + 4 · 1 6 + 5 · 1 6 + 6 · 1 6 = 3 . 5 � 95 Realistic Image Synthesis SS2018
Expected value • Properties: E [ X + Y ] = E [ X ] + E [ Y ] E [ X + c ] = E [ X ] + c E [ cX ] = cE [ X ] � 96 Realistic Image Synthesis SS2018
Expected value • Properties: E [ X + Y ] = E [ X ] + E [ Y ] E [ X + c ] = E [ X ] + c E [ cX ] = cE [ X ] � 97 Realistic Image Synthesis SS2018
Expected value • Properties: E [ X + Y ] = E [ X ] + E [ Y ] E [ X + c ] = E [ X ] + c E [ cX ] = cE [ X ] � 98 Realistic Image Synthesis SS2018
Estimating expected values • To estimate the expected value of a variable • choose a set of random values based on the probability • average their results N E [ X ] ≈ 1 X x i N i =1 • example: rolling a die roll 3 times: {3, 1, 6} → E [x] ≈ (3 + 1 + 6)/3 = 3.33 • roll 9 times: {3, 1, 6, 2, 5, 3, 4, 6, 2} → E [x] ≈ 3.51 • � 99 Realistic Image Synthesis SS2018
Estimating expected values • To estimate the expected value of a variable • choose a set of random values based on the probability • average their results N E [ X ] ≈ 1 X x i N i =1 • example: rolling a die roll 3 times: {3, 1, 6} → E [x] ≈ (3 + 1 + 6)/3 = 3.33 • roll 9 times: {3, 1, 6, 2, 5, 3, 4, 6, 2} → E [x] ≈ 3.51 • � 100 Realistic Image Synthesis SS2018
Recommend
More recommend