> For the complete documentation index, see [llms.txt](https://ykkim.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ykkim.gitbook.io/wiki/machine-learning/probability-and-statistics-for-machine-learning/frequentist-methods.md).

# Frequenist Methods

#### Frequentist school of statistics

**Introduction**

* 베이지안 통계 다음으로 등장한 통계학파
* 20세기에 지배적인 학파였음
* confidence intervals, p-values, t-test, x^2-test가 이에 해당됨
* 컴퓨터의 등장 이후로는 bayesian method가 가장 보편적인 방법이 됨

**The fork in the road**

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-392a058cb1c19bba3dd10dad1f9229c1f7d2b711%2Fbayesian_frequentist_path.png?alt=media)

* Bayesian inference: 지금까지 공부했던 방법
  * H가 hypothesis, D가 data
  * prior를 확실히 안다면 정확하게 작동함: 그러나 실제로 완벽한 prior는 없음

    **-> Bayesian은 prior, Frequentist는 likelyhood func.을 사용함**

**What is probability?**

* Frequentist
  * 고정 값을 가진 파라미터의 확률 분포를 무의미하다고 생각함, 가설에 대한 신뢰도를 정량화하기 위해 확률 사용을 거부함
    * ex) 동전을 던졌을 때 앞면이 나올 확률 1/2 -> 동전을 던지는 횟수가 무한대로 갈수록 1/2에 가까워짐
  * 가설이 주어진 데이터에 확률 분포(랜덤, 반복 가능, 실험적)를 적용함
* Bayesian
  * 고정된 파라미터에 대해 불완전한 지식을 설명하기 위해 확률을 사용함
  * 모든 것(가설, 데이터)에 확률 분포를 적용함

***

#### Null Hypothesis Significance Testing 1

**Introduction**

* Neyman-Pearson 패러다임을 주로 사용함

  * ex) 동전을 10번 던졌을 때 앞면이 나오는 횟수

  <img src="https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-ae92e3e5ececab30ee344ba513d4526a8c946aa3%2FNull_hypothesis.png?alt=media" alt="Null_hypothesis" data-size="original">

**Types of error**

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-38b8f7e76f727e5a7a2d0d6382a5166afca9be91%2Ftypes_of_error.png?alt=media)

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-60e5338da15aba7e9151bc1f41498ce829a9714f%2Fsignificance_level.png?alt=media)

**Composite hypothesis**

ex) 동전을 던졌을 때 나올 수 있는 앞면의 개수의 평균

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-5694eb0db495d0580c8dcd6c7a83cc8b3daf522b%2Fcomposite_hypothesis.png?alt=media)

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-ab7d225f689d129fc7ac4982a4cded72907fb901%2Fcomposite_hypothesis_power.png?alt=media)

**Null distribution:**

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-1dd7065286f9c2c19b5505dae01316ab0ec3b5aa%2Fnull_distribution.png?alt=media)

**High and low power test**

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-cbb811c21ac1135aa9d5722b9d66e303b122a453%2Fhigh_low_power_test.png?alt=media)

* both standard normal
* High power: 높은 검정력
* Low power: 낮은 검정력

**Designing a hypothesis test**

* Pick the null hypothesis H0.
* Decide if HA is one-sided or two-sided
* Pick the test statistic.
  * ex) z-test, t-test, x^2-test
* Pick a significance level and determine the rejection region
  * ex) 0.1, 0.05, 0.001
* Determine the power

**Critical values**

ex) critical value = 0.05

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-eb84ce9520e4083aadeb25884565afcbd266789a%2Fcritcal_values.png?alt=media)

**p-values**

* reject region의 면적

ex) IQ의 normal distribution = N(100, 15^2)

9명의 학생들의 평균 IQ가 112일 때 신뢰수준 0.05로 H0을 reject할 수 있는가?

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-8036575a9f109504119e432d2bd94ec414d698e2%2Fp_value_ex.png?alt=media)

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-cd0dca15d9ccaf72f33ac4acc3a50ee63bfe1161%2Fp_value_ex_2.png?alt=media)

![](https://3698175758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAwtzMy_pbrChIExFtN%2Fuploads%2Fgit-blob-cc3a732381a2bc8a1c9b22923b823ce69baf6495%2Fp_value_ex_3.png?alt=media)

reject H0

+예시
