# Random variable

Random variable $X$ represents a single-valued result of a random event. Its value is unknown to us, not because of our ignorance, but because of its non-existence. The value exists only after the happening of that random event.

Symbol $x$ represents a particular value of $X$. It is an existing value that can be substituted to $X$. We use symbol $x$ instead of a number because we have not yet known what that particular number is.

— Me@2016-04-08 05:24:45 PM

.

X ~ random variable

It is a variable due to the fact that the “identical” random process can result differently at different times.

.

x ~ a value of X

Since it is a particular value of X, it is not a variable. However, it may seem to be a variable because it may still be unknown to us.

.

Symbol $P(X)$ is meaningless because inside, it must be a statement (representing an event). Symbol $X$ is a random variable, not a statement.

Instead, “$X=x$” is a statement. So expression $P(X=x)$ is meaningful, such as

$P(X=x) = {\begin{cases}{\frac {1}{2}},&x=0,\\{\frac {1}{2}},&x=1,\\0,&x\notin \{0,1\} \end{cases}}$

.

From another point of view, $X$ is a noun phrase, such as “my monthly salary”, not a number. Symbol $x$ is a number, although maybe not known yet. That’s why whatever the formula, it contains no $X$‘s, but $x$‘s. For example,

$\cdots = {\begin{cases}{\frac {1}{2}},&x=0,\\{\frac {1}{2}},&x=1,\\0,&x\notin \{0,1\} \end{cases}}$

— Me@2016-05-04 06:32:24 PM

.

.

.

.

.

# Combinatorial proof

.

— Me@2022-12-06 09:58:50 AM

.

.

.

.

.

.

.

.

# 排列組合 1.4

nCr, 0.4

.

— Me@2022-10-19 12:26:30 PM

.

.

# 排列組合 1.3

nCr, 0.3

.

— Me@2022.09.29 10:11:00 AM

.

.

# 排列組合 1.2

nCr, 0.2

.

1.4.2 另外一種設計定義的想法是，由 $\displaystyle{n!}$算式取靈感。

$\displaystyle{0! = a^0}$

.

「零項相乘」即是「乘了等如沒有乘」，所以是一，因為任何數乘了一，效果都等於沒有乘；所以，

$\displaystyle{a^0 = 1}$

$\displaystyle{0! = 1}$

.

「零項相乘」的正式學名是，「空積」或「零項積」。

.

1.4.3 如果要詳細一點，去理解「空積」的話，可以先嘗試了解「次方」的意思。

$\displaystyle{a^5 = aaaaa}$

.

$\displaystyle{a^5 a^3 = (aaaaa)(aaa)}$

.

$\displaystyle{a^5 a^3 = a^{5+3}}$

.

.

$\displaystyle{a^5 a^{-3} = \frac{aaaaa}{aaa}}$

.

$\displaystyle{a^{-3} = \frac{1}{a^3}}$

.

$\displaystyle{a}$次方，又會是什麼呢？

.

.

$\displaystyle{a^5 a^{1/2} a^{1/2}}=?$

.

$\displaystyle{a^5 a^{1/2} a^{1/2}}=a^5 a^1$

.

$\displaystyle{a^5 a^{1/2} a^{1/2}}=a^6$

.

$\displaystyle{a^{1/2} a^{1/2}}=a^1$

.

$\displaystyle{\sqrt{a} \sqrt{a}}=a^1$

.

$\displaystyle{a^{\frac{1}{2}} = \sqrt{a}}$

.

$\displaystyle{a}$ 五次方乘以 $\displaystyle{a}$ 的正三次，就是乘多三個 $\displaystyle{a}$；所以，結果就是 $\displaystyle{a}$ 的八次方。

$\displaystyle{a^5 a^3 = (aaaaa)(aaa) = a^8}$

$\displaystyle{a^5 a^{-3} = a^2}$

.

$\displaystyle{a^5 a^{0} = aaaaa = a^5}$

.

— Me@2022.09.07 08:09:14 PM

.

.

# 排列組合 1.1

nCr, 0

.

$\displaystyle{n!}$

.

1.1  意思：

$\displaystyle{n}$ 個人 $\displaystyle{n}$ 個座位的話，有多少種坐法？

1.2.1  算式：

$\displaystyle{n! = (n)(n-1)(n-2) \cdots (3)(2)(1)}$

1.2.2  由來：

.

1.3

