Hypothesis-Testing

如果任何參數檢驗不拒絕空值,那麼它的非參數替代方法是否也一樣?

  • August 29, 2013

如果假設非參數檢驗的功效比它們的參數替代品低,這是否意味著如果任何參數檢驗不拒絕零,那麼它的非參數替代品也不會拒絕零?如果不滿足參數測試的假設並且仍然使用測試,這將如何改變?

如果參數檢驗未能拒絕原假設,那麼它的非參數等價物肯定仍然可以拒絕原假設。就像@John 所說,這通常發生在違反使用參數測試的假設時。例如,如果我們將兩樣本 t 檢驗與 Wilcoxon 秩和檢驗進行比較,那麼如果我們在數據中包含異常值(對於異常值,我們不應使用兩樣本檢驗),就會發生這種情況。

#Test Data
x = c(-100,-100,rnorm(1000,0.5,1),100,100)
y = rnorm(1000,0.6,1)

#Two-Sample t-Test
t.test(x,y,var.equal=TRUE)

#Wilcoxon Rank Sum Test
wilcox.test(x,y)

運行測試的結果:

> t.test(x,y,var.equal=TRUE)

   Two Sample t-test

data:  x and y 
t = -1.0178, df = 2002, p-value = 0.3089
alternative hypothesis: true difference in means is not equal to 0 
95 percent confidence interval:
-0.6093287  0.1929563 
sample estimates:
mean of x mean of y 
0.4295556 0.6377417 

> 
> wilcox.test(x,y)

   Wilcoxon rank sum test with continuity correction

data:  x and y 
W = 443175, p-value = 5.578e-06
alternative hypothesis: true location shift is not equal to 0 

引用自:https://stats.stackexchange.com/questions/68717

comments powered by Disqus