close

隨機變數 - Random variable

 

在多數涉及到機率的應用問題中, 通常我們只關心某一個或少數幾個特定方面實驗的結果. 譬如說當我們擲一雙骰子, 通常我們有興趣的只有點數的總和, 而不是個別的點數; 又譬如說當我們取樣量產的燈泡時, 我們關心的是燈泡耐久力或是亮度而不是它們的價格. 當我們隨機訪問一對已婚的夫婦, 我們有興趣的是他們的年收入總和, 而不是他們結婚幾年或是他們的總資產. 在這些例子中, 我們有興趣的是這些隨機實驗結果關聯的數字, 這些數字便隱含了所謂的 "隨機變數" 這樣的概念. 

 

為了更明確地說明隨機變數這個概念, 讓我們考慮上圖, 它描繪了當我們進行投擲一對骰子, 這個實驗的樣本空間. 假設每一個可能的結果其機率都是 1/36. 值得注意的是, 上圖中每一個點的右上方, 聯結了一個數字, 譬如數字 2聯結到 (1, 1) 這個點, 數字 6 到 (1, 5) , 數字 8 到點 (6, 2) , 11 到點 (5, 6) , ... 等等. 很明顯地我們把一個隨機變數關聯到每一個點, 換言之就是擲一對骰子的點數和. 因為, "關聯一個樣本空間裡的每一個元素到一個數字", 這個句子是 "定義一個函數涵蓋一個樣本空間裡面的所有元素" 的另一個說法, 所以讓我們作以下的定義: 

 

Definition: 

假如 S是一個用機率測量的樣本空間, X是一個實數函數定義於樣本空間 S裡的每一個元素, 則
我們稱 X是一個隨機變數. 

 

機率分配 - Probability distributions


繼續前面的例子, 我們列出這樣本空間裡面的所有元素如下: 
 

Elements of sample space Probability
P(X = x)
 x
(1, 1) 1/36 2
(1, 2), (2, 1) 2/36 3
(1, 3), (2, 2), (3,1) 3/36 4
(1, 4), (2, 3), (3 ,2), (4, 1) 4/36 5
(1, 5), (2, 4), (3, 3), (4, 2), (5, 1) 5/36 6
(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1) 6/36 7
(2, 6), (3, 5), (4, 4), (5, 3), (6, 2) 5/36 8
(3, 6), (4, 5), (5, 4), (6, 3)  4/36 9
(4, 6), (5, 5), (6, 4) 3/36 10
(5, 6), (6, 5) 2/36 11
(6,6) 1/36 12

 

我們觀察到隨機變數 X = 9 時, 所形成的樣本空間 S的子集合如下: 

{ (6, 3), (5, 4), (4, 5), (3, 6) } . 

它的機率我們表示如下: P(X = 9) = 4/36

 

因此 X= 9 被解譯為樣本空間 S裡面子集合, 其點數總和為 9.
更一般化來說, X = x 表示, 樣本空間 S裡面子集合, 其點數總和為 x ;  f(x) 是函數在 x 這一點的值. 我們把這一個例子畫成機率分佈圖如下: 值得注意的是藍色長條形的寬度是 1, 藍色圖的面積等於 1. 

 

在這個例子

        6 - |x - 7|
f(x) = ________________  
            36            for x = 2, 3, ..., 12

 

Definition: 

假如 X是一個離散的隨機變數, 對於每一個 x在 X範圍內, 函數 f在 x這一點, f(x) = P(X=x),
則函數 f 我們稱它為 X 的機率分配. 

 

一個函數能成為隨機變數 X 的機率分配, 假如, 並且只有這個假如, 隨機變數 X 在 x 的值, 
f(x), 滿足下列的條件: 

1. f(x) ≧ 0, 對於每一個 x在函數的定義域. 

2. ∑ f(x) = 1, 在 X範圍內的所有 x, 它們的機率總和是 1. 
   x

 

Example:  Find a formula for the probability distribution of the total number of heads obtained in four tosses of a balanced coin? 

 

