[확률론, Probability] 조건부 확률, 베이즈 룰, 독립, 랜덤 변수

1. Conditional Probability

1.1.Definition: Conditional Probability, 조건부 확률

$$
P(A \mid B)=\frac{P(A \cap B)}{P(B)}
$$

$P(A)$는 A의 prior probability(사전 확률)라 불리며, $P(A \cap B)$는 A의 posterior probability(사후 확률)라 부른다.

 

1.2. Theorem

$$
P(A \cap B)=P(B) P(A \mid B)=P(A) P(B \mid A)
$$

 

1.3. Theroem: Probability of the intersection of $n$ events, n개의 교차하는 확률

$$
\begin{aligned}
&\text { For any events } A_1, \ldots, A_n \text { with } P\left(A_1, A_2, \ldots, A_{n-1}\right)>0\\
&\begin{aligned}
P\left(A_1, A_2, \ldots, A_n\right) & =P\left(A_1\right) P\left(A_2 \mid A_1\right) P\left(A_3 \mid A_1, A_2\right) \\
& =\cdots P\left(A_n \mid A_1, \ldots, A_{n-1}\right)
\end{aligned}
\end{aligned}
$$

Theorem 3 example

 

2. Bayes Rule

2.1. Theorem: Bayes rule, 베이즈룰

$$
P(A \mid B)=\frac{P(B \mid A) P(A)}{P(B)}
$$

이 정리가 서사하는 바는, 어떤 사건 가 발생했을 때 가 발생했을 확률을 구하는 공식입니다. 즉, 이미 관찰된 정보 를 바탕으로 원래의 사건 의 확률을 업데이트하는 방법을 제공합니다.

 

2.2. Theorem: Law of total probability (LOPT), 전체 확률의 법칙

전체 확률의 법칙이라고 잘 알려진 것

$A_1, A_2, ....., A_n$이 sample space $S$의 한 부분일 때, $P(B)=\sum_{i=1}^n P\left(B \mid A_i\right) P\left(A_i\right)$

쉽게 말하면, 전체 확률의 법칙은 사건 B가 여러 개의 다른 경로((원인, $A_i$))에서 발생할 가능성이 있을 때, 이를 고려하여 전체 확률을 계산하는 방법이다.

하지만, LOPT는 각 원인이 mutually exclusive (서로소)여야하고 합쳤을 때 표본을 완전히 채워야한다는 단점이 있다.

 

2.3. Theorem: Bayes rule with extra conditioning, 베이즈룰 확장

$$
\begin{aligned}
&\text { Provided that } P(A \cap E)>0 \text { and } P(B \cap E)>0 \text {, we have }\\
&P(A \mid B, E)=\frac{P(B \mid A, E) P(A \mid E)}{P(B \mid E)}
\end{aligned}
$$

 

2.4. Theorem: LOPT with extra conditioning, 전체 확률의 법칙 확장

Let $A_1, \ldots, A_n$ be a partition of $S$. Provided that $P\left(A_i \cap E\right)>0$, $\forall i$, we have

$$
P(B \mid E)=\sum_{i=1}^n P\left(B \mid A_i, E\right) P\left(A_i \mid E\right)
$$

 

 

3. Independence

3.1. Definition: Independence of events, 사건의 독립

사건 A, B가 독립이라면, $P(A \cap B)=P(A) P(B)$, 만약 $P(A) > 0, P(B) > 0$ 이라면, $P(A \vert B) = P(A)$

 

P(A)가 0이면, 다른 모든 것과 독립이고, A와 B가 독립이면, A여집합과 B도 독립, A와 B여집합도 독립, A여집합 B여집합도 독립이다.
- $P\left(B^c \mid A\right)=1-P(B \mid A)=1-P(B)=P\left(B^c\right)$
- $P\left(A^c \mid B\right)=1-P(A \mid B)=1-P(A)=P\left(A^c\right)$
- $P\left(B^C \mid A^C\right)=1-P\left(B \mid A^c\right)=1-P(B)=P\left(B^c\right)$

 

3.2. Definition: Independence of three events, 여러 사건의 독립

$$
\begin{aligned}
P(A \cap B) & =P(A) P(B) \\
P(A \cap C) & =P(A) P(C) \\
P(B \cap C) & =P(B) P(C) \\
P(A \cap B \cap C) & =P(A) P(B) P(C)
\end{aligned}
$$

 

3.3. Conditionanl independence, 조건부 독립

$$
P(A \cap B \mid E)=P(A \mid E) P(B \mid E)
$$

E가 발생할 확률을 아는 경우에만 A와 B는 독립이다.

 

4. Random Variable

4.1. Definition: Random Variable, 랜덤 변수

랜덤 변수((Random \:Variable, r.v.))는 확률 실험의 결과((표본공간 \:S))를 숫자로 변환하는 함수입니다. 

 

4.2. Definition: Probability mass function, 확률 질량 함수