$\displaystyle{n! = (n)(n-1)(n-2) \cdots (3)(2)(1)}$

\displaystyle{\begin{aligned} 5! &= (5)(4)(3)(2)(1) \\ \\ \end{aligned}}

$\displaystyle{3!}$，就有 3 項；等等。

\displaystyle{\begin{aligned} 3! &= (3)(2)(1) \\ \end{aligned}}

.

1.4.0  零的階乘，$\displaystyle{0!}$，還未有定義，因為，算式 $\displaystyle{n! = (n)(n-1) \cdots (2)(1)}$ 中的 $\displaystyle{n}$，只可以是正整體，不可以零。

1.4.1  既然 $\displaystyle{n!}$意思是「$\displaystyle{n}$ 個人 $\displaystyle{n}$ 個座位，有多少種坐法」，那樣，你就可以視，$\displaystyle{0!}$ 的意思是「$\displaystyle{0}$ 個人 $\displaystyle{0}$ 個座位，有多少種坐法」；那明顯是一，因為，那個情況之下，只有一個「坐法」，就是「沒有人又沒有位」這個唯一的可能性。

$\displaystyle{0! = 1}$

.

1.4.2  另外一種設計定義的想法是，由 $\displaystyle{n!}$算式取靈感。

$\displaystyle{0! = a^0}$

「零項相乘」即是「乘了等如沒有乘」，所以是一，因為任何數乘了一，效果都等於沒有乘。

$\displaystyle{a^0 = 1}$

（「零項相乘」的正式學名是，「空積」或「零項積」。）

$\displaystyle{0! = 1}$

— Me@2022-08-02 02:41:43 PM

.

.

# 分支圖

.

$\displaystyle{P(A|B)={{P(B|A)*P(A)} \over {P(B)}}}$

This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.

— Me@2022-01-02 12:20:15 PM

.

.

# 機會率驗算 2

.

There are 5 women and 6 men in a bus. But there are only 4 seats.

Assume that all the seats will be occupied and all possible seating arrangements have the same probability to appear.

What is the probability that 2 or more men will have seats?

~~~

Probability method gets the final probability by multiplying several fractions of probability together.

P method:

This method considers each seat one by one: what is the probability that this seat will get, for example, an M?

Let $\displaystyle{x}$ be the number of men that will have seats. Also, instead of writing $\displaystyle{C^n_r}$, we use the standard notation $\displaystyle{{n \choose r}}$.

$\displaystyle{P(x \ge 2)}$
$\displaystyle{= 1 - P(x = 0) - P(x = 1)}$
$\displaystyle{= 1 - P(FFFF) - P(MFFF) - P(FMFF) - P(FFMF) - P(FFFM)}$

$\displaystyle{= 1 - P(FFFF) - {4 \choose 1} P(FFFM)}$

.

$\displaystyle{P(FFFF) = \left( \frac{5}{11} \right) \left( \frac{4}{10} \right) \left( \frac{3}{9} \right) \left( \frac{2}{8} \right)}$

$\displaystyle{P(FFFM) = \left( \frac{5}{11} \right) \left( \frac{4}{10} \right) \left( \frac{3}{9} \right) \left( \frac{6}{8} \right)}$

.

$\displaystyle{P(x \ge 2)}$

$\displaystyle{= \frac{6360}{7920}}$

$\displaystyle{= \frac{53}{66}}$

.

Statistics method gets the final probability by dividing the number of ways of getting the desired result by the number of all possible results.

S method 1:

This method considers all the seats at once: what is the number of ways that they will get, for example, 3F and 1M?

In other words, instead of the seats, this method focuses on the people: what is the number of ways that 3F and 1M will be chosen?

In other words, instead of the choosing process, this method focuses on counting the results of the choosing.

Let $\displaystyle{N(...)}$ = the number of ways of …

$\displaystyle{P(x \ge 2)}$

$\displaystyle{= \frac{N(\text{seats choose 2 or more men})}{\text{total number of ways}}}$

$\displaystyle{= \frac{\text{total number of ways} - N(\text{4 F among 5}) - N(\text{choose 3 F among 5 and then 1 M among 6})}{\text{total number of ways}}}$

$\displaystyle{= \frac{N(\text{seats choose any 4 people}) - N(\text{4 F among 5}) - N(\text{choose 3 F among 5}) \times N(\text{1 M among 6})}{N(\text{seats choose any 4 people})}}$

