Probability: Theory and practice Philipp Slusallek Karol - - PowerPoint PPT Presentation

probability theory and practice
SMART_READER_LITE
LIVE PREVIEW

Probability: Theory and practice Philipp Slusallek Karol - - PowerPoint PPT Presentation

Probability: Theory and practice Philipp Slusallek Karol Myszkowski Gurprit Singh 1 Realistic Image Synthesis SS2018 Administrative updates Please register for the exams (in HISPOS for Computer Science). Withdrawal deadline is


slide-1
SLIDE 1

Realistic Image Synthesis SS2018

Probability: Theory and practice

Philipp Slusallek Karol Myszkowski Gurprit Singh

  • 1
slide-2
SLIDE 2

Realistic Image Synthesis SS2018

Administrative updates

2

  • Please register for the exams (in HISPOS for Computer Science).
  • Withdrawal deadline is one week before the main exam (or re-exam).
  • For Seminars, withdrawal is allowed within three weeks after topic assignment
slide-3
SLIDE 3

Realistic Image Synthesis SS2018

A la Carte

3

  • algebra and measure

σ-

slide-4
SLIDE 4

Realistic Image Synthesis SS2018

A la Carte

3

  • algebra and measure
  • Random Variables

σ-

slide-5
SLIDE 5

Realistic Image Synthesis SS2018

A la Carte

3

  • algebra and measure
  • Random Variables
  • Probability distribution functions (PDFs and PMFs)

σ-

slide-6
SLIDE 6

Realistic Image Synthesis SS2018

A la Carte

3

  • algebra and measure
  • Random Variables
  • Probability distribution functions (PDFs and PMFs)
  • Conditional and Marginal PDFs

σ-

slide-7
SLIDE 7

Realistic Image Synthesis SS2018

A la Carte

3

  • algebra and measure
  • Random Variables
  • Probability distribution functions (PDFs and PMFs)
  • Conditional and Marginal PDFs
  • Expected value and Variance of a random variable

σ-

slide-8
SLIDE 8

Realistic Image Synthesis SS2018

Motivation: Ray Tracing

4

slide-9
SLIDE 9

Realistic Image Synthesis SS2018 5

Scene designed by David Coeurjolly

Ray Tracing

Image Plane

slide-10
SLIDE 10

Realistic Image Synthesis SS2018 6

Ray Tracing

Image Plane Scene designed by David Coeurjolly

slide-11
SLIDE 11

Realistic Image Synthesis SS2018 7

Direct Illumination

4 spp

Image rendered using PBRT

slide-12
SLIDE 12

Realistic Image Synthesis SS2018 8

Direct Illumination

256 spp

Image rendered using PBRT

slide-13
SLIDE 13

Realistic Image Synthesis SS2018 9

Direct and Indirect Illumination

4096 spp

Image rendered using PBRT

slide-14
SLIDE 14

Realistic Image Synthesis SS2018 10

Path Tracing

slide-15
SLIDE 15

Realistic Image Synthesis SS2018 11

Path Tracing

slide-16
SLIDE 16

Realistic Image Synthesis SS2018 12

Path Tracing

slide-17
SLIDE 17

Realistic Image Synthesis SS2018 13

Path Tracing

slide-18
SLIDE 18

Realistic Image Synthesis SS2018 14

4 spp

Direct and Indirect Illumination

Image rendered using PBRT

slide-19
SLIDE 19

Realistic Image Synthesis SS2018

How can we analyze the noise present in the images ?

15

slide-20
SLIDE 20

Realistic Image Synthesis SS2018

Probability Theory and/or Number Theory

16

slide-21
SLIDE 21

Realistic Image Synthesis SS2018

Probability Theory

17

slide-22
SLIDE 22

Realistic Image Synthesis SS2018

  • Discrete Probability Space
  • Continuous Probability Space

18

slide-23
SLIDE 23

Realistic Image Synthesis SS2018

Rolling a fair dice

19

Ω = {1, 2, 3, 4, 5, 6}

  • Finite outcomes: discrete random experiment

{2, 3, 5}

slide-24
SLIDE 24

Realistic Image Synthesis SS2018

Rolling a fair dice

19

Ω = {1, 2, 3, 4, 5, 6}

  • Finite outcomes: discrete random experiment
  • Can ask the outcome is a number: 1 or 6

{2, 3, 5}

slide-25
SLIDE 25

Realistic Image Synthesis SS2018

Rolling a fair dice

19

Ω = {1, 2, 3, 4, 5, 6}

  • Finite outcomes: discrete random experiment
  • Can ask the outcome is a number: 1 or 6
  • Can ask the outcome is a subset, e.g. all prime numbers:

{2, 3, 5}

slide-26
SLIDE 26

Realistic Image Synthesis SS2018

Rolling a fair dice

20

Ω = {1, 2, 3, 4, 5, 6}

  • R1: Apart from elementary values, the focus lies on subsets of

