Hypothesis testing, Null hypothesis, Alternative hypothesis, p-value
통계적으로 다양한 가설을 세울 수 있다. (평균, 분산, model fitness 등)
이 글에서는 모평균에 대한 가설과 그 검정방법을 소개한다.
Hypothesis
Null Hypothesis (
- 초기에 설정하는 가설.
- 효과가 없거나 차이가 없다는 주장을 담는다.
Alternative Hypothesis (
- 귀무가설과 대조(opposite)되는 가설.
- 귀무가설이 틀렸다는 것을 보여주기 위해 사용된다.
- 보통 대립가설이 "주장"이 되는 경우가 많다.
모평균(
two-sided set of hypothesis:
one-sided set of hypothesis:
one-sided set of hypothesis:
Interpretation of p-value
type I error (제 1종 오류):
type II error (제 2종 오류):
※ 좀 더 본질적인 통계학자의 시각은 not reject ≠ accept 이고 기각을 유보하는 것에 더 가깝다. 그러나 여기(학부 수준 textbook)에서는 not reject = accpet로 간주한다.

significane level (
※ 과학적 가설의 관점에서 바라보면, false discovery를 더욱 경계할 것이다. 따라서 textbook에서는 type 1 error를 더 관심을 가지고 살펴보게 된다.
※ type I error와 type II error를 동시에 줄이는 방법은 존재하지 않는다. false discovery를
p-value:
- p-value가 크면, 내 데이터셋이
에서 발생할 법하다(likely to happen)는 뜻이다. - p-value가 크다고 해서
가 true라는 뜻은 아니다. ( 가 true일때~ 이므로) - p-value가 작으면,
가 less plausible하다는 뜻이다. - p-value가 작다는 건,
가 not plausible하다는 증거(evidence)는 있지만, 압도적이지는 않다.(not overwhelming) - p-value가 크다/작다의 비교 대상은
이다. (아래 자세히 설명)
Calculation of p-values
two-sided t-test
testing
이때 p-value=
이때
one-sided t-test
testing
p-value=
이때
testing
p-value=
이때

※ 가설검정의 다른 방법은 네이만-피어슨 가설 검정이다. 수리통계학과 같은 고급 과목에서 소개하며 보다 더 수학적으로 검정력을 계산하는 접근법이다. (확률적 기각?)
※ 그러나 후대에 오면서 피셔의 검정법과 네이만-피어슨의 검정법이 섞인 방법이 학부 통계에서 배우는 검정법으로 보인다. (p-value와
Significance Levels (유의수준)
사실 귀무가설의 기각/채택은
Decision Process
p-value <
p-value >
(p-value 계산 방법은 위에 설명)
size
testing
에서 test statistics
confidence interval과 hypothesis testing간의 관계에서 연결고리를 찾을 수 있다. 신뢰도가 (

마찬가지로, one-sided testing에서도 동일한 결과를 얻을 수 있다.
testing
- test statistics:
- Rejection region:
( 와 같은 부등호 방향) - Acceptance region:
- Confidence interval:
가 위 신뢰구간에 존재하면, p-value > 이므로, accept
testing
- test statistics:
- Rejection region:
( 와 같은 부등호 방향) - Acceptance region:
- Confidence interval:
가 위 신뢰구간에 존재하면, p-value > 이므로, accept
Power of hypothesis test (검정력)
power는
※

-Tests
z-statistic:
testing
- test statistics:
- p-value =
- Rejection region:
- Acceptance region:
- Confidence interval:
가 위 신뢰구간에 존재하면, p-value > 이므로, accept
testing
- p-value =
- Rejection region:
- Acceptance region:
- Confidence interval:
가 위 신뢰구간에 존재하면, p-value > 이므로, accept
testing
- p-value =
- Rejection region:
- Acceptance region:
- Confidence interval:
가 위 신뢰구간에 존재하면, p-value > 이므로, accept