【Statistics】HYPOTHESIS TEST(SIGNIFICANCE TEST)

本文着重梳理 假設檢驗 HYPOTHESIS TEST(SIGNIFICANCE TEST),通過 邏輯性知識概念性知識 兩部分釐清該重點內容。

1.Logic of Hypothesis Test

0) What’s hypothesis test?

If we have some doubt in the origin hypothesis or assumption, then we can raise a hypothesis test to prove our doubt or said reject the origin hypothesis.

For example:

Then, we introduce some new concepts on hypothesis:

  • H0H_0 (Null hypothesis): Something we doubt.

  • HaH_\text{a} (Alternative hypothesis): Our guess, or said the new hypothesis

  • Single-sided and Double-sided Hypothesis :

    • If our new hypothesis is in the form of new hypothesissome numbernew\ hypothesis \neq some \ number, this is a double-sided hypothesis ;
    • If our new hypothesis is in the form of new hypothesissome numbernew\ hypothesis \leq some \ number or new hypothesissome numbernew\ hypothesis \geq some \ number, this is a double-sided hypothesis.

PAY ATTENTION: All the hypothesis is aimed at testing the population parameter.


1) Set up Hypothesis

To set up a Null Hypothesis, we can just need to figure out what is the concerned problem. Or said the feature of null hpothesis is that there is no news if the null hypothesis is actually true.

To set up a lnternative Hypothesis, we use the number of null hypothesis and then choose single-sided or double-sided hypothesis to set up our internative hypothesis.


2) Set up Significance level

PAY ATTENTION: Before we carry out the calculation, we need to set up a significance level. It is an ethical problem if we set up a significance level to suit our calculation result in order to generate a attracting conclusion.


3) Take Sample and Calculate


4) Make Conclusion


2.Concepts of Hypothesis Test

1) What’s p-value and significance level?

  • pvaluep-value: It is a probability that current sample statistic occur.

P(observe current sample statisticH0 is True) P(observe\ current\ sample\ statistic |H_0 \ is \ True)

  • α\alpha: We call it significance level. It is a thresold that quantify the word “extreme”. In ohter words, it’s a relatively small probability that indicates whether the pvaluep-value is small enough that shake our belief on H0H_0.

  • $power $: It is a probability that not making Type II error

P(rejecet H0H0 is false)=1P(not rejecet H0H0 is false)=P(not making Type II error) P(rejecet\ H_0|H_0 \ is \ false) = 1 - P(not \ rejecet\ H_0|H_0 \ is \ false) = P(not\ making \ Type \ II \ error)


2) Type I Error & Type II Error

i) Understanding the concepts

Meaning of Type I Error :The origin hypothesis (H0H_0) is actually True, but due to some extreme event happens (pvalue<αp-value < \alpha), we consider the hypothesis might be wrong and therefore reject it. It is obivous that if the α\alpha is too large, we can easily get a Type I Error.

Meaning of Type II Error:The origin hypothesis (H0H_0) is actually False, but nothing seems to happen (pvalue>αp-value > \alpha), then we consider the hypothesis should be true and therefore accpet it. It is obivous that if the α\alpha is too small, we can easily get a Type II Error. Another way to think of Type II Error is that if we can start from using the concept of powerpower instead of pvaluep-value.

Trade-off problems : There exists a trade-off between Type I Error and Type II Error, which means that we need to set an appropriate α\alpha to “balance” the error probability of these two type of error. Here is an example on trade-off problem:

Employees at a health club do a daily water quality test in the club’s swimming pool. If the level of contaminants are too high, then they temporarily close the pool to perform a water treatment.

We can state the hypotheses for their test as H0H_0 : The water quality is acceptable vs. HaH_\text{a} : The water quality is not acceptable. Consider the following two questions:

  • In terms of safety, which error has the more dangerous consequences in this setting?
  • What significance level should they use to reduce the probability of the more dangerous error?

FROM Khan Academy

What will affect the error probability :

  • Significance level α\alpha: If α\alpha \uparrow, then powerpower \uparrow and P(type I error)P(type \ I \ error)\uparrow
  • Sample size n: If nn \uparrow, then powerpower \uparrow. But it doesn’t impact the likelihood of a Type I error.Larger samples are still preferred since they produce less variable results, but we’ll still reject a true H0H_0 at a rate equal to the significance level αα.
  • Statistic variability : If Statistic variabilityStatistic\ variability \downarrow , then powerpower \uparrow. It suits the intuition as when the statistic variablity is low, the outliner should be easier to figured out, and therefore we can hava higher probability to reject it. But we could not control this variable.
  • Distance from true parameter to H0H_0 : If distancedistance \uparrow , then powerpower \uparrow. It suits the intuition as when the true value far from H0H_0, we can hava higher probability to reject it. But we could not control this variable.

ii) Some associations

  • 看論文經常會接觸到以下的表格,出處正是來自statistics
Table of error types H0H_0 is True(in reality) H0H_0 is False(in reality)
Fail to reject Correct inference Type II error(False Negative)
Reject Type I error(False Positive) Correct inference
  • ROC曲線

3) Z-test and T-test


3.Others

1.Some common ideas between confidence interval and significance test

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章