Ω Ω

slide-27
SLIDE 27

Realistic Image Synthesis SS2018

Rolling a fair dice

20

Ω = {1, 2, 3, 4, 5, 6}

  • R1: Apart from elementary values, the focus lies on subsets of
  • R2:

A probability assigns each element or each subset of a positive real value

Ω Ω

slide-28
SLIDE 28

Realistic Image Synthesis SS2018

Rolling a fair dice

20

Ω = {1, 2, 3, 4, 5, 6}

  • R1: Apart from elementary values, the focus lies on subsets of
  • R2:

A probability assigns each element or each subset of a positive real value

Ω Ω

The first requirement leads to the concept of -algebra

σ

slide-29
SLIDE 29

Realistic Image Synthesis SS2018

Rolling a fair dice

20

Ω = {1, 2, 3, 4, 5, 6}

  • R1: Apart from elementary values, the focus lies on subsets of
  • R2:

A probability assigns each element or each subset of a positive real value

Ω Ω

The first requirement leads to the concept of -algebra

σ

The second to the mathematical construct of a measure

slide-30
SLIDE 30

Realistic Image Synthesis SS2018

Random number in [0,1]

21

1

slide-31
SLIDE 31

Realistic Image Synthesis SS2018

Random number in [0,1]

21

1

slide-32
SLIDE 32

Realistic Image Synthesis SS2018

Random number in [0,1]

21

1

  • Uncountably infinite outcomes: continuous random experiment

slide-33
SLIDE 33

Realistic Image Synthesis SS2018

Random number in [0,1]

21

1

  • Uncountably infinite outcomes: continuous random experiment
  • Does not make sense to ask for one number as output, e.g. 0.245

slide-34
SLIDE 34

Realistic Image Synthesis SS2018

Random number in [0,1]

21

1

  • Uncountably infinite outcomes: continuous random experiment
  • Does not make sense to ask for one number as output, e.g. 0.245
  • We need to ask for the probability of a region, e.g. [0.2,0.4] or [0.36,0.89]

slide-35
SLIDE 35

Realistic Image Synthesis SS2018

Random number in [0,1]

22

  • R1: As in discrete case, focus lies on subsets of , also called events

Ω Ω Ω

1

slide-36
SLIDE 36

Realistic Image Synthesis SS2018

Random number in [0,1]

22

  • R1: As in discrete case, focus lies on subsets of , also called events
  • R2: A probability assigns each subset of a positive real value.

Ω Ω Ω

1

slide-37
SLIDE 37

Realistic Image Synthesis SS2018

Random number in [0,1]

22

  • R1: As in discrete case, focus lies on subsets of , also called events
  • R2: A probability assigns each subset of a positive real value.

Ω Ω

The first requirement leads to the concept of Borel -algebra

σ Ω

1

slide-38
SLIDE 38

Realistic Image Synthesis SS2018

Random number in [0,1]

22

  • R1: As in discrete case, focus lies on subsets of , also called events
  • R2: A probability assigns each subset of a positive real value.

Ω Ω

The first requirement leads to the concept of Borel -algebra

σ

The second to the mathematical construct of a Lebesgue measure

1

slide-39
SLIDE 39

Realistic Image Synthesis SS2018

  • Algebra

23

  • Mathematical construct used in probability and measure theory

σ

slide-40
SLIDE 40

Realistic Image Synthesis SS2018

  • Algebra

23

  • Mathematical construct used in probability and measure theory
  • 1. Take on the role of system of events in probability theory

σ

slide-41
SLIDE 41

Realistic Image Synthesis SS2018

  • Algebra

23

  • Mathematical construct used in probability and measure theory
  • 1. Take on the role of system of events in probability theory
  • Simply spoken: Collection of subsets of a given set

σ

slide-42
SLIDE 42

Realistic Image Synthesis SS2018

  • Algebra

23

  • Mathematical construct used in probability and measure theory
  • 1. Take on the role of system of events in probability theory
  • Simply spoken: Collection of subsets of a given set
  • A. A non-empty collection of subsets of that is closed under the set

theoretical operations of: countable unions, countable intersections, and complement

σ

slide-43
SLIDE 43

Realistic Image Synthesis SS2018

  • Algebra

24

  • For discrete set :

σ

slide-44
SLIDE 44

Realistic Image Synthesis SS2018

  • Algebra

24

  • For discrete set :
  • 1. The sigma-algebra corresponds to the power set of omega (set of all

subsets)

σ

slide-45
SLIDE 45

Realistic Image Synthesis SS2018

  • Algebra

25

  • For discrete set :
  • 1. The sigma-algebra corresponds to the power set of omega (set of all

subsets)

σ

Σ = {{φ}, {0}, {1}, {0, 1}} Ω = {0, 1}

slide-46
SLIDE 46

