Probability
- experiment: ๊ฐ๋ฅ์ฑ์ด ์๋ ๊ฒฐ๊ณผ ํ ์ธํธ๋ฅผ ๋ง๋ค์ด๋ด๋ ๊ณผ์
- sample space S: experiment์ ๊ฐ๋ฅ์ฑ์๋ ๊ฒฐ๊ณผ์ ์ธํธ
- event E: experiment์ ํน์ ํ ๊ฐ์ง ๊ฒฐ๊ณผ
- p(s): probability of an outcome s
0 <= p(s) <= 1 // p(s)์ ํฉ = 1์ ๋ง์กฑํ๋ ์ซ์ -> ํ๋ฅ
- probability of an event E: experiment์ ๊ฒฐ๊ณผ๋ค์ ํ๋ฅ ์ ํฉ
P(E) = p(s)์ ํฉ = 1 - p(E^C)
- random variable V: ํ๋ฅ ๊ณต๊ฐ์ ๊ฒฐ๊ณผ์ ๋ํ numerical function
- expected value of a random variable V
E[V] = p(s) * V(s)์ ํฉ
Probability vs. Statistics
- ํ๋ฅ ์ ๋ฏธ๋ ์ฌ๊ฑด์ ๋ํ ๊ฐ๋ฅ์ฑ์ ์์ธกํ๋ ๊ฒ์ ๋ค๋ฃธ
- ํต๊ณ๋ ๊ณผ๊ฑฐ ์ฌ๊ฑด์ ๋น๋์ ๋ํด ๋ถ์, ์ค์ ์ธ๊ณ์ ๋ํ ๊ด์ธก์ ํฉ๋ฆฌํํ๋ ๋ฐ ์ฌ์ฉ๋จ
Compound Events and Independence
- independent (๋
๋ฆฝ): ๋ค์ ์กฐ๊ฑด์ ๋ง์กฑํ๋ event 2๊ฐ
Conditional Probability P(A|B)
- ์ ์: B์ฌ๊ฑด์ด ์ผ์ด๋ฌ์ ๋ A์ฌ๊ฑด๋ ์ผ์ด๋ ํ๋ฅ
- A์ B๊ฐ ๋
๋ฆฝ์ผ ๋, P(A|B) = P(A)
Bayes Theorem
- ์์กด๊ด๊ณ์ ๋ฐฉํฅ์ ๋ฐ๊ฟ ๋ ์ด์ฉ
- ์ฌ์ ํ๋ฅ ๋ก๋ถํฐ ์ฌํํ๋ฅ ์ ๊ตฌํ ์ ์์
Ex) B: ์คํธ ์ด๋ฉ์ผ์ธ ์ฌ๊ฑด / A: ์ด๋ฉ์ผ์ธ ์ฌ๊ฑด
๋ฐ์ ์ด๋ฉ์ผ์ด ์คํธ ์ด๋ฉ์ผ์ผ ํ๋ฅ ์ ๊ตฌํ ๋ ์ด์ฉ
- P(A), P(B)๋ ๊ฐ๊ฐ์ ์ฌ๊ฑด์ ์ฌ์ ํ๋ฅ ์ด๋ค.
- ์ฌํ ํ๋ฅ ์ ๊ตฌํ๊ธฐ. ์ด๋ ค์ฐ๋ฏ๋ก approximation ~ naive Bayesian ์ด์ฉ
Distributions of Random Variables
- Random variables: ๊ฐ๊ณผ ํ๋ฅ ์ด ๊ฐ์ด ๋ฑ์ฅํ๋ ์์น์ ํจ์
- Probability density functions (pdfs): ํ์คํ ๊ทธ๋จ ๋ฑ์ผ๋ก RV๋ฅผ ๋ํ๋
- Cumulative density functions (cdfs): running sum of the pdf
- pdf์ cdf๋ ๋์ผํ ์ ๋ณด๋ฅผ ๊ฐ๊ณ ์๋ค.
- cdf๋ ์ฑ์ฅ๋ฅ ์ ๋ํ ์๋ชป๋ ์๊ฐ์ ์ ๋ฌํ ์ ์๋ค. -> ์์ฒญ ๋น ๋ฅด๊ฒ ์ฑ์ฅํ๋ ๊ฒ์ผ๋ก ๋ณด์ด๋, pdf๋ก ํ์ธํ ๊ฒฝ์ฐ ๊ฐ๋ณ ์ฐ๋๋ณ ์ฑ์ฅ๋ฅ ์ด ๊ทธ๋ ๊ฒ ๋์ง ์์ ์ ์์.
Descriptive Statistics
- Central tendency measures: ์ค์ฌ์ ์ฃผ๋ณ์ ๋ถํฌํ ๋ฐ์ดํฐ๋ฅผ ์ค๋ช
- Variation or variability measures: ๋ฐ์ดํฐ๊ฐ ํผ์ ธ์๋ ์ ๋๋ฅผ ์ค๋ช
Centrality Measure
(Arithmatic) Mean
- ์ฅ์ : outlier๊ฐ ์๋ symmetric distribution์์ ์๋ฏธ ์๊ฒ ์ฌ์ฉ ๊ฐ๋ฅ (ex. ํค, ๋ชธ๋ฌด๊ฒ ๋ฑ์ ์ ๊ท๋ถํฌ)
median: middle value
- skewed distribution
- outlier๊ฐ ์๋ ๋ฐ์ดํฐ
- ๋ถ, ์์ ๋ฑ
mode: ๊ฐ์ฅ ์์ฃผ ๋ํ๋๋ ์์
- ์ค์์ ๊ฐ๊น์ง ์์ ์ ์๋ค.
geometric mean: nth root of the product of n values
- geometric mean์ ํญ์ arithmetic mean๋ณด๋ค ์๊ฑฐ๋ ๊ฐ๋ค.
- 0์ ๊ฐ๊น์ด ๊ฐ๋ค์ ๋ ๋ฏผ๊ฐํ๋ค.
- ratio์ mean์ ๊ตฌํ ๋ ์ฌ์ฉ
Aggregation as Data Reduction
- feature์ ๊ฐ์๊ฐ ์๋ ๊ทธ๋ฅ ๋ฐ์ดํฐ์ ์๋ฅผ ์ค์ด๋ ๊ฒ
- train, test set ๋๋ ๋ ์ ์ํ์ง ์์ผ๋ฉด ํธํฅ๋ ์ ์์.
Variance Metric: Standard Deviation
- Variance: standard deviation sigma์ ์ ๊ณฑ
- population SD: n์ผ๋ก ๋๋
- sample SD: n-1๋ก ๋๋
- n์ด ์์ฃผ ์ปค์ง๋ฉด n ~ (n-1) ์ด๋ฏ๋ก ํฐ ๋ฌธ์ ๊ฐ ๋์ง ์์
- hat: sample์ ์๋ฏธํจ
- ํ๊ท ๊ณผ ํ์คํธ์ฐจ๋ฅผ ๊ฐ์ง๊ณ ๋ถํฌ๋ฅผ ํน์ ์ง์ ์ ์๋ค.
Parameterizing Distributions
- ๋ฐ์ดํฐ๊ฐ ์ด๋ป๊ฒ ๋ถํฌํด์๋์ง์๋ ์๊ด์์ด, ์ต์ํ 1-1/k^2๋ฒ์งธ ์ ์ ํ๊ท ์ k sigma ์์ชฝ์ ์์ด์ผ ํ๋ค.
- ์ต์ํ 75%๋ ํ๊ท ์ 2 sigma ์์ชฝ์ ์๋ค.
- Power law์ ๊ฒฝ์ฐ์๋ ํฐ ์๋ฏธ๊ฐ ์๋ค. (skewed data)
- signal to noise ratio๋ฅผ ์ธก์ ํ๋ ๊ฒ์ ์ด๋ ต๋ค. -> sampling error, measurement error์ ์ํ ์ ํํ์ง ์์ ๋ถ์ฐ
Batting Average - Interpreting Variance
- 3ํ ํ์์ฌ๋, 2ํ 7ํผ 5๋ฆฌ ์ดํ์ ์ฑ์ ์ ๋ณด์ผ ๊ฐ๋ฅ์ฑ์ด 10%๋ ๋๊ณ , 3ํ 2ํผ 5๋ฆฌ ์ด์์ ์ฑ์ ์ ๋ณด์ผ ๊ฐ๋ฅ์ฑ๋ 10%๋ ๋๋ค.
Correlation Analysis
- correlation coefficient r(X, Y): Y๊ฐ X์ ํจ์์ธ ์ ๋๋ฅผ ์ธก์ ํ๋ค.
- -1~1์ฌ์ด์ ๊ฐ์ ๊ฐ๋๋ค.
-1: anti-correlated
1: fully-correlated
0: uncorrelated
Pearson Correlation Coefficient
- ๋ถ์ = covariance
r^2
- X์ ์ํด ์ค๋ช ๋๋ Y์ ๋น์จ์ ๋ํ๋ธ ์งํ
Variance Reduction & r^2
- good linear fit f(x)๊ฐ ์์ ๋, ์์ฐจ d = y - f(x)๋ y์ ๋นํด์ ๋ ๋ฎ์ ๋ถ์ฐ์ ๋ณด์ผ ๊ฒ์ด๋ค.
- 1-r^2 = V(d)/V(y)
- ex. r = 0.94์ผ ๋, 88.4%์ V(y)๋ฅผ ์ค๋ช ํ ์ ์๋ค.
Significance
- ์ผ๋ง๋ ์ ์ํ๋~
- sample size, r ๋ชจ๋ ์ค์ํจ
- p value < 0.05 (์ฐ์ฐํ ๋ณด์์ ํ๋ฅ ์ด 5% ๋ฏธ๋ง์ด๋ค)
- ์์ ์๊ด๊ด๊ณ๋ sample size๊ฐ ์ถฉ๋ถํ ํฌ๋ฉด ์ ์ํด์ง ์ ์์
- permutation test: X๋ฅผ ๋๊ณ Y๋ฅผ ์์ด์ ๊ณ์ฐ -> ๋ง๋ฒ ๊ณ์ฐ ํ ์ฐ๋ฆฌ๊ฐ ๊ถ๊ธํ r(X, Y)๊ฐ ์์ ๋ช % ์์ ์๋ ํ์ธํ๋ ๋ฐฉ๋ฒ
Spearman Rank Correlation
- disordered pair์ ์๋ฅผ ์ธ๋ ๋ฐฉ๋ฒ
- ๋ฐ์ดํฐ๊ฐ ์ง์ ์ ์ผ๋ง๋ ์ ๋ง๋์ง ํ์ธํ๋ ๊ฒ์ด ์๋
=> non-linear relationship, outlier์ ๊ฐ์
- ๊ณ์ฐ ๋ฐฉ๋ฒ
- Pearson correlation rank์ด๋ฏ๋ก ๋ฒ์๊ฐ -1~1 ์ฌ์ด
Correlation vs. Causation
- Correlation์ด causation์ธ ๊ฒ์ ์๋๋ค.
- causation: ์์ธ->๊ฒฐ๊ณผ์ธ ๋ฐฉํฅ์ด ์๋ ์ ๋ณด
Autocorrelation and Periodicity
- time-series data ์ค ์ข ์ข cycle์ ๋ณด์ด๋ ๋ฐ์ดํฐ
- lag-k autocorrelation ๊ณ์ฐ์ O(n)์ด์ง๋ง, Fast Fourier Transform(FFT)๋ฅผ ์ด์ฉํ๋ฉด O(nlogn)์ ๊ณ์ฐ ๊ฐ๋ฅ
- shifting์ ์ด์ฉํ์ฌ correlation์ ํ์ = ์ฆ, ์ฃผ๊ธฐ์ฑ ํ์
Logarithms
- ์ ์: inverse exponential function
- ์ปดํจํฐ์ ์ฐ์ฐ ๋ฌธ์ ๋๋ฌธ์ logarithm์ ์ด์ฉํ๋ ๊ฒ์ด ๋ ํจ์จ์ ์ด๋ค.
- ๋น์จ์ ๊ทธ๋ฅ ๋น๊ตํ๋ ๊ฒ์ ์์ฒญ๋ ์ฐจ์ด๋ฅผ ๋ณด์ผ ์ ์์ผ๋ ๋น์จ์ ๋ก๊ทธ๋ฅผ ์ทจํด์ ๋น๊ตํ ๊ฒฝ์ฐ equal displacement๋ฅผ ๋ณด์ธ๋ค.
- power law์์ ๋ก๊ทธ๋ฅผ ์์์ ๋น๊ตํ๋ ์ด์ .
Normalizing Skewed Distributions
- logarithm์ ์ด์ฉ: power law, ratio ๋ฑ์ ์ด์ฉํ์ฌ ์ ๊ทํ ๊ฐ๋ฅ