[AI]/Data Science Fundamentals(14)
-
Statistic(2) - Hypothesis Test(2)
Key Points T-Test Condition 독립성 : paired?(cat or cat v.s. cat or dog) 등분산성 : similar variance? 정규성 : normally distributed? Non parametric methods (대표 : Chisquare) Categorical data 극단적 outlier 있는 경우 ANOVA test t-test in many groups [Chisquare Test] [One sample Chisquare test] # H0 : distribution is similar (고루게 분포해 있다) # H1 : distribution is not similar (고루게 분포해 있지 않다) # chi_square_value = sum((o..
2021.01.30 -
Statistic(3) - Confidence Level
Key Points Law of large numbers sample size가 커질수록 모집단의 모수와 같아짐 Central Limit Theorem sampling 횟수가 많을수록 (+sample size) sample data의 평균은 정규분포에 근사 Confidence Interval 모수가 실제로 포함될 것으로 예측한 범위 Standard Error of Mean 모집단 평균 추정 [Standard error of mean] std/ sqrt(n) CI = t.interval(0.95,df,loc=mean,scale=stderr) # ==> returns lower & upper limit [모집단 평균 추정] 샘플링 데이터를 통해 confidence interval 구함 # H0 : pop_m..
2021.01.30 -
Statistic(4) - Bayesian
Key Points Frequentist view 상대도수로 정의 상대도수 : 사건이 무한 반복 가능할 때, 관심 있는 사건의 빈도 전제 : 사건이 무한 반복해야 함 공식 특정값발생횟수전체시행횟수 특정값 발생 횟수 / 전체 시행 횟수 Bayesian view 확률은믿음의 정도로 해석 내가 가지고 있는 사전정보(prior)을 바탕으로 아직 일어나지 않은 사건에도 확률을 부여함 (posterior) prior개념 주관적인 관점 증거 or 개인적인 판단 사건이 발생하지 않았고 무한히 발생하지 않더라도 설득력 있는 확률값을 줌 [Bayesian]
2021.01.30 -
[Statistic (Summary)] T-test & $\chi^2$-test
T Test One sample t-value: \begin{equation} \frac{\bar{x}-\mu}{\frac{s}{\sqrt{n}}} \end{equation} df = n-1 Two sample t-value (assume equal population variance & std) \begin{equation} \frac{\bar{x_1}-\bar{x_2}}{\sqrt{\frac{s_p^2}{n_1}+\frac{s_p^2}{n_2}}} \end{equation} where $s_p^2$ : \begin{equation} \frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n1+n2-2} \end{equation} df = $n_1$ + $n_2$ -2 (assume unequal ..
2021.01.30 -
Linear Algebra(1) - Vector/Matrix
Key points Vector/Matrix matrix : 기본적으로 2D array 를 사용해야 됨 (대괄호가 바깥에 하나 더 있다고 생각하자) concept transpose identity diagonal upper/lower inverse dot product magnitude determinant [transpose] $a^T$ # a 라는 np.array가 있다고 가정 a.T # ==> returns transpose of 'a' [Identity] $I$ np.identity(n) # ==> returns n by n identity matrix [inverse] $a^{-1}$ # a 라는 np.array가 있다고 가정 np.linalg.inv(a) # ==> returns inverse..
2021.01.30 -
Linear Algebra(2) - Span/Basis/Linear Projection
[Linear Algebra +] Key points covariance/correlation coefficient span basis rank project $\vec{a}$ onto $\vec{b}$ 개념 orthogonality unit vectors Gaussian Elimination [Covariance/Correlation Coefficient] $Variance = \frac{\sum(X-\bar{X})^2}{N}$ # A 라는 array가 있다고 가정 A.var(ddof=) # population : ddof = 0 / sample : ddof = 1 ==> # returns variance of 'A' $Standard \ Deviation = \sqrt{Var(X)}$ # A 라는 a..
2021.01.30