Realistic Image Synthesis SS2018

  • Algebra

26

  • For discrete set :
  • 1. The sigma-algebra corresponds to the power set of omega (set of all

subsets)

σ

Ω = {a, b, c, d} Σ = {{φ}, {0}, {1}, {0, 1}} Ω = {0, 1} Σ = {{φ}, {a, b}, {c, d}, {a, b, c, d}}

slide-47
SLIDE 47

Realistic Image Synthesis SS2018

  • Algebra

27

σ

  • For continuous set :

slide-48
SLIDE 48

Realistic Image Synthesis SS2018

  • Algebra

27

σ

  • For continuous set :
  • A. The associated sigma algebras are the Borel sets over , i.e., the collection
  • f all open sets over omega that can be generated via countable unions,

countable intersections, and complement of open sets

slide-49
SLIDE 49

Realistic Image Synthesis SS2018

  • Algebra

28

σ

  • For continuous set :
  • A. The associated sigma algebras are the Borel sets over , i.e., the collection
  • f all open sets over omega that can be generated via countable unions,

countable intersections, and complement of open sets

I = [p, q), p, q ∈ R

Fixed half-interval

slide-50
SLIDE 50

Realistic Image Synthesis SS2018

  • Algebra

29

σ

  • For continuous set :
  • A. The associated sigma algebras are the Borel sets over , i.e., the collection
  • f all open sets over omega that can be generated via countable unions,

countable intersections, and complement of open sets

I = [p, q), p, q ∈ R T = [α, β) ⊆ [p, q)

Fixed half-interval Collection of all half-intervals

slide-51
SLIDE 51

Realistic Image Synthesis SS2018

  • Algebra

30

σ

  • For continuous set :
  • A. The associated sigma algebras are the Borel sets over , i.e., the collection
  • f all open sets over omega that can be generated via countable unions,

countable intersections, and complement of open sets

I = [p, q), p, q ∈ R T = [α, β) ⊆ [p, q)

Fixed half-interval Collection of all half-intervals

Here, is not a -algebra because, generally speaking, neither the union nor the difference of two half-intervals is a half-interval.

T σ

slide-52
SLIDE 52

Realistic Image Synthesis SS2018

  • Algebra

31

σ

It is the mathematical construct that allows defining a measure

slide-53
SLIDE 53

Realistic Image Synthesis SS2018

Measure

32

  • In probability theory, it plays the role of a probability distribution
slide-54
SLIDE 54

Realistic Image Synthesis SS2018

Measure

32

  • In probability theory, it plays the role of a probability distribution
  • A real-valued set function defined on a sigma-algebra that assigns each

subset of a sigma-algebra a non-negative real number.

slide-55
SLIDE 55

Realistic Image Synthesis SS2018

Measure

32

  • In probability theory, it plays the role of a probability distribution
  • A real-valued set function defined on a sigma-algebra that assigns each

subset of a sigma-algebra a non-negative real number.

  • A sigma-additive set function: i.e., the measure of the union of disjoint

sets is equal to the sum of the measures of the individual sets

slide-56
SLIDE 56

Realistic Image Synthesis SS2018

Lebesgue Measure

33

  • Standard way of assigning measure to subsets of n-dimensional

Euclidean space.

slide-57
SLIDE 57

Realistic Image Synthesis SS2018

Lebesgue Measure

33

  • Standard way of assigning measure to subsets of n-dimensional

Euclidean space.

  • For n = 1,2 or 3, it coincides with the standard measure of length, area or

volume, respectively.

Length Area Volume

slide-58
SLIDE 58

Realistic Image Synthesis SS2018

Random Variable

34

  • Central concept in probability theory

σ

slide-59
SLIDE 59

Realistic Image Synthesis SS2018

Random Variable

34

  • Central concept in probability theory
  • Enables to construct a simpler probability space from a rather complex
  • ne

σ

slide-60
SLIDE 60

Realistic Image Synthesis SS2018

Random Variable

34

  • Central concept in probability theory
  • Enables to construct a simpler probability space from a rather complex
  • ne
  • Correspond to a measurable function defined on a -algebra that

assigns each element to a real number

σ

slide-61
SLIDE 61

Realistic Image Synthesis SS2018

Random Variable

35

  • A random variable is a value chosen by some random process

X f X Y = f(X)

slide-62
SLIDE 62

Realistic Image Synthesis SS2018

Random Variable

35

  • A random variable is a value chosen by some random process
  • Random variables are always drawn from a domain: discrete (e.g., a fixed

set of probabilities) or continuous (e.g., real numbers)

X f X Y = f(X)

slide-63
SLIDE 63

Realistic Image Synthesis SS2018

Random Variable

35

  • A random variable is a value chosen by some random process
  • Random variables are always drawn from a domain: discrete (e.g., a fixed

set of probabilities) or continuous (e.g., real numbers)

  • Applying a function to a random variable results in a new random

