1. 程式人生 > >PBRT_V2 總結記錄 Expected Value of the Function of a Random Variable

PBRT_V2 總結記錄 Expected Value of the Function of a Random Variable

The Function of a Random Variable

 

F(X) is a transformed version of X. You should not assume that F(X) will have the same probability distribution function than X.

In other words, the mapping or transform of X, leads to another probability distribution function. Keep in mind these two important

ideas:

  • if X is a random variable, any function of X, F(X), will also be random.
  • X and F(X) have unique(各自) probability distribution (unless F(X) = X of course).

 

(F(X) 是 隨機變數X的一個函式,但是F(X) 的概率分佈 和 X的概率分佈 並不一樣的,有各自的概率分佈)

 

 

Example:

we know that in the case of a uniformly distributed random variable with possible outcome {1, 2, 3, 4, 5, 6}, the probability of each outcome is 1/6. If the function F(X) is defined as (X - 3) ^ 2, Let's compute the probability distribution of F(X).

F(X) = (X - 3)^2

As you can see in the table above, computing F(X) for each outcome in X, results in one zero, two ones, two fours and one nine. The probability of an outcome Y from F(X) is equal to the sum of the probability of any of the X for which F(X) = Y. Thus we get:

Now, if we wish to compute the expected

(期望值)value of F(X) we can proceed(開始) in two ways. If we know the probability distribution of F(X) we can write (method 1):

(上面是 先 利用 隨機變數 X 來計算 F(X) 的 概率分佈,從而計算F(X)的數學期望)

 

Mathematically, if we call Y the random variable F(X)

Or if you don't know the probability distribution of F(X), you can still use your knowledge of the probability distribution of X to

calculate E[Y] (method 2):

Mathematically we would write this result as:

This in an important result because, in practice, you don't necessarily know the probability distribution of F(X). Of

course you can calculate it, but this is an extra(額外) step, which you can avoid if you use the second method.

Mathematically, this result can be written as:

for a discrete random variable

 

for continuous random variables

 

Keep in mind that the beauty of the method is that it is not necessary to know the probability distribution of F(X) to

compute its expected value, as long as you know the probability distribution of X.

(上面計算 F(X)的數學期望,是使用X的概率分佈,不需要去計算 F(X)的概率分佈)