확률 질량 함수(PMF)는 이산형(discrete) 확률 변수 $X$ 가 특정 값 $x$를 가질 확률을 나타내는 함수입니다.

$$
P_X(x)=P(X=x)
$$

 

PMF는 모든 가능한 값에서 확률이 0 이상이다. $P_X(x) \geq 0$

또한, 확률의 총합은 1이다. $\sum_{x \in \text { support of } X} P_X(x)=1$

 

4.3. Definition: Bernoulli distribution, 베르누이 분포

베르누이 분포는 참 혹은 거짓, 0 혹은 1의 두 가지 중 하나의 확률이 나오는 분포이다.

$$
P(X=1)=p \text { and } P(X=0)=1-p
$$

$$
X \sim \operatorname{Bern}(p)
$$

4.4. Definition: Binomial distribution, 이항 분포분포

이항 분포(Binomial Distribution)는 독립적인 베르누이 시행을 n번 반복했을 때, 성공(1)이 나오는 횟수를 따르는 확률 분포입니다.

$$
X \sim \operatorname{Bin}(n, p)
$$

 

$$
P(X=k)=\binom{n}{k} p^k(1-p)^{n-k}
$$

n번의 시행 중, 정확히 k번 성공할 확률

 

이항 계수: $\binom{n}{k}=\frac{n!}{k!(n-k)!}$

4.5. Definition: Cumulative distribution function ((CDF)), 누적 분포 함수함수

$$
F_X(x)=P(X \leq x)
$$

누적 분포 함수(CDF)랜덤 변수 가 특정 값 이하일 확률을 나타내는 함수입니다.

4.6. Theorem: Valid CDF

CDF는 다음의 성질을 만족한다.

  • Increasing: if $x_1 \leq x_2$, then $F\left(x_1\right) \leq F\left(x_2\right)$.
  • Right-continuous: $F(a)=\lim _{x \rightarrow a^{+}} F(x)$.
  • Convergence to 0 and 1 in the limits: $\lim _{x \rightarrow-\infty} F(x)=0$ and $\lim _{x \rightarrow \infty} F(x)=1$

4.7. Definition: Function of an random variable

랜덤 변수 $X$에 함수 $g$를 적용하면 새로운 랜덤 변수 $g(X)$가 된다.

4.8. Definition: PMF of $g(X)$

이산형(discrete) 랜덤 변수 $X$에 함수 $g$를 적용했을 때, 새로운 랜덤 변수 $g(X)$의 지원(Support)과 PMF를 결정하는 방법을 설명한다.

$$
P(g(X)=y)=\sum_{x: g(x)=y} P(X=x)
$$

4.9. Definition: Function of an two random variable

두 개의 랜덤 변수 $X$와 $가 주어졌을 때, 이를 이용해 새로운 랜덤 변수 $g(X,Y)$를 정의하는 방법을 설명합니다.

4.10. Definition: Independence of two random variable

두개의 랜덤 변수의 독립성

$$
P(X \leq x, Y \leq y)=P(X \leq x) P(Y \leq y) \quad \text { (continuous) }
$$

 

$$P(X=x, Y=y)=P(X=x) P(Y=y) \quadtext{ (discrete) }$$

4.11. Definition: Independence of many random variable

더 많은 랜덤 변수에 대해서도 독립성은 유지된다.

$$
\begin{gathered}
P\left(X_1 \leq x_1, \ldots, X_n \leq x_n\right)=P\left(X_1 \leq x_1\right) \ldots P\left(X_n \leq x_n\right), \\
\forall x_1, \ldots, x_n \in \mathbb{R}
\end{gathered}
$$

4.12. Definition: Function of independent random variable

독립적인 랜덤 변수 X,Y에 대하여 X와 Y의 어떠한 함수가 와도 서로 독립성이 유지된다.

4.13. Definition: Independent and identically distributed ((i.i.d)), 독립 동일 분포

i.i.d. 랜덤 변수서로 독립적이면서 동일한 확률 분포를 따르는 랜덤 변수들을 의미합니다.

4.14. Theorem

이항 분포(Bin(n,p)\text{Bin}(n, p))가 n개의 독립적이고 동일한 베르누이 분포(Bern(p)\text{Bern}(p))를 따르는 확률 변수들의 합으로 표현될 수 있다는 것을 의미합니다.

 

4.15. Definition: Conditional independence of random variables

두 랜덤 변수 XY제3의 랜덤 변수 Z가 주어진 상태에서 조건부 독립(Conditionally Independent) 이려면

$$
P(X \leq x, y \leq y \mid Z=z)=P(X \leq x \mid Z=z) P(Y \leq y \mid Z=z)
$$

 

4.16. Definition: Conditional PMF

이산형(discrete) 확률 변수 XZ가 주어졌을 때, 조건부 확률 질량 함수(Conditional PMF)

$$
P(X=x \mid Z=z)
$$

즉, Z=z가 주어졌을 때, X가 특정 값 x를 가질 확률을 나타내는 함수입니다.