variable

X f X Y = f(X)

slide-64
SLIDE 64

Realistic Image Synthesis SS2018

Discrete Probability Space

36

slide-65
SLIDE 65

Realistic Image Synthesis SS2018

Discrete Random Variable

37

  • Random variable (RV):
  • Probabilities:

{p1, p2, . . . , pn}

N

X

i=1

pi = 1

X : Ω → E Ω = {x1, x2, . . . , xn}

slide-66
SLIDE 66

Realistic Image Synthesis SS2018

Discrete Random Variable

38

  • Example: Rolling a Die

  • Probability of each event:


pi = 1/6 for i = 1, …, 6

x1 = 1, x2 = 2, x3 = 3, x4 = 4, x5 = 5, x6 = 6

slide-67
SLIDE 67

Realistic Image Synthesis SS2018

Discrete Random Variable

38

  • Example: Rolling a Die

  • Probability of each event:


pi = 1/6 for i = 1, …, 6

x1 = 1, x2 = 2, x3 = 3, x4 = 4, x5 = 5, x6 = 6 P(X = i) = 1 6

slide-68
SLIDE 68

Realistic Image Synthesis SS2018

Discrete Random Variable

39

P(2 ≤ X ≤ 4) =

4

X

i=2

P(X = i)

slide-69
SLIDE 69

Realistic Image Synthesis SS2018

Discrete Random Variable

39

P(2 ≤ X ≤ 4) =

4

X

i=2

P(X = i) =

4

X

i=2

1 6 = 1 2

slide-70
SLIDE 70

Realistic Image Synthesis SS2018

Probability mass function

  • PMF is a function that gives the probability that a discrete

RV is exactly equal to some value.

40

slide-71
SLIDE 71

Realistic Image Synthesis SS2018

Probability mass function

  • PMF is a function that gives the probability that a discrete

RV is exactly equal to some value.

  • PMF is different from PDF (probability density function)

which is for continuous RVs.

40

slide-72
SLIDE 72

Realistic Image Synthesis SS2018

Probability mass function

41

1 6 1 6 1 6 1 6 1 6 1 6

0.4 0.15 0.3 0.05 0.1

Constant PMF Non-uniform PMF

slide-73
SLIDE 73

Realistic Image Synthesis SS2018

Continuous Probability Space

42

slide-74
SLIDE 74

Realistic Image Synthesis SS2018

Continuous Random Variable

43

  • In rendering, discrete random variables are less common than continuous

random variables

ξ

slide-75
SLIDE 75

Realistic Image Synthesis SS2018

Continuous Random Variable

43

  • In rendering, discrete random variables are less common than continuous

random variables

  • Continuous random variables take on values that ranges of continuous

domains (e.g. real numbers or directions on the unit sphere)

ξ

slide-76
SLIDE 76

Realistic Image Synthesis SS2018

Continuous Random Variable

43

  • In rendering, discrete random variables are less common than continuous

random variables

  • Continuous random variables take on values that ranges of continuous

domains (e.g. real numbers or directions on the unit sphere)

  • A particularly important random variable is the canonical uniform random

variable, which we write as ξ

slide-77
SLIDE 77

Realistic Image Synthesis SS2018

Continuous Random Variable

44

1

ξ ∈ [0, 1)

slide-78
SLIDE 78

Realistic Image Synthesis SS2018

Continuous Random Variable

44

1

ξ ∈ [0, 1)

slide-79
SLIDE 79

Realistic Image Synthesis SS2018 45

  • We can take a continuous, uniformly distributed random variable

and map to a discrete random variable, choosing if:

ξ ∈ [0, 1) Xi

Continuous Random Variable

1

slide-80
SLIDE 80

Realistic Image Synthesis SS2018 46

  • We can take a continuous, uniformly distributed random variable

and map to a discrete random variable, choosing if:

ξ ∈ [0, 1) Xi

i−1

X

j=1

pj < ξ ≤

i

X

j=1

pj

Xi = {1, 2, 3, 4, 5, 6}

Continuous Random Variable

1

slide-81
SLIDE 81

Realistic Image Synthesis SS2018

Continuous Random Variable

Image rendered using PBRT

Questions ?

slide-82
SLIDE 82

Realistic Image Synthesis SS2018

Continuous Random Variable

Image rendered using PBRT

Questions ?

slide-83
SLIDE 83

Realistic Image Synthesis SS2018

Continuous Random Variable

Image rendered using PBRT

slide-84
SLIDE 84

Realistic Image Synthesis SS2018

Continuous Random Variable

pi = Φi P

j Φj

Φi

  • For lighting application, we might want to define probability of sampling

illumination from each light source in the scene based on its power Here, the probability is relative to the total power

49

slide-85
SLIDE 85

Realistic Image Synthesis SS2018

Probability Density Functions

50

slide-86
SLIDE 86

