In order to derive the rules of probability, consider the slightly more general example shown in Figure 1.10 involving two random variables X and Y (which could for instance be the Box and Fruit variables considered above). We shall suppose that X can take any of the values xi where i =1,...,M, and Y can take the values yj where j =1,...,L. Consider a total of N trials in which we sample both of the variables X and Y , and let the number of such trials in which X = xi and Y = yj be nij. Also, let the number of trials in which X takes the value xi (irrespective of the value that Y takes) be denoted by ci, and similarly let the number of trials in which Y takes the value yj be denoted by rj.
為了引出概率的規(guī)則,假設(shè)一個更一般化的例子罩缴,如圖1.10,有兩個隨機變量X和Y节吮。我們會假設(shè)X可以取任何的xi,其中i=1,...,M,捞烟;Y能取任何yj吠卷,其中j=1,...,L.假設(shè)進行了N次試驗,其中我們抽樣兩個隨機變量X和Y岛心,讓X=xi并且Y=yj的次數(shù)是nij来破。并且,X是xi的次數(shù)忘古,記為ci徘禁,類似,Y=yj的次數(shù)髓堪,記為rj送朱。
The probability that X will take the value xi and Y will take the value yj is written p(X = xi, Y = yj ) and is called the joint probability of X = xi and
X取Y取得概率記作p(X= Y=),即叫做X=Y=的聯(lián)合概率干旁。
Y = yj . It is given by the number of points falling in the cell i,j as a fraction of the total number of points, and hence
它就是落在i,j空格里的點的個數(shù)和所有點總數(shù)的比率驶沼。因此有
Here we are implicitly considering the limit N → ∞. Similarly, the probability that X takes the value xi irrespective of the value of Y is written as p(X = ) and is? given by the fraction of the total number of points that fall in column i, so that Because the number of instances in column i in Figure 1.10 is just the sum of the number of instances in each cell of that column, we have ci =
? j nij and therefore,
在這里我們考慮N趨于無群大,相似的疤孕,不管Y取什么商乎,p(X=)的概率是落入i列,即c i= n ij祭阀,因此
from (1.5) and (1.6), we have
結(jié)合公式1.5和1.6鹉戚,我們有
which is the sum rule of probability. Note that p(X = xi) is sometimes called the marginal probability, because it is obtained by marginalizing, or summing out, the other variables (in this case Y ). If we consider only those instances for which X = xi, then the fraction of such instances for which Y = yj is written p(Y = yj |X = xi) and is called the conditional probability of Y = yj given X = xi. It is obtained by finding the fraction of those points in column i that fall in cell i,j and hence is given by
這就是概率的加法規(guī)則。注意P(X=xi)有時也叫做邊際概率专控,因為它是通過邊緣化或者加和了其他變量得到的抹凳,如果我們考慮僅當(dāng)X=xi時的情況,那在這種情況下Y=yj的部分伦腐,記作當(dāng)X=xi時赢底,Y=yj的條件概率。它是在i列中落在空格ij的部分柏蘑,公式如下
From (1.5), (1.6), and (1.8), we can then derive the following relationship
結(jié)合1.5 1.6和1.8幸冻,我們能推到出下面的關(guān)系,
which is the product rule of probability.
這是概率的乘法規(guī)則咳焚。