[Math] Binomial Distribution (이항분포)

2023. 3. 14. 18:16·.../Math
728x90
728x90

Binomial Distribution (이항분포) :

1. 정의 

 1이 나올 확률(or 성공확률)이 $p$이고, 0이 나올 확률(or 실패확률)이 $1-p$인  

 Bernoulli trial을 $N$번 반복하는 경우의 성공횟수를 Random Variable $X$라고 할 경우,
 $X$가 따르는 probability distribution(확률분포)가 바로 binomial distribution임.

 

식으로 표현할 경우 다음과 같음.

$$
X \sim \text{Bin}(x;N,p)
$$

  • probability distribution를 결정짓는 variables를 parameters라고 부르며, 여기서는 $N$과 $p$이다.
  • ;을 통해 random variables과 parameters를 구분하고 있다.

달리 애기하면 다음이 성립한다.

  • Bernoulli trial을 1회 수행한 경우의 확률변수는 Bernoulli distribution을 따른다고 하며,
  • Bernoulli trial을 $N$회 수행한 경우의 확률변수는 Binomial distirbution을 따른다.
  • 즉, $N=1$인 경우, Binomial distribution은 Bernoulli distribution이다.

2023.08.17 - [.../Math] - [Math] Bernoulli Distribution (베르누이 분포)

 

[Math] Bernoulli Distribution (베르누이 분포)