Realistic Image Synthesis SS2018

Probability density function

  • Consider a continuous RV that ranges over real numbers: , where

the probability of taking on any particular value is proportional to the value

2

[0, 2) x 2 − x

51

x

slide-87
SLIDE 87

Realistic Image Synthesis SS2018

Probability density function

  • Consider a continuous RV that ranges over real numbers: , where

the probability of taking on any particular value is proportional to the value

2

[0, 2) x 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.

51

x

slide-88
SLIDE 88

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.

52

slide-89
SLIDE 89

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

52

slide-90
SLIDE 90

Realistic Image Synthesis SS2018 53

p(x) = ( 1 x ∈ [0, 1)

  • therwise

For uniform random variables: For non-uniform random variables:

p(x) could be any function

Probability density function

slide-91
SLIDE 91

Realistic Image Synthesis SS2018 54

constant pdf

Uniform distribution Non-uniform distribution

Probability density function

slide-92
SLIDE 92

Realistic Image Synthesis SS2018 54

constant pdf

Uniform distribution Non-uniform distribution

Probability density function

slide-93
SLIDE 93

Realistic Image Synthesis SS2018 55

constant pdf

Uniform distribution Non-uniform distribution

Probability density function

slide-94
SLIDE 94

Realistic Image Synthesis SS2018 55

constant pdf

Uniform distribution Non-uniform distribution

Probability density function

slide-95
SLIDE 95

Realistic Image Synthesis SS2018 56

p(x) > 0

Z ∞

−∞

p(x)dx = 1

Some properties of PDFs:

Probability density function

slide-96
SLIDE 96

Realistic Image Synthesis SS2018 57

Z b

a

p(x)dx = 1 x ∈ [a, b)

constant pdf

b a

Probability density function

slide-97
SLIDE 97

Realistic Image Synthesis SS2018 58

Z b

a

p(x)dx = 1 x ∈ [a, b)

constant pdf

b a

p(x) = C C

Probability density function

slide-98
SLIDE 98

Realistic Image Synthesis SS2018 58

Z b

a

p(x)dx = 1 x ∈ [a, b)

constant pdf

b a

Z b

a

C dx = 1

p(x) = C C

Probability density function

slide-99
SLIDE 99

Realistic Image Synthesis SS2018 58

Z b

a

p(x)dx = 1 x ∈ [a, b)

constant pdf

b a

Z b

a

C dx = 1

C Z b

a

dx = 1 p(x) = C C

Probability density function

slide-100
SLIDE 100

Realistic Image Synthesis SS2018 58

Z b

a

p(x)dx = 1 x ∈ [a, b)

constant pdf

b a

Z b

a

C dx = 1

C Z b

a

dx = 1 C(b − a) = 1 p(x) = C C

Probability density function

slide-101
SLIDE 101

Realistic Image Synthesis SS2018 58

Z b

a

p(x)dx = 1 x ∈ [a, b)

constant pdf

b a

Z b

a

C dx = 1

C Z b

a

dx = 1 C(b − a) = 1 p(x) = C C C = 1 b − a

Probability density function

slide-102
SLIDE 102

Realistic Image Synthesis SS2018 59

x ∈ [a, b)

constant pdf

b a

Z b

a

p(x)dx = 1

Z b

a

C dx = 1

C Z b

a

dx = 1 C(b − a) = 1 p(x) = 1 b − a p(x) = C C

Probability density function

C = 1 b − a

slide-103
SLIDE 103

Realistic Image Synthesis SS2018 60

Cumulative distribution function

  • The PDF is the derivative of the random variable's CDF:

p(x)

slide-104
SLIDE 104

Realistic Image Synthesis SS2018 61

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) , also called cumulative density function

P(x)

slide-105
SLIDE 105

Realistic Image Synthesis SS2018 62

Cumulative distribution function

  • The PDF is the derivative of the random variable's CDF:

p(x) p(x) = dP(x) dx P(x) P(x) = Z x

−∞

p(x)dx

: cumulative distribution function (CDF) , also called cumulative density function

slide-106
SLIDE 106

Realistic Image Synthesis SS2018 63

1

Cumulative distribution function

P(x) = Z x

−∞

