離散型隨機變數的期望值變異數與標準差
Author: 藍邦偉  老師

$ 離散型隨機變數的期望值變異數與標準差 $

2

$ 定理 $

$ 實例 $

$ x_1= $

$ x_2= $

$ x_3= $

$ x_4= $

$ x_5= $

1

2

3

4

5

$ X的機率質量函數為 $

$ X $

$ p $

O = (0, 0)
O_1: O + (1, 0)
a_1 = Segment(O_1, O_1 + (0, 5))
b = true
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))
Y1, o_1, o_2, b_1, a_7 = Polygon(O_1, O_2, B_1, A_1)
Y2, o_3, o_4, b_2, a_8 = Polygon(O_2, O_3, B_2, A_2)
Y3, o_5, o_6, b_3, a_9 = Polygon(O_3, O_4, B_3, A_3)
Y4, o_7, o_8, b_4, a_{10} = Polygon(O_4, O_5, B_4, A_4)
Y5, o_9, o_{10}, b_5, a_{11} = Polygon(O_5, O_6, B_5, A_5)
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)
Y: Y1 + Y2 + Y3 + Y4 + Y5
Y_a: Y1 / Y
Y_b: Y2 / Y
Y_c: Y3 / Y
Y_d: Y4 / Y
Y_e: Y5 / Y
p1: "$ " + (LaTeX[Y_a]) + " $"
p2: "$ " + (LaTeX[Y_b]) + " $"
p3: "$" + (LaTeX[Y_c]) + " $"
p4: "$ " + (LaTeX[Y_d]) + " $"
p5: "$ " + (LaTeX[Y_e]) + " $"
x_1 = 1 (slider from 0 to 9, step 1)
x_2 = 2 (slider from 0 to 9, step 1)
x_3 = 3 (slider from 0 to 9, step 1)
x_4 = 4 (slider from 0 to 9, step 1)
x_5 = 5 (slider from 0 to 9, step 1)
table: "$ 或\;p(x_i)=\left\lbrace\begin{array}{ll} " + (LaTeX[Y_a]) + "\;,\;\;x=" + (LaTeX[x_1]) + " \\ " + (LaTeX[Y_b]) + "\;,\;\;x=" + (LaTeX[x_2]) + " \\ " + (LaTeX[Y_c]) + "\;,\;\;x=" + (LaTeX[x_3]) + " \\ " + (LaTeX[Y_d]) + " \;,\;\;x=" + (LaTeX[x_4]) + "\\" + (LaTeX[Y_e]) + "\;,\;\; x=" + (LaTeX[x_5]) + " \\ \end{array}  \right.\  $"
Table_{RV}: "$ " + (LaTeX[x_1]) + "\;\;\;\;\;\;\;" + (LaTeX[x_2]) + "\;\;\;\;\;\;\;\;" + (LaTeX[x_3]) + "\;\;\;\;\;\;\;" + (LaTeX[x_4]) + "\;\;\;\;\;\;\;\;" + (LaTeX[x_5]) + " $"
E_1 = (9.78, 4.06)
E_2: E_1 - (0, 1)
E_4: E_1 + (5, 0)
E_3: E_2 + (5, 0)
E_5: E_1 + (0.6, 0)
E_6: (x(E_5), y(E_2))
g_4 = Segment(E_1, E_2)
g_3 = Segment(E_3, E_2)
g_{10} = Segment(E_3, E_4)
g_1 = Segment(E_1, E_4)
g_5 = Segment(E_6, E_5)
E_7: E_5 + (0.88, 0)
E_9: E_7 + (0.88, 0)
E_{11}: E_9 + (0.88, 0)
E_{13}: E_{11} + (0.88, 0)
E_8: (x(E_7), y(E_2))
E_{10}: (x(E_9), y(E_2))
E_{12}: (x(E_{11}), y(E_2))
E_{14}: (x(E_{13}), y(E_2))
g_6 = Segment(E_8, E_7)
g_7 = Segment(E_{10}, E_9)
g_8 = Segment(E_{12}, E_{11})
g_9 = Segment(E_{14}, E_{13})
g_2 = Segment(Midpoint[E_1, E_2], Midpoint[E_3, E_4])
n = 0 (slider from 0 to 4, step 1)
EX: x_1 * Y_a + x_2 * Y_b + x_3 * Y_c + x_4 * Y_d + x_5 * Y_e
t_{EX}: "$ E(X)= " + (LaTeX[x_1]) + "× " + (LaTeX[Y_a]) + "+" + (LaTeX[x_2]) + "× " + (LaTeX[Y_b]) + "+" + (LaTeX[x_3]) + "× " + (LaTeX[Y_c]) + "+" + (LaTeX[x_4]) + "× " + (LaTeX[Y_d]) + "+" + (LaTeX[x_5]) + "× " + (LaTeX[Y_e]) + "=" + (LaTeX[EX]) + "$"
inputBox1 = Textfield(x_1)
inputBox2 = Textfield(x_2)
inputBox3 = Textfield(x_3)
inputBox4 = Textfield(x_4)
inputBox5 = Textfield(x_5)
V: Y_a * x_1^(2) + Y_b * x_2^(2) + Y_c * x_3^(2) + Y_d * x_4^(2) + Y_e * x_5^(2) - EX^(2)
t_{Var}: "$ V(X) =[" + (LaTeX[Y_a]) + "×" + (LaTeX[x_1]) + "^2+" + (LaTeX[Y_b]) + "×" + (LaTeX[x_2]) + "^2+" + (LaTeX[Y_c]) + "×" + (LaTeX[x_3]) + "^2+" + (LaTeX[Y_d]) + "×" + (LaTeX[x_4]) + "^2+" + (LaTeX[Y_e]) + "×" + (LaTeX[x_5]) + "^2]-" + (LaTeX[EX]) + "^2=" + (LaTeX[V]) + "$"
a = false
t_{σ}: "$ \sigma=\sqrt{V(X)} =\sqrt{" + (LaTeX[V]) + "}=" + (LaTeX[sqrt(V)]) + "$"
t_{Var2}: "$ V(X)=" + (LaTeX[Y_a]) + "×(" + (LaTeX[x_1]) + "-" + (LaTeX[EX]) + ")^2+" + (LaTeX[Y_b]) + "×(" + (LaTeX[x_2]) + "-" + (LaTeX[EX]) + ")²+" + (LaTeX[Y_c]) + "×(" + (LaTeX[x_3]) + "-" + (LaTeX[EX]) + ")²$
                      $+" + (LaTeX[Y_d]) + "×(" + (LaTeX[x_4]) + "-" + (LaTeX[EX]) + ")²+" + (LaTeX[Y_e]) + "×(" + (LaTeX[x_5]) + "-" + (LaTeX[EX]) + ")² $
                      $=" + (LaTeX[V]) + "$"
List_1: {x_1, x_2, x_3, x_4, x_5}
List_2: {Y_a, Y_b, Y_c, Y_d, Y_e}
t_{x1}: "$ " + (LaTeX[x_1]) + " $"
t_{x2}: "$ " + (LaTeX[x_2]) + " $"
t_{x3}: "$ " + (LaTeX[x_3]) + " $"
t_{x4}: "$ " + (LaTeX[x_4]) + " $"
t_{x5}: "$ " + (LaTeX[x_5]) + " $"
t_{Ya}: "$ " + (LaTeX[Y_a]) + " $"
t_{Yb}: "$ " + (LaTeX[Y_b]) + " $"
t_{Yc}: "$ " + (LaTeX[Y_c]) + " $"
t_{Yd}: "$ " + (LaTeX[Y_d]) + " $"
t_{Ye}: "$ " + (LaTeX[Y_e]) + " $"