1. 程式人生 > >PBRT_V2 總結記錄 Random Variables and Probability Mass Function

PBRT_V2 總結記錄 Random Variables and Probability Mass Function

參考 : https://www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/monte-carlo-methods-mathematical-foundations

 

Random Variables

we have to stick to(堅持) random variable however always keep in mind that a random variable is not a fixed value, but a function, mapping or associating(關聯) a unique numerical value(一個唯一的數值) to each possible outcome of a random process which is not necessarily a number ("tails", "heads"). A random variable is a function X(e) that maps the set of experiment outcomes to the  set of numbers.

More generally, we can say that if the outcome of some process must be one of n different outcomes, and if these n outcomes are  equally likely to occur, then the probability of each outcome is  1/n.

In others words, X provides information on the value associated to an outcome of a random process and a value for the

probability of that outcome to occur.

A random variable is some sort of function mapping outcomes to real values but also how probabilities are associated to these

outcomes.

(隨機變數 並不是一個固定的值,而是一個函式,這個函式 把 一個唯一的數字與 試驗輸出的結果 進行關聯,而且,這個隨機變數會提供 這個 輸出結果的  概率)

 

 

Probability Mass Function

Plot(繪圖) these probability values vs. the possible outcome values. In statistics(統計學), this is what we call a probability distribution.

 

Let's study an example of such distribution. Remember the experiment(試驗) we described in the previous chapter in which we

had 10 cards(卡片), of which 3 were labelled with number 0, 5 were labelled with number 1 and 2 were labelled with number 2.

If you place these cards in a box, shake(搖動) the box, etc. you will (hopefully) agree that each card in the box is equally likely

to be randomly picked up. If we consider the sample sample as being S={0,0,0,1,1,1,1,1,2,2}(the order in this set doesn't

matter, the numbers could be presented in a completely different order), then each outcome in this set has the associated

probability 1/10.

 

Hopefully with this example, you start to get the meaning(理解) of this function. It really(實際上) defines or describes a

distribution of  probabilities across the sample space of an experiment. When applied to discrete random variables, this

function is called  a probability mass function (or pmf). Here is finally a more format definition of a probability distribution.

 

probabilities distribution  :是一個函式,是一個實驗的 結果的 概率分佈 函式,如果是關於離散隨機變數的概率分佈函式的話,就叫做 pmf,probability mass function