p(x)dx p(x) = ( 1 x ∈ [0, 1)

  • therwise

constant pdf

slide-107
SLIDE 107

Realistic Image Synthesis SS2018 63

1

Cumulative distribution function

P(x) = Z x

−∞

p(x)dx p(x) = ( 1 x ∈ [0, 1)

  • therwise

constant pdf

slide-108
SLIDE 108

Realistic Image Synthesis SS2018 64

Non-constant pdf

1

Cumulative distribution function

p(x) P(x) = Z x

−∞

p(x)dx

slide-109
SLIDE 109

Realistic Image Synthesis SS2018 64

Non-constant pdf

1

Cumulative distribution function

p(x) P(x) = Z x

−∞

p(x)dx

slide-110
SLIDE 110

Realistic Image Synthesis SS2018

Questions ?

65

Image rendered using PBRT

slide-111
SLIDE 111

Realistic Image Synthesis SS2018

Questions ?

65

Image rendered using PBRT

slide-112
SLIDE 112

Realistic Image Synthesis SS2018 66

Probability: Integral of PDF

P(x ∈ [a, b]) = Z b

a

p(x)dx

  • Given the arbitrary interval in the domain, integrating the PDF gives

the probability that a RV lies inside that interval:

[a, b] p(x)

a b

slide-113
SLIDE 113

Realistic Image Synthesis SS2018 66

Probability: Integral of PDF

P(x ∈ [a, b]) = Z b

a

p(x)dx

  • Given the arbitrary interval in the domain, integrating the PDF gives

the probability that a RV lies inside that interval:

[a, b] p(x)

a b

slide-114
SLIDE 114

Realistic Image Synthesis SS2018

Examples: Sampling PDFs

67

slide-115
SLIDE 115

Realistic Image Synthesis SS2018

Constant Sampling PDFs

68

Random 2D

1 1

Jittered 2D

1 1

slide-116
SLIDE 116

Realistic Image Synthesis SS2018

Constant Sampling PDFs

68

Random 2D

1 1

Jittered 2D

1 1

slide-117
SLIDE 117

Realistic Image Synthesis SS2018

Constant Sampling PDFs

68

Random 2D

1 1

Jittered 2D

1 1

slide-118
SLIDE 118

Realistic Image Synthesis SS2018 69

Sampling a unit domain with uniform random samples

1

ξ ∈ [0, 1)

Random 1D

Constant Sampling PDFs

slide-119
SLIDE 119

Realistic Image Synthesis SS2018 69

Sampling a unit domain with uniform random samples

1

ξ ∈ [0, 1)

Random 1D

Constant Sampling PDFs

slide-120
SLIDE 120

Realistic Image Synthesis SS2018 70

Sampling a unit domain with uniform random samples

Random 1D

Constant Sampling PDFs

1

ξ ∈ [0, 1)

Random 1D

slide-121
SLIDE 121

Realistic Image Synthesis SS2018 71

Sampling a unit domain with uniform random samples

p(x) = ( C x ∈ [0, 1)

  • therwise

1

ξ ∈ [0, 1)

Random 1D

Constant Sampling PDFs

slide-122
SLIDE 122

Realistic Image Synthesis SS2018 72

Sampling each stratum with uniform random samples

1

Jittered 1D

Constant Sampling PDFs

slide-123
SLIDE 123

Realistic Image Synthesis SS2018 72

Sampling each stratum with uniform random samples

1

Jittered 1D

Constant Sampling PDFs

slide-124
SLIDE 124

Realistic Image Synthesis SS2018 73

Sampling each stratum with uniform random samples

1

Jittered 1D

∆ = 1 N

Constant Sampling PDFs

slide-125
SLIDE 125

Realistic Image Synthesis SS2018 73

Sampling each stratum with uniform random samples

1

Jittered 1D

∆ = 1 N

Constant Sampling PDFs

slide-126
SLIDE 126

Realistic Image Synthesis SS2018 74

Sampling each stratum with uniform random samples

1

Jittered 1D

∆ = 1 N

i

Constant Sampling PDFs

p(xi) = ???

Probability density of generating a sample in an -th stratum is given by:

i

slide-127
SLIDE 127

Realistic Image Synthesis SS2018 75

Constant Sampling PDFs

1

Jittered 1D

∆ = 1 N

Probability density of generating a sample in an -th stratum is given by:

i i

Sampling each stratum with uniform random samples

p(xi) = ( N x ∈ [ i

N , i+1 N )

  • therwise
slide-128
SLIDE 128

Realistic Image Synthesis SS2018 76

1

Jittered 1D

∆ = 1 N

i

Joint PDFs

First, we divide the domain into equal strata.

slide-129
SLIDE 129

Realistic Image Synthesis SS2018 76

1

Jittered 1D

∆ = 1 N

i

Joint PDFs

First, we divide the domain into equal strata. Second, we sample the domain.

slide-130
SLIDE 130

Realistic Image Synthesis SS2018 76

1

Jittered 1D

∆ = 1 N

i

Joint PDFs

First, we divide the domain into equal strata. Second, we sample the domain. This implies that two samples are correlated to each other.

slide-131
SLIDE 131

Realistic Image Synthesis SS2018 77

1

Jittered 1D

∆ = 1 N

i

Joint PDFs

p(xi, xj) = ???

what is the joint PDF for jittered sampling ?

i j

For two different strata and

,

First, we divide the domain into equal strata. Second, we sample the domain. This implies that two samples are correlated to each other.

slide-132
SLIDE 132

Realistic Image Synthesis SS2018

Conditional and Marginal PDFs

78

slide-133
SLIDE 133

Realistic Image Synthesis SS2018

Joint PDF

For two random variables and , the joint PDF is given by:

79

X1 X2 p(x1, x2)

slide-134
SLIDE 134

Realistic Image Synthesis SS2018

Joint PDF

For two random variables and , the joint PDF is given by:

80

X1 X2 p(x1, x2) p(x1, x2) = p(x2|x1)p(x1)

slide-135
SLIDE 135

Realistic Image Synthesis SS2018

Joint PDF

For two random variables and , the joint PDF is given by:

81

X1 X2 X1 = x1 X2 = x2 p(x1, x2) p(x1, x2) = p(x2|x1)p(x1)

where,

p(x2|x1) p(x1)

: conditional density function : marginal density function

slide-136
SLIDE 136

Realistic Image Synthesis SS2018

Joint PDF

For two random variables and , the joint PDF is given by:

82

X1 X2 X1 = x1 X2 = x2 p(x1, x2) p(x1, x2) = p(x2|x1)p(x1)

where,

p(x2|x1) p(x1)

: conditional density function : marginal density function

slide-137
SLIDE 137

Realistic Image Synthesis SS2018

Joint PDF

For two random variables and , the joint PDF is given by:

83

X1 X2 X1 = x1 X2 = x2 p(x1, x2) p(x1, x2) = p(x1|x2)p(x2)

where,

p(x1|x2) p(x2)

: conditional density function : marginal density function

slide-138
SLIDE 138

Realistic Image Synthesis SS2018

Marginal PDF

84

p(x1) = Z

R

p(x1, x2)dx2 p(x2) = Z

R

p(x1, x2)dx1

We integrate out one of the variable.

slide-139
SLIDE 139

Realistic Image Synthesis SS2018

Conditional PDF

85

p(x1|x2) = p(x1, x2) p(x2) p(x2|x1) = p(x1, x2) p(x1)

The conditional density function is the density function for given that some particular has been chosen.

xi xj

slide-140
SLIDE 140

Realistic Image Synthesis SS2018

Conditional PDF

86

If both and are independent then:

p(x1|x2) = p(x1) p(x2|x1) = p(x2) x1 x2

slide-141
SLIDE 141

Realistic Image Synthesis SS2018

Conditional PDF

87

If both and are independent then:

p(x1|x2) = p(x1) p(x2|x1) = p(x2) x1 x2 p(x1, x2) = p(x1)p(x2)

That gives:

slide-142
SLIDE 142

Realistic Image Synthesis SS2018 88

1

Joint PDF of Jittered 1D Sampling

p(xi, xj) = ???

what is the joint PDF for jittered sampling ?

i j

For two different strata and

,

i

j

slide-143
SLIDE 143

Realistic Image Synthesis SS2018 89

1

Joint PDF of Jittered 1D Sampling

p(x1, x2) = p(x1|x2)p(x2) i

j

slide-144
SLIDE 144

Realistic Image Synthesis SS2018 90

1

Joint PDF of Jittered 1D Sampling

p(x1, x2) = p(x1|x2)p(x2) p(x1, x2) = p(x1)p(x2) i

j

slide-145
SLIDE 145

Realistic Image Synthesis SS2018 91

1

Joint PDF of Jittered 1D Sampling

p(xi, xj) = ( p(xi)p(xj) i 6= j

  • therwise

i

j

slide-146
SLIDE 146

Realistic Image Synthesis SS2018 92

1

Joint PDF of Jittered 1D Sampling

p(xi, xj) = ( p(xi)p(xj) i 6= j

  • therwise

p(xi, xj) = ( N 2 i 6= j

  • therwise

p(xi) = N

Since,

i

j

slide-147
SLIDE 147

Realistic Image Synthesis SS2018 93

Questions ?

Image rendered using PBRT

slide-148
SLIDE 148

Realistic Image Synthesis SS2018 93

Questions ?

Image rendered using PBRT

slide-149
SLIDE 149

Realistic Image Synthesis SS2018

Expected Value

94

slide-150
SLIDE 150

Realistic Image Synthesis SS2018

Expected value

95

  • Expected value: average value of the variable
  • 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

E[X] =

N

X

i=1

xipi

slide-151
SLIDE 151

Realistic Image Synthesis SS2018

Expected value

96

  • Expected value: average value of the variable
  • 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

E[X] =

N

X

i=1

xipi

slide-152
SLIDE 152

Realistic Image Synthesis SS2018

Expected value

97

  • Properties:

E[X + Y ] = E[X] + E[Y ] E[X + c] = E[X] + c E[cX] = cE[X]

slide-153
SLIDE 153

Realistic Image Synthesis SS2018

Expected value

98

  • Properties:

E[X + Y ] = E[X] + E[Y ] E[X + c] = E[X] + c E[cX] = cE[X]

slide-154
SLIDE 154

Realistic Image Synthesis SS2018

Expected value

99

  • Properties:

E[X + Y ] = E[X] + E[Y ] E[X + c] = E[X] + c E[cX] = cE[X]

slide-155
SLIDE 155

Realistic Image Synthesis SS2018

Estimating expected values

  • To estimate the expected value of a variable

100

slide-156
SLIDE 156

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

100

slide-157
SLIDE 157

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

100

slide-158
SLIDE 158

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

100

E[X] ≈ 1 N

N

X

i=1

xi

slide-159
SLIDE 159

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
  • example: rolling a die

100

E[X] ≈ 1 N

N

X

i=1

xi

slide-160
SLIDE 160

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
  • example: rolling a die
  • roll 3 times: {3, 1, 6} → E[x] ≈ (3 + 1 + 6)/3 = 3.33

100

E[X] ≈ 1 N

N

X

i=1

xi

slide-161
SLIDE 161

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
  • 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

E[X] ≈ 1 N

N

X

i=1

xi

slide-162
SLIDE 162

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
  • 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

101

E[X] ≈ 1 N

N

X

i=1

xi

slide-163
SLIDE 163

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
  • 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

102

E[X] ≈ 1 N

N

X

i=1

xi

slide-164
SLIDE 164

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
  • 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

103

E[X] ≈ 1 N

N

X

i=1

xi

slide-165
SLIDE 165

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
  • 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

104

E[X] ≈ 1 N

N

X

i=1

xi

slide-166
SLIDE 166

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
  • 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

105

E[X] ≈ 1 N

N

X

i=1

xi

slide-167
SLIDE 167

Realistic Image Synthesis SS2018

Law of large numbers

  • By taking infinitely many samples, the error between the

estimate and the expected value is statistically zero

  • the estimate will converge to the right value

106

slide-168
SLIDE 168

Realistic Image Synthesis SS2018

Variance

107

slide-169
SLIDE 169

Realistic Image Synthesis SS2018

Variance

108

  • Variance: how much different from the average

σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2

slide-170
SLIDE 170

Realistic Image Synthesis SS2018

Variance

109

  • Variance: how much different from the average

σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2

slide-171
SLIDE 171

Realistic Image Synthesis SS2018

Variance

110

  • Variance: how much different from the average

σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2

slide-172
SLIDE 172

Realistic Image Synthesis SS2018

Variance

111

  • Variance: how much different from the average

σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2

slide-173
SLIDE 173

Realistic Image Synthesis SS2018

Variance

112

  • Variance: how much different from the average

σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2

slide-174
SLIDE 174

Realistic Image Synthesis SS2018

Variance

113

  • Variance: how much different from the average

σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2

slide-175
SLIDE 175

Realistic Image Synthesis SS2018

Variance

113

  • Variance: how much different from the average

σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2

σ2[X] = E[X2] − E[X]2

slide-176
SLIDE 176

Realistic Image Synthesis SS2018

Variance

114

  • example: Rolling a die
  • variance:

σ2[X] = . . . = 2.917

E[X] = 1 · 1 6 + 2 · 1 6 + 3 · 1 6 + 4 · 1 6 + 5 · 1 6 + 6 · 1 6 = 3.5

slide-177
SLIDE 177

Realistic Image Synthesis SS2018

Variance

114

  • example: Rolling a die
  • variance:

σ2[X] = . . . = 2.917

σ2[X] = E[X2] − E[X]2 E[X] = 1 · 1 6 + 2 · 1 6 + 3 · 1 6 + 4 · 1 6 + 5 · 1 6 + 6 · 1 6 = 3.5

slide-178
SLIDE 178

Realistic Image Synthesis SS2018

Variance

115

  • example: Rolling a die
  • variance:

σ2[X] = . . . = 2.917

σ2[X] = E[X2] − E[X]2 E[X] = 1 · 1 6 + 2 · 1 6 + 3 · 1 6 + 4 · 1 6 + 5 · 1 6 + 6 · 1 6 = 3.5

slide-179
SLIDE 179

Realistic Image Synthesis SS2018

Variance

116

  • example: Rolling a die
  • variance:

σ2[X] = . . . = 2.917

σ2[X] = E[X2] − E[X]2

slide-180
SLIDE 180

Realistic Image Synthesis SS2018

Monte Carlo Integration

117

I = Z

D

f(x) dx Z

Slide after Wojciech Jarosz

slide-181
SLIDE 181

Realistic Image Synthesis SS2018

Monte Carlo Integration

117

I = Z

D

f(x) dx Z

Slide after Wojciech Jarosz

slide-182
SLIDE 182

Realistic Image Synthesis SS2018

Monte Carlo Integration

117

I = Z

D

f(x) dx Z

Slide after Wojciech Jarosz

slide-183
SLIDE 183

Image rendered using PBRT