Normal Distirbution
Gaussian Distribution, Laplace-Gaussian Distribution 라고도 불림.
특히, mean=0이고, std=1인 경우, Standard Normal Distribution이라고 불림.
1. 정의
Normal Distribution의 pdf (probability density function)는 다음과 같음.
$$f(X)=\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(X-\mu)^2}{2\sigma^2}}$$
- $\mu$ : mean
- $\sigma$ : standard deviation
pdf 이므로 probability를 다 더한 적분값은 1이 됨.
$\mu$와 $\sigma$가 parameter 임.
일반 normal distribution에 Z-Transform을 수행하면 standard normal distribution이 된다.
통계나 확률에서의 Z-Transform 은 ML등에선 Standardization으로 불림 (신호처리의 z-Transform과는 다름)
$$Z=\frac{X-\mu}{\sigma}$$
2024.05.04 - [Programming/ML] - [ML] Feature Scaling
[ML] Feature Scaling
Feature ScalingML에서 feature scaling이란 다음을 의미함.input data의 각 feature들의 값이 일정한 범위(a consistent range)나 표준화된 척도(standardized scale)로 변환하는 과정. Feature Scaling은 ML에서모든 feature가
dsaint31.tistory.com
2. Normal distribution 특징
- Independent value, Abscissa (x의 값, 좌표평면에서의 x좌표를 앱시사라고 부름) 는 real number를 취하며 ($-\infty,+\infty)$.
- mean(평균값) 부근의 확률밀도가 큼.
- mean에서 멀어질수록 확률밀도가 작음.
- 확률밀도가 mean을 중심으로 symmetric.
3. 역사
de Moivre (드 므와브리)에 의해 1773년 binomial distribution의 근사 (n이 충분히 크고, p가 0또는 1에서 먼 값으로 극단적이지 않아야 함)로서 Normal distribution이 연구되었고,
Pierre Simmon Laplace에 의해 정확한 식이 정의되었음.
그후 Carl Friedrich Gauss에 의해 오늘날 사용되는 일반적인 식으로 정리됨.
$np \ge 5$ 와 $n(1-p) \ge 5$를 만족하는 binomial distribution의 경우 normal distirbution으로 근사가 적절하다고 판정.
$$X \sim \text{Binomial}(n, p) \quad \Rightarrow \quad X \approx \mathcal{N}(\mu = np, \sigma^2 = np(1 - p))$$ 단, binomail distributrion은 discrete이고, normal distribution은 continuous라, 다음의 continuity correction을 취하기도 함: $$P(X \le k) \approx P\left( Z \le \frac{k+0.5-np}{\sqrt{np(q-p)}} \right)$$
Laplace와 Gauss 는 (천문)관측에서의
측정치의 error distribution의 연구에서 Normal distribution을 사용했기 때문에
"Normal law of error"라고도 불림.
Normal distribution 은 측정값에서
mean 주변의 variablity를 잘 설명함.
Francis Galton 등의 공헌과 Central Limit Theorem 덕분에
Normal distribution은 측정값들에 기반한 연구들에서 가장 널리 사용되는 확률분포 로 자리잡음.
- 대부분의 통계처리에서 dependent variable의 population이 normal distribution을 따른다고 가정한다.
- normal distribution을 따른다고 가정할 경우, 수많은 연구들 덕분에 inference를 위한 다양한 방법들이 존재함.
- Cntral Limit Theorem에 의해 population이 normal distribution이 아니더라도
이들의 측정치로 얻어진 sampling distribution은 ideal인 경우 normal distribution이라고 볼 수 있음. ***
2022.03.31 - [.../Math] - [Statistics] Central Limit Theorem
[Statistics] Central Limit Theorem
Central Limit Theorem (중심극한정리) mean의 sampling distribution의 다음과 같은 속성을 기술하는 Theorem. population이 무엇이든지 간에 sample size ($N$, 1개의 sample의 element의 수)가 충분히 크다(흔히 30 or 40이상)
dsaint31.tistory.com
4. 다른 확률분포들과의 관계
binormial distribution에서 시행횟수 n을 무한대로 보내고, 성공확률 p를 0과 1에서 적절히 멀어지게 잡을 경우 normal distribution이 됨.
2023.03.14 - [.../Math] - [Math] Binomial Distribution (이항분포)
[Math] Binomial Distribution (이항분포)
Binomial Distribution (이항분포) :1. 정의 1이 나올 확률(or 성공확률)이 $p$이고, 0이 나올 확률(or 실패확률)이 $1-p$인 Bernoulli trial을 $N$번 반복하는 경우의 성공횟수를 Random Variable $X$라고 할 경우, $X$가
dsaint31.tistory.com
Poisson distribution의 경우엔 mean인 $\lambda$의 크기를 증가시킬 경우, normal distribution이 됨.
2023.10.25 - [.../Math] - [Math] Poisson Distribution (포아송분포)
[Math] Poisson Distribution (포아송분포)
Poisson Distribution이란?아주 가끔 일어나는 사건(trial)에 대한 확률 분포 : 방사선 검출에 주로 사용되는 확률분포라 의료영상에서는 매우 많이 사용됨.전체 인구수에서 연간 백혈병으로 사망 건수
dsaint31.tistory.com
skewed to positive 의 경우 $\log$ 처리를,
skewed to negative 인 경우엔 square처리 (cube 나 그 이상의 exponentiation)를 사용하여
normal distribution과 같이 symmetric shape가 되도록해줌.
5. Python code for Gaussian distribution
NumPy 의 경우, np.random.nromal(0, 1, 1000)
의 경우 Standard Normal Distribution을 따르는 샘플 인스턴스 1000개 가지는 1d array를 반환.
평균이 0이고 표준편차가 1인 standard normal distribution을 그려주는 code.
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats
x = np.arange(-5,5,0.1)
mu = 0.
sigma = 1. # standard deviation
y = scipy.stats.norm.pdf(x=x, loc=mu, scale = sigma)
plt.plot(x,y, color='blue')
plt.show()
같이 보면 좋은 자료들
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] Factorial(계승), Permutation (순열) & Combination (조합) (2) | 2024.02.04 |
---|---|
[Math] Cartesian Product (or Descartes Product, Product Set) (0) | 2024.02.04 |
[Math] Euler's Number (자연상수, 오일러 수) / Euler's Identity (0) | 2023.10.25 |
[Math] Poisson Distribution (포아송분포) (2) | 2023.10.25 |
[Math] Derivative of Logistic Function (0) | 2023.09.25 |