Solution: 
H: head
T: tail

Elements of sample space Probability  x
HHHH 1/16 4
HHHT, HHTH, HTHH, THHH 4/16 3
HHTT, HTHT, HTTH, THHT, THTH, TTHH 6/16 2
HTTT, THTT, TTHT, TTTH 4/16 1
TTTT 1/16 0


 

P(X = 0) = 1/16
P(X = 1) = 4/16
P(X = 2) = 6/16
P(X = 3) = 4/16
P(X = 4) = 1/16

Observing that the numerators of these five fractions, 1, 4, 6, 4, 1, are
                           4    4    4    4         4
the binomial coefficients C  , C  , C  , C  , and C
                           0    1    2    3         4
         C(4, x)
f(x) = _________ 
         16          for x = 0, 1, 2, 3, 4.

 

Example:  Check whether the function given by the following, 

        x + 2
f(x) = _________ 
         25          for x = 1, 2, 3, 4, 5,

can serve as the probability distribution of a discrete random variable. 

 

Solution: 

f(1) = 3/25
f(2) = 4/25
f(3) = 5/25
f(4) = 6/25
f(5) = 7/25

Since these values are all nonnegative and f(1)+ f(2)+ f(3)+ f(4)+ f(5) = 1. 
Thus the given function can serve as the probability distribution of a random 
variable have the range {1, 2, 3, 4, 5}. 

 

累積分配函數 - Distribution function

 

很多時候, 我們有興趣的是一個隨機變數小於或等於某個實數的機率. 我們用 F(x) = P(X ≦ x) 來表示一個隨機變數 X 的累積分配函數. 累積分佈函數 (Cumulative distribution function) , 又叫分佈函數 (Distribution function) , 是機率密度函數的積分, 能完整描述一個實隨機變數X的機率分佈. 一般以大寫「CDF」標記. 

 

假如 X 是一個離散的隨機變數, 函數 F(x) 表示如下: 

F(x) = P(X ≦ x) =  ∑  f(t)      for -∞ < x < ∞
                   t≦k

其中 f(t) 是 X 在 t這一點的機率分配值, 則我們稱 F(x) 叫做 
X的分配函數 (Distribution function) 或 X 的累積分配 (Cumulative distribution)

 

一個離散型隨機變數 X的累積分配函數之值滿足下列條件: 

1. F(-∞) = 0 and F(∞) = 1;
2. 假如 (a < b), 則對於任意實數 a, b, F(a) ≦ F(b) . 

 

Example:  Find the distribution function of the total number of heads obtained in four tosses of a balanced coin. 
 

Solution: 

f(0) = 1/16
f(1) = 4/16
f(2) = 6/16
f(3) = 4/16
f(4) = 1/16

F(0) = f(0) = 1/16
F(1) = f(0) + f(1) = 5/16
F(2) = f(0) + f(1) + f(2) = 11/16
F(3) = f(0) + f(1) + f(2) + f(3) = 15/16
F(4) = 1

Hence, the distribution function is given by

F(x) =   0,           for x < 0, 
         1/16,        for 0 ≦ x < 1, 
         5/16,        for 1 ≦ x < 2, 
         11/16,       for 3 ≦ x < 3, 
         15/16,       for 3 ≦ x < 4, 
         1,           elsewhere


 

 

連續的隨機變數 - Continuous random variables

 

連續型隨機變數是指即在一定區間內變數取值有無限個, 或數值無法一一列舉出來. 舉個例子: 

假設我們關心 200公里長的高速公路將會發生車禍的機率 p, 我們有興趣的是在這 200公里裡面某一個位置或是某一段距離發生車禍的機率. 這隨機實驗的樣本空間將包含從 0到 200公里間連續的點. 我們將假設在這 200公里裡面某一區間長度 d, 則這一段區間 d 會發生車禍的機率是 (d/200) * p. 表示如下: 

P(X = d) = (d/200) *p , 

