標籤:orm bin lte 不能 使用 can and sid use
Ref:
https://onlinecourses.science.psu.edu/stat464/print/book/export/html/4
使用非參數方法的優勢:
1. 對總體分布做的假設少,所以總體分布未知也可以;
2. 容易做;
3. 一般對離群值更具魯棒性robust;
4. 適用於資料中包含ranks, ordinal or categorical的。
In a skewed distribution, the population median, η, is a better typical value than the population mean μ.
Sign-test / Binomial-test:
下面是一個執行個體:
這個執行個體,我們先用t-test。做的假設是,資料為常態分佈,所以使用t-statistics,檢驗的是均值μ。
然後,考慮到資料是有偏的,我們使用中值median,然後用sign-test。
Solution:這樣計算的機率是p值。如此,我們不能拒絕原假設。
當資料量大時:
If np ≥ 10 and n(1 - p) ≥ 10, we can use the Normal distribution to approximate the Binomial.
然後可以使用z-score。注意,此時方差和均值的取值。後面假設檢驗的部分與lec2中內容一致。
求信賴區間:
Type I error是錯誤拒絕原假設;Type II error是錯誤接受原假設。
The significance level of the test is α = P(Type I error)
Power = 1 - P(Type II error)
如果兩個test的α相等,那麼power大的那個更好。
在實際操作中,使用R語言的包BSDA
SIGN.test(x, md = 0, alternative = "two.sided", conf.level = 0.95)# x - is the object where you store your data# md - the hypothesized median (default is 0)# alternative - either "two.sided", "greater", or "less than"# conf.level - the desired confidence level.
Applied Nonparametric Statistics-lec3