$\displaystyle{= \left[{11 \choose 4} - {5 \choose 4} - {5 \choose 3} {6 \choose 1} \right] / \left[ {11 \choose 4} \right]}$

$\displaystyle{= \frac{ 330 - 5 - 10 \times 6 }{330}}$

$\displaystyle{= \frac{ 53 }{ 66 }}$

.

S method 2:

This method considers each seat one by one: what is the number of ways that this seat will get, for example, an M?

In other words, instead of the results, this method focuses on choosing process itself.

Note that this method uses permutation instead of combination.

$\displaystyle{P(x \ge 2)}$

$\displaystyle{= \frac{\text{total number of ways} - N(FFFF) - N(MFFF) - N(FMFF) - N(FFMF) - N(FFFM)}{\text{total number of ways}}}$

$\displaystyle{= \frac{(11)(10)(9)(8) - (5)(4)(3)(2) - (6)(5)(4)(3) - (5)(6)(4)(3) - (5)(4)(6)(3) - (5)(4)(3)(6)}{(11)(10)(9)(8)}}$

$\displaystyle{= \frac{(11)(10)(9)(8) - (5)(4)(3)(2) - 4(6)(5)(4)(3)}{(11)(10)(9)(8)}}$

$\displaystyle{= \frac{6360}{7920}}$

$\displaystyle{= \frac{ 53 }{ 66 }}$

— Me@2021-10-02 05:18:02 PM

.

.

# 背誦量

.

（TK: 運算機會率題目時，如何提升準確度？）

.

（TK: 其實我是有背的，但是，時常也誤中副車，差一點才能想中正確方法。）

.

「背」的意思並不是說，你把「魔法筆記」，由頭至尾，閱讀一次就算。「背」的真正意思是，要你做到「過目不忘」，即是，在平日做練習，或者考試時，你都可以在心裡翻查，筆記上的每一頁，每一個細節。

— Me@2014.10.05

.

.

# Probability 4

using probability

~ ignoring the details

~ caring about only the results

— Me@2014-05-21 09:28:35 PM

# nCr, 4

（A: 那為什麼把「7P3」拆成「7P2 x 5P1」就可以？那不會「暗地裡加了次序」嗎？）

7 個蘋果中選 3 出來，即是相當於有 3 個格子要填滿：

（＿）（＿）（＿）

（7）（＿）（＿）

（7）（6）（＿）

（7）（6）（5）

3! = 6

（7）（6）（5）
—————-
（3!）

= 35

（＿）（＿）（＿）

（3）（＿）（＿）

（3）（2）（＿）

（3）（2）（1）

（7）（6）（5）
—————-
（3）（2）（1）

= 35

（7）（6）|（5）
——— ——-
（2）（1）|（1）

（7）（6）|（5）
= ——— ——
（2!） |（1!）

= 105

— Me@2014.04.21

# nCr, 3

（A: 為何把「7P3」拆成「7P2 x 5P1」就可以，而把「7C3」拆成「7C2 x 5C1」就錯誤？）

ABE

AEB

BAE

BEA

EAB

EBA

ABE

AEB

BAE

BEA

EAB

EBA

AB　E

BA　E

AE　B

EA　B

BE　A

EB　A

AB　E

BA　E

AE　B

EA　B

BE　A

EB　A

（A: 那為什麼把「7P3」拆成「7P2 x 5P1」就可以？那不會「暗地裡加了次序」嗎？）

— Me@2014.04.14

# nCr, 2

（A：我大概明白你的解釋。但是，情感上，我仍然接受不到，「7 選 3」和「7 選完 2 後再選 1」，的確有所不同。）

「nPr」即是「n 排 r」—— 如果有 n 個物件，選 r 出來排隊，總共有多少個排列方法？

7P3/(3!)

= 210/6

= 35

7P2

(7P2)(5P1)

(7P2)(5P1)/(3!)

= 35

（A: 為何把「7P3」拆成「7P2 x 5P1」就可以，而把「7C3」拆成「7C2 x 5C1」就錯誤？）

— Me@2014.04.05

# nCr

（A：那我可不可以把題目看成，分兩次抽 3 個蘋果出來？

「7C3」和「7C2 x 5C1」，所表達的情況不同。

「7C3」是指由 7 個蘋果之中，任意選 3 個出來，總共有多少個可能。

（A：但是我仍然不太明白，「7 選 3」和「7 選完 2 後再選 1」，為何有所不同。）

— Me@2014.04.01