機率質量函數
Author: 藍邦偉  老師

$ 機率質量函數 $

$ X\;\;x_1\;\;x_2\;\;x_3\;\;...\;\;x_{n-1}\;\;x_n$
$\;p\;\;\;p_1\;\;p_2\;\;p_3\;\;...\;\;p_{n-1}\;\;p_n$
$\;$
$\;p_1+p_2+...+p_{n-1}+p_n=1,\;0≤p_i≤1$

$ 若X是離散型隨機變數，\;其可能值為\left\lbrace x_1,x_2,x_3,...,x_{n-1},x_n \right\rbrace，\;則定義X得機率質量函數p(x_i) 定義為事件 $
$X=x_i發生的機率，\;即\;P(x_i)=p(X=x_i)，\;如果i不是X可能發生的值，\;則p(x)=0$

$ 或\;p(x_i)=\left\lbrace\begin{array}{ll} p_1\;,\;x=x_1 \ p_2\;,\;x=x_2 \ p_3\;,\;x=x_3 \ |  \ p_{n-1} \;,\;x=x_{n-1}\p_{n}\;,\; x=x_n \ \end{array}  \right.\  $

1

2

$ 定理 $

$ 實例 $

$ x_1\;\;\;\;\;\;x_2\;\;\;\;\;\;x_3\;\;\;\;\;\;x_4\;\;\;\;\;\;x_5 $

$ p_1 $

$ p_2 $

$ p_3 $

$ p_4 $

$ p_5 $

O = (0, 0)
O_1: O + (1, 0)
a_1 = Segment(O_1, O_1 + (0, 5))
a = true
b = false
c = Segment(O, O + (7, 0))
d = Segment(O, O + (0, 5))
O_2: O + (2, 0)
O_3: O + (3, 0)
O_4: O + (4, 0)
O_5: O + (5, 0)
O_6: O + (6, 0)
A_1 = Point(a_1)
B_1: (x(O_2), y(A_1))
a_2 = Segment(O_2, O_2 + (0, 5))
a_3 = Segment(O_3, O_3 + (0, 5))
a_4 = Segment(O_4, O_4 + (0, 5))
a_5 = Segment(O_5, O_5 + (0, 5))
a_6 = Segment(O_6, O_6 + (0, 5))
A_2 = Point(a_2)
A_3 = Point(a_3)
A_4 = Point(a_4)
A_5 = Point(a_5)
B_2: (x(O_3), y(A_2))
B_3: (x(O_4), y(A_3))
B_4: (x(O_5), y(A_4))
B_5: (x(O_6), y(A_5))
poly1, o_1, o_2, b_1, a_7 = Polygon(O_1, O_2, B_1, A_1)
poly2, o_3, o_4, b_2, a_8 = Polygon(O_2, O_3, B_2, A_2)
poly3, o_5, o_6, b_3, a_9 = Polygon(O_3, O_4, B_3, A_3)
poly4, o_7, o_8, b_4, a_{10} = Polygon(O_4, O_5, B_4, A_4)
poly5, o_9, o_{10}, b_5, a_{11} = Polygon(O_5, O_6, B_5, A_5)
C_0 = (-8.36, 6.28)
C_1: C_0 + (4.2, 0)
C_3: C_0 - (0, 1)
C_2: C_1 - (0, 1)
h_a = Segment(C_0, C_1)
h_8 = Segment(C_2, C_1)
h_c = Segment(C_2, C_3)
h_1 = Segment(C_0, C_3)
C_a = Midpoint(h_8)
C_b = Midpoint(h_1)
h_b = Segment(C_b, C_a)
C_4: C_0 + (0.45, 0)
C_5: C_3 + (0.45, 0)
h_2 = Segment(C_4, C_5)
C_6: C_4 + (0.55, 0)
C_7: C_5 + (0.55, 0)
h_3 = Segment(C_6, C_7)
C_8: C_6 + (0.55, 0)
C_9: (x(C_8), y(C_7))
h_4 = Segment(C_8, C_9)
C_{10}: C_8 + (0.55, 0)
C_{11}: (x(C_{10}), y(C_7))
h_5 = Segment(C_{10}, C_{11})
C_{12}: C_{10} + (0.55, 0)
C_{13}: (x(C_{12}), y(C_7))
h_6 = Segment(C_{12}, C_{13})
C_{14}: C_{12} + (0.9, 0)
C_{15}: (x(C_{14}), y(C_7))
h_7 = Segment(C_{14}, C_{15})
D_1: (0, y(A_1))
D_2: (0, y(A_2))
D_3: (0, y(A_3))
D_4: (0, y(A_4))
D_5: (0, y(A_5))
k_1 = Segment(A_1, D_1)
k_2 = Segment(A_2, D_2)
k_3 = Segment(A_3, D_3)
k_4 = Segment(A_4, D_4)
k_5 = Segment(A_5, D_5)