Bernoulli distribution (베르누이 분포)은 Probability Distribution에서 가장 단순한 분포 중 하나 임. 주로 binary classification task에서 많이 사용됨.Bernoulli Trial결과가 2가지 중 하나로만 나오는 trial(시행, 시도

dsaint31.tistory.com


2. 수식

$$
\begin{aligned}
\text{Bin}(x;N,p)&=_NC_x p^x(1-p)^{(N-x)} \\ &= \left( \begin{matrix}N \\ x\end{matrix}\right)p^x(1-p)^{N-x} \\
&=\frac{N!}{x!(N-x)!}p^x(1-p)^{N-x}
\end{aligned}
$$

where

  • $\left( \begin{matrix}N \\ x \end{matrix} \right)$: combination (조합). $N$개의 element에서 $x$개의 element를 순서에 상관없이 선택하는 경우의 수.
  • $N!$ : factorial. $N! = N\cdot(N-1)\cdot(N-2) \cdots 2\cdot1$

2024.02.04 - [.../Math] - [math] Factorial(계승), Permutation (순열) & Combination (조합)

 

[math] Factorial(계승), Permutation (순열) & Combination (조합)

경우의 수를 세는 방법의 기본Factorial, Permutation and CombinationFactorial (계승)서로 다른 물건들을 모두 순서를 주어 나열할 수 있는 모든 경우의 수.$$ n! = n\times(n-1)\times(n-2)\times\cdots\times1 $$Factorial func

dsaint31.tistory.com


참고 : Poisson Distribution과의 관계

  • 이는 binomial distribution에서 $N$을 무한대로 보내고, mean이었던 $\mu=Np=\lambda$로 치환하여 얻어짐.
    • 일반적으로 $N \ge 10$, 성공확률 $p\le 0.1$인 binomial distribution인 경우 Poisson distribution과 유사함.
  • 즉, 발생확률 $p$가 매우 낮은 경우면서 $N$이 무한대인 binomial distribution이 바로 Poisson Distribution임.

부가적으로 $\lambda$가 커질수록 Poisson Distribution은 Gaussian Distribution(=Normal Distribution)과 유사해짐.

2023.10.25 - [.../Math] - [Math] Poisson Distribution (포아송분포)

 

[Math] Poisson Distribution (포아송분포)

Poisson Distribution이란? 아주 가끔 일어나는 사건(trial)에 대한 확률 분포 : 방사선 검출에 주로 사용되는 확률분포라 의료영상에서는 매우 많이 사용됨. 전체 인구수에서 연간 백혈병으로 사망 건

dsaint31.tistory.com


3. Moment

3.1. Expected Value (기댓값, 1st moment)

$$E[X]=Np$$

증명은 다음을 참고.

$$
\begin{aligned}
E[X]&=E\left[\sum^N_{i=1}Y_i\right] \\
&= \sum^N_{i=1} E\left[ Y_i \right] \\
&= \sum^N_{i=1}p \\
&=Np
\end{aligned}
$$
where, $Y_i$는 각각이 독립인 Bernoulli random variable임.


3.2 Variance (분산, 2nd moment)

$$\text{Var}[X]=Np(1-p)$$

 

2022.03.31 - [.../Math] - [Statistics] Moment (Probability Moment)

 

[Statistics] Moment (Probability Moment)

1. Moment (Probability Moment) : Statistics 💡 statistics에서 moment는 probability distribution에서 계산되어진 특징값 확률 분포를 이용하여 구해지는 random variable의 대표값(or 통계량)을 일반화(generalization)시킨

dsaint31.tistory.com


기계학습의 Ensemble Learning 과 Binomial Distribution

참고로 binomial distribution은

  • Ensemble Learning에서
  • 충분히 많은 수의 독립적인 weak learner들로
  • strong learner를 만들 수 있는

이론적 근거로 사용된다.

 

예를 들면,

Binary classification 에서 51%의 accuracy를 가지는 weak model들이 1000개가 있다고 하면,

이들을 hard voting으로 aggregation한 ensemble model은 accuracy가 75%정도나 된다.

이는 binomial distribution $\text{Bin}(x;N=1000,p=0.51)$에서

$x=499$인 경우의 Cumulative Density Function의 값 을 1에서 빼주어 구할 수 있다.

다수결인 hard voting이므로 1000개의 모델 중 499개 이하로만 틀리면 전체 ensemble 모델은 정답을 맞추게 되기 때문이다.

from scipy.stats import binom
1-binom.cdf(499,1000,0.51)

 

물론 충분한 수의 독립적인 모델을 훈련시키는 것은 대부분의 경우 쉽지 않은 문제이기 때문에 ideal한 경우를 말하고 있긴 하다.


같이 보면 좋은 자료들

2024.04.18 - [.../Math] - [Math] Probability Distribution

 

[Math] Probability Distribution

Probability DistributionProbability Distribution은 특정 random variable(확률 변수)이 취할 수 있는 각각의 값에 대한 확률을 나타내는 분포임.Probability Distribution Function (PDF)으로 기술되며,random variable이 어떤 값

dsaint31.tistory.com


 

'... > Math' 카테고리의 다른 글

[Math] Mean : Measures of Central Tendency  (0) 2023.04.13
[Math] Type of Data and Scale of Measurement  (0) 2023.03.15
[Math] Random Variable  (0) 2023.03.09
[Math] Taylor Expansion and Taylor Theorem (테일러 전개)  (0) 2023.02.27
[Math] Sigmoid function  (0) 2022.12.28
'.../Math' 카테고리의 다른 글
  • [Math] Mean : Measures of Central Tendency
  • [Math] Type of Data and Scale of Measurement
  • [Math] Random Variable
  • [Math] Taylor Expansion and Taylor Theorem (테일러 전개)
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (738)
      • Private Life (13)
      • Programming (186)
        • DIP (104)
        • ML (26)
      • Computer (118)
        • CE (52)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (349)
        • Signals and Systems (103)
        • Math (170)
        • Linear Algebra (33)
        • Physics (42)
        • 인성세미나 (1)
      • 정리필요. (54)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (1)
        • PET Study 2009 (1)
        • 방사선 장해방호 (4)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

    • Test
    • PET Study 2009
    • 기타 방사능관련.
  • 인기 글

  • 태그

    signal_and_system
    검사
    Optimization
    linear algebra
    Convolution
    Probability
    Vector
    Programming
    fourier transform
    function
    SS
    signals_and_systems
    numpy
    math
    인허가제도
    Term
    SIGNAL
    random
    Python
    opencv
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
[Math] Binomial Distribution (이항분포)
상단으로

티스토리툴바