隨機變數 X 定義域範圍將是 1~200這個區間內的實數. 
 

再舉一個例子, 假設我們關切一個瓶裝飲料產品裡面的飲料量, 這瓶裝飲料在生產線上注入 16盎司的飲料. 很明顯的每一瓶飲料的量會有些許的差異,

16.0328885336373
15.846240903126
16.0206487022137
15.8678713820372
16.0717630659227
16.0221448529943
16.1654404217876
16.0623311065541
15.9482009683825
15.8807058348855
.

, 事實上這是一個連續的隨機變數. 假如上面這些數字取小數點以下 1位四捨五入, 機率分佈 (長條圖) 看起來會是這樣, 

取小數點以下 2位四捨五入, 機率分佈 (長條圖) 看起來會是,


...
取小數點以下 12位四捨五入, 機率分佈會接近一個平滑的曲線. 

 

機率密度函數 - Probability density function

 

事實上, 在連續型的例子看機率的定義, 它假定對於每一個隨機變數, 存在一個函數, 叫做 "機率密度函數 (probability density function) " . 在 X軸區間裡, 曲線以下的面積聯結到相對應的機率. 

 

Definition: 

函數 f(x) 定義於實數集合之上, 若且為若 (if and only if) , 

                  b
P(a ≦ X ≦ b) = ∫   f(x) * dx 
                  a                對於任意實數常數 a, b, a ≦ b. 

則我們稱 f(x)為連續隨機變數 X的機率密度函數 (Probability density function). 

 

函數 f(x)能成為連續型隨機變數 X的機率密度函數, 只有在 f(x) 滿足下列條件: 

1. f(x) ≧ 0          對於 -∞ < x < ∞

    ∞
2. ∫  f(x) * dx = 1
   -∞

 

假如 X是一個連續型隨機變數, a, b是實數且 a ≦ b, 則

P(a ≦ X ≦ b) = P(a ≦ X < b) = P(a < X ≦ b) = P(a < X < b)

 

假如 X是一個連續型隨機變數, f(x) 是這個連續型隨機變數的機率密度函數, a, b是實數
且 a ≦ b, 則

                  b
P(a ≦ X ≦ b) = ∫  f(x) * dx
                  a
當 b→a
                b
P(X = a) = lim ∫  f(x) * dx = 0
           b→a  a

 

Example:  假如隨機變數 X, 它的機率密度函數如下: 

         k * e-3*x       for x > 0
f(x) = {
         0              for x ≦ 0

(1). 請找出 k的值為何? 

(2). 求隨機變數 0.5 ≦ X ≦1 的機率. 

 

Solution: 

(1). 
      ∞              ∞      
     ∫  f(x) * dx =  ∫  k * e-3*x * dx
     -∞              0
                                     | t
                              e-3*x   | 
                 = k * lim   _______ |
                       t->∞    -3    | 0 
                    k
                 = ___ = 1
                    3
    =>
    k = 3
(2). 
                         1                  
     P(0.5 ≦ X ≦ 1) = ∫    3 * e-3*x * dx
                         0                

     = -e-3 + e-1.5 ≈ 0.173343092

     如下表黃色區域之總和. 

 

x f(x)     interval (b, a) P(a ≦ x < b)
0.0 0   0.1~0.0 0.259181779
0.1 2.222454662   0.2~0.1 0.192006585
0.2 1.646434908   0.3~0.2 0.142241976
0.3 1.219708979   0.4~0.3 0.105375448
0.4 0.903582636   0.5~0.4 0.078064052
0.5 0.66939048   0.6~0.5 0.057831272
0.6 0.495896665   0.7~0.6 0.04284246
0.7 0.367369285   0.8~0.7 0.031738475
0.8 0.27215386   0.9~0.8 0.023512441
0.9 0.201616538   1.0~0.9 0.017418444
1.0 0.149361205   1.1~1.0 0.012903901
1.1 0.110649502   1.2~1.1 0.009559445
1.2 0.081971167   1.3~1.2 0.007081811
1.3 0.060725734   1.4~1.3 0.005246335
1.4 0.04498673   1.5~1.4 0.00388658
1.5 0.03332699   1.6~1.5 0.002879249
1.6 0.024689241   1.7~1.6 0.002133
1.7 0.01829024   1.8~1.7 0.001580166
1.8 0.013549743   1.9~1.8 0.001170615
1.9 0.010037896   2.0~1.9 0.000867213
2.0 0.007436257   2.1~2.0 0.000642447

 

機率密度函數: 

 

機率分配: 

 

 

連續型隨機變數的分配函數 - Distribution function for the continuous random variable

 

很多時候, 我們有興趣的是一個隨機變數小於或等於某個實數的機率. 我們用 F(x) = P(X ≦ x) 來表示一個隨機變數 X 的累積分配函數. 

 

Definition: 

假如 X 是一個連續的隨機變數, 它在 t 的機率密度是 f(t), 則函數

                    x
F(x) = P(X ≦ x) = ∫  f(t) * dt         for -∞ < x < ∞
                   -∞

稱為 X的分配函數或是稱為 X的累積分配. 

 

假如 f(x)以及 F(x) 是隨機變數 X在 x的機率密度函數以及累積分配函數之值, 則

P(a ≦ X ≦ b) = F(b) - F(a)

對於任意實數 a ≦ b 且

        dF(x)
f(x) = _______
         dx

導數存在. 

 

Example:  假如隨機變數 X, 它的機率密度函數如下: 

         3 * e-3*x       for x > 0
f(x) = {
         0              for x ≦ 0

(1). 請找出 X的分配函數? 

(2). 求隨機變數 0.5 ≦ X ≦ 1 的機率. 

 

Solution: 

(1). 
      ∞               x     
     ∫  f(t) * dt =  ∫  3 * e-3*x * dt
     -∞               0

                           | x
                 =  e-3*t   |
                           | 0

                 = 1 - e-3*x

    因為當 x ≦ 0 時, F(x) = 0, 所以我們如下表示

             0                   當 x ≦ 0,
    F(x) = {      
             1 - e-3*x            當 x > 0. 
(2). 

     P(0.5 ≦ X ≦ 1) = F(1) - F(0.5)

                      = (1 - e-3 ) - (1 - e-1.5 )

                      ≈ 0.173343092

 

interval (b, a) P(a ≦ t < b) F(t = b)
0.1~0.0 0.259181779 0.259181779
0.2~0.1 0.192006585 0.451188364
0.3~0.2 0.142241976 0.59343034
0.4~0.3 0.105375448 0.698805788
0.5~0.4 0.078064052 0.77686984
0.6~0.5 0.057831272 0.834701112
0.7~0.6 0.04284246 0.877543572
0.8~0.7 0.031738475 0.909282047
0.9~0.8 0.023512441 0.932794487
1.0~0.9 0.017418444 0.950212932
1.1~1.0 0.012903901 0.963116833
1.2~1.1 0.009559445 0.972676278
1.3~1.2 0.007081811 0.979758089
1.4~1.3 0.005246335 0.985004423
1.5~1.4 0.00388658 0.988891003
1.6~1.5 0.002879249 0.991770253
1.7~1.6 0.002133 0.993903253
1.8~1.7 0.001580166 0.995483419
1.9~1.8 0.001170615 0.996654035
2.0~1.9 0.000867213 0.997521248
2.1~2.0 0.000642447 0.998163695

 

 


雙變量及多變量機率分配 - Bivariate distributions and multivariate distributions

 

本篇文章的開頭我們用了一個例子, 考慮隨機變數 X, 擲一對骰子, 它們的點數總和. 但是如果我們考慮隨機變數 Y擲一對骰子, 它們的點數乘積呢? X與Y是同樣的樣本空間. 貼近生活一點, 考慮一個國小, 我們隨機選 354位學生, 這個學校的校長可能比較關心他們的 I.Q. 然而學校的護士則比較關心他們的體重; 學校的老師則比較關心他們的缺席. 

 

我們先開始討論雙變量機率分配, 之後討論多變量機率分配. 假如 X與 Y是離散型隨機變數, 我們用下面的符號來表示, 隨機變數 X, Y, 分別在 X = x, Y = y  條件下之機率. 

P(X = x, Y = y)

 

Example:  Two caplets are selected at radom from a bottle contauning three asprin, two sedative, and four laxative caplets. If X and Y are, respectively, the numbers of asprin and sedative caplets included among the two caplets drawn from the bottle, find the probabilities associated with all possible pairs of values of X and Y. 

 

Solution: 

Total number of ways is C(9, 2)  = 36.

The possible (x,y) pair are (0,0), (0,1), (1,0), (1,1) (0,2), (2,0) ; 

in case (1,0) is C(3,1) * C(2, 0) * C(4, 1) = 12;

in case (0,0) is C(3,0) * C(2,0) * C(4,2) = 6;
in case (0,1) is C(3,0) * C(2,1) * C(4,1) = 8;
in case (1,1) is C(3,1) * C(2,1) * C(4,0) = 6;
in case (0,2) is C(3,0) * C(2,2) * C(4,0) = 1;
in case (2,0) is C(3,2) * C(2,0) * C(4,0) = 3. 

we obtain the probabilities in the following table:
BasicPermutations-38.png

           C(3, x) * C(2, y) * C(4, 2-x-y)
f(x, y) = ________________________________________
                      C(9, 2)

for x=0,1,2; y=0,1,2; and 0 ≦ (x + y) ≦ 2. 

 

Definition: 

假如 X, Y是離散型隨機變數, 對於每一對分別在樣本空間 X, Y裡面的 x, y常數, 
函數 f(x, y) = P(X = x, Y = y) , 則
我們稱函數 f(x, y) 是 X, Y 的聯合機率分配 (joint probability distribution). 

 

一個雙變量函數能夠成為一對離散隨機變數的聯合機率分配, 若且為若, 只有在這個函數滿足
下列條件: 

1. f(x, y) ≧ 0, 對於每一對分別在樣本空間 X, Y裡面的 x, y常數. 

2. ∑ ∑ f(x, y) = 1
   x y

 

Example:  Determine the value of k for which the function given by

f(x, y) = k * x * y            for x = 1,2,3; y = 1,2,3

can serve as a joint probability distribution. 

 

f(1,1) = k
f(1,2) = 2 * k
f(1,3) = 3 * k
f(2,1) = 2 * k
f(2,2) = 4 * k
f(2,3) = 6 * k
f(3,1) = 3 * k
f(3,2) = 6 * k
f(3,3) = 9 * k

k + 2*k + 3*k + 2*k + 4*k + 6*k + 3*k + 6*k + 9*k = 1

k = 1/36

 

Definition: 

假如 X和 Y是離散隨機變量, 則函數

F(x, y) = P(X ≦ x, Y ≦ y) =  ∑   ∑  f(s, t)
                             s≦x t≦y 
-∞< x < ∞,-∞ < y < ∞

稱為 X和 Y的聯合分佈函數 (joint distribution function), 
或聯合累積分佈 (joint cumulative distribution). 

其中 f(s,t) 是 X和 Y於 (s,t) 的聯合概率分配值. 

 

Example:  Two caplets are selected at radom from a bottle contauning three asprin, two sedative, and four laxative caplets. If X and Y are, respectively, the numbers of asprin and sedative caplets included among the two caplets drawn from the bottle, find the value of the joint distribution function F(x, y) at (1, 1) . 

 

Solution: 

BasicPermutations-38.png

 

F(1, 1) = P(X ≦ 1, Y ≦ 1) = f(0, 0) + f(0, 1) + f(1, 0) + f(1, 1)
        = 1/6 + 2/9 + 1/3 + 1/6
        = 8/9

 

Definition: 

一個雙變量函數, 以 f(x, y) 表示, 定義於 xy平面, 我們稱它為連續隨機變數 
X與 Y的 聯合機率密度函數 (joint probability density function) , 若且為若,

P[(X, Y) ∈  A] = ∫ ∫ f(x, y) * dx * dy            對於 xy平面任意區域 A
                   A

 

一個雙變量函數能成為連續隨機變數 X, Y的聯合機率密度函數, 只有它的值, f(x, y), 
滿足下條件: 

1. f(x, y) ≧ 0            其中, -∞ < x < ∞, -∞ < y < ∞

    ∞   ∞
2. ∫  ∫   f(x, y) * dx * dy = 1
   -∞  -∞

 

Example:  Given the joint probability density function

            3/5 * x * (y + x)      for 0 < x < 1, 0 < y < 2
f(x, y) = { 
            0                      for x ≦ 0 or x ≧ 1, y ≦ 0 or y ≧ 2

of two random variables X and Y, find P[(X, Y) ∈ A], where A is the region 
{(x, y) | 0 < x < 1/2, 1 < y < 2} . 

 

Solution: 

P[(X, Y) ∈ A] = P(0 < X < 1/2, 1 < Y < 2)

                  2  1/2  
               = ∫  ∫    3/5 * x (y + x) * dx * dy
                  1  0   
                                                 | x=1/2
                  2    3 * x2  * y     3 * x3     |
               = ∫  ( ____________ + ________ )  |      * dy
                  1         10          15        |
                                                                   | 2
                  2    3 * y     1               3 * y2      y     |
               = ∫  ( _______ + ____ ) * dy = ( ________ + ____ )  |
                  1      40      40                80       40     | 1

               = 11 / 80

 

Definition: 

定義: 假如 X, Y是連續型隨機變數, 函數表示如下: 
                                y   x
F(x, y) = P( X ≦ x, Y ≦ y) = ∫   ∫   f(s, t) * ds * dt
                               -∞  -∞
-∞ < x < ∞, -∞ < y < ∞

其中 f(s, t) 是 X, Y 在 (s, t) 的聯合機率密度之值, 則 F(x, y) 稱為
X, Y 的聯合分配函數 (joint distribution function). 

 

Example:  If the joint probability density of X and Y is given by

            x + y      for  0< x < 1, 0 < y < 1
f(x, y) = {
            0          elsewhere

find the joint distribution function of these two random variables. 

 

Solution: 

 

If either x < 0 or y < 0, F(x, y) = 0, 

Area I: 
           y  x
F(x, y) = ∫  ∫  (s + t) * ds * dt = 1/2 * x*y * (x + y)
           0  0 
Area II:
           y  1
F(x, y) = ∫  ∫  (s + t) * ds * dt = 1/2 * y * (y + 1)
           0  0
Area III:
           1  x
F(x, y) = ∫  ∫  (s + t) * ds * dt = 1/2 * x * (x + 1)
           0  0 
Area IV:
           1  1
F(x, y) = ∫  ∫  (s + t) * ds * dt = 1
           0  0 
F(x, y) = { 0                    for x ≦ 0 or y ≦ 0
 
            1/2*x*y*(x + y)      for 0 < x < 1, 0 < y < 1

            1/2*y*(y + 1)        for x ≧ 1, 0 < y < 1

            1/2*x*(x + 1)        for 0 < x < 1, y ≧ 1

            1                    elsewhere

 

Example:  Find the joint probability density of the two random variable X and Y whose joint distribution is given by

            (1 - e-x ) * (1 - e-y )      for x > 0 and y > 0
F(x, y) = {
            0                            elsewhere

Also use the joint probability density to determine P(1 < X < 3, 1 < Y < 2).

 

Solution: 

Since partial differential yields

   ∂2             
_______ F(x, y) = e-(x+y) 
 ∂x*∂y

for x > 0 and y > 0 and 0 elsewhere, we find that the joint probability density 
of X and Y is given by

            e-(x+y)          for x > 0 and y > 0
f(x, y) = {
            0               elsewhere

Thus, integration yields

 2  3  -(x+y)               
∫  ∫  e       * dx * dy = (e-1 - e-3 ) * (e-1 - e-2 )
 0  0

                        = e-2 - e-3 - e-4 + e-5

                        ≈ 0.074

for P(1 < X < 3, 1 < Y < 1). 

 

Example:  If the joint probability distribution of three discrete random variables X, Y and Z is given by 

 

f(x, y, z) = (x + y) * z / 63                for x = 1,2 ; y = 1,2,3; z = 1,2

find P(X = 2, Y + Z ≦ 3). 

 

Solution: 

P(X = 2, Y + Z ≦ 3) = f(2, 1, 1) + f(2, 1, 2) + f(2, 2, 2)

                     = 3/63 + 6/63 + 4/63

                        13
                     = ____
                        63

 

Example:  If the trivaiiate probability density of X1, X2, and X3 is given by

 

                  (X1 + X2) * e-X3           for 0 < X1 < 1, 0 < X2 < 1, X3 > 0  
f(X1, X2, X3) = {
                  0                       elsewhere

find P[(X1, X2, X3) ∈ A], where A is the rigion

{(X1, X2, X3)| 0 < X1 < 1/2, 1/2 < X2 < 1, X3 < 1}. 

 

Solution: 

P[(X1, X2, X3) ∈ A] = P(0 < X1 < 1/2, 1/2 < X2 < 1, X3 < 1)

                        1  1    1/2              
                     = ∫  ∫    ∫    (X1 + X2) * e-X3 * dX1*dX2*dX3
                        0  1/2 

                        1  1     1     X2      
                     = ∫  ∫    (___ + ____) * e-X3 * dX2*dX3
                        0  1/2    8     2

                        1   1     
                     = ∫   ___ * e-X3 * dX3
                        0   4

                        1     
                     = ___ * (1 - e-1 ) ≈ 0.158
                        4

 

邊際分配 - Marginal distributions

 

Example:  Two caplets are selected at radom from a bottle contauning three asprin, two sedative, and four laxative caplets. If X and Y are, respectively, the numbers of asprin and sedative caplets included among the two caplets drawn from the bottle, find the probabilities distribution of X alone and that of Y alone. 

 

Solution: 

BasicPermutations-42.png

       2              5/12         for x = 0
g(x) = ∑  f(x, y) = { 1/2          for x = 1
      y=0             1/12         for x = 2

of the probability distribution of X. 

       2              7/12         for y = 0
h(y) = ∑  f(x, y) = { 7/18         for y = 1
      x=0             1/26         for y = 2

of the probability distribution of Y. 

 

Definition: 

假如 X和 Y是離散隨機變數並且 f(x, y)是它們在 (x, y) 這一點的聯合機率分配值, 
若
g(x) = ∑ f(x, y)
       y

其中每一個 x位於 X隨機變數的範圍中, 則我們稱 g(x) 是 X 的邊際分配 
(Marginal distribution). 

若
h(y) = ∑ f(x, y)
       x

其中每一個 y位於 Y隨機變數的範圍中, 則我們稱 h(y) 是 Y 的邊際分配 
(Marginal distribution).  

 

Definition: 

假如 X和 Y是連續隨機變數並且 f(x, y)是它們在 (x, y) 這一點的聯合機率密度值, 
若
        ∞
g(x) = ∫  f(x, y) * dy
       -∞
其中 -∞ < x < ∞, 

則我們稱 g(x) 是 X的邊際密度 (Marginal density). 

若
        ∞
h(y) = ∫  f(x, y) * dx
       -∞
其中 -∞ < y < ∞, 

則我們稱 g(x) 是 Y的邊際密度 (Marginal density). 

 

Example:  Given the joint probability sensity
 

            2/3 * (x + 2 * y)         for 0 < x < 1, 0 < y < 1
f(x, y) = {
            0                         elsewhere, 

find the marginal densities of X and Y. 

 

Solution: 

        ∞                 1
g(x) = ∫  f(x, y) * dy = ∫  2/3 * (x + 2 * y) * dy = 2/3 * (x + 1)
       -∞                 0 

         2/3 * (x + 1)                for 0 < x < 1
g(x) = {
         0                            elsewhere

        ∞                 1
h(y) = ∫  f(x, y) * dx = ∫  2/3 * (x + 2 * y) * dx = 1/3 * (1 + 4 * y)
       -∞                 0 

         1/3 * (1 + 4 * y)            for 0 < y < 1
h(y) = {
         0                            elsewhere

 

條件分配 - Conditional distributions

 

Definition: 

假如 X和 Y是離散隨機變數, f(x, y)是它們在 (x, y) 這一點的聯合機率分配值, 
並且 h(y) 值是隨機變數 Y在 y的邊際分配, 函數

            f(x, y) 
f(x | y) = _________             h(y) ≠ 0
             h(y)

其中每一 x位於 X範圍內, 則函數 f(x | y) 我們稱為 X相對於 Y的條件分配 
(conditional distribution). 


假如 X和 Y是離散隨機變數, f(x, y)是它們在 (x, y) 這一點的聯合機率分配值, 
並且 g(x) 值是隨機變數 X在 x的邊際分配, 函數

            f(x, y) 
w(y | x) = _________             g(x) ≠ 0
             g(x)

其中每一 y位於 Y範圍內, 則函數 w(y | x) 我們稱為 Y相對於 X的條件分配 
(conditional distribution). 

 

Definition: 

假如 X和 Y是連續隨機變數, f(x, y)是它們在 (x, y) 這一點的聯合機率密度值, 
並且 h(y) 值是隨機變數 Y在 y的邊際分配值, 函數

            f(x, y) 
f(x | y) = _________             h(y) ≠ 0
             h(y)

其中 -∞ < x < ∞
則函數 f(x | y) 我們稱為 X相對於 Y=y的條件密度 (conditional density). 


假如 X和 Y是連續隨機變數, f(x, y)是它們在 (x, y) 這一點的聯合機率密度值, 
並且 g(x) 值是隨機變數 X在 x的邊際分配值, 函數

            f(x, y) 
w(x | y) = _________             g(x) ≠ 0
             g(x)

其中 -∞ < y < ∞
則函數 w(x | y) 我們稱為 Y相對於 X=x的條件密度 (conditional density). 

 

Example:  Given the joint probability sensity
 

            2/3 * (x + 2 * y)         for 0 < x < 1, 0 < y < 1
f(x, y) = {
            0                         elsewhere, 

find the conditional density of X fiven Y=y, and use it to evaluate P(X ≦ 1/2 | Y=1/2).  

 

Solution: 

BasicPermutations-43.png

            f(x, y)     2/3 * (x + 2*y)
f(x | y) = _________ = _________________
             h(y)       1/3 * (1 + 4*y)

            2*x + 4*y
         = ___________
             1 + 4*y

             (2*x + 4*y) / (1 + 4*y)              for 0 < x < 1
f(x | y) = {
             0                                    elsewhere

           1      2*x + 4*(1/2)     2*x + 2
f(x | Y = ___) = _______________ = _________
           2      1 + 4 * (1/2)        3

                         1/2  2*x + 2          5
P(X ≦ 1/2 | Y = 1/2) = ∫    _________ * dx = ____
                         0       3             12

It is of interest to note that, in the figure given above, this probability is 
given by the ratio of the area of trapezoid ABCD to the area of trapezoid AEFD. 

 

 

 

z.png
Email: jasonc@mail2000.com.tw . 請尊重原創, 使用圖文時載明出處. 謝謝. 

 

(Finished)


 

 

 

 

 

 

 

 

 

arrow
arrow
    文章標籤
    機率分配
    全站熱搜

    Lexra 發表在 痞客邦 留言(0) 人氣()