2017-06-15 26 views
-1

您好,我正在嘗試對t-student方法有一個更好的理解。當兩個樣本有0個方差時T-student

我有給我解答了10個問題,因爲這樣的兩個distincts組:

其規模從1到5,你有多少......

  1. 組1每個問題回答1。
  2. 第2組每回答5個問題。

我想說,在小組答案中存在顯着差異,並選擇使用t-student。以下是我迄今所做的:從第1組和第2組

Sum of group 1 answers : 10 
Sum of group 2 answers : 50 
Avg1 : Average score group 1 = 1 
Avg2 : Average score group 2 = 5 

SS1 : Sum square of answers from group 1 = 10 
SS2 : Sum square of answers from group 2 = 250 
SD1 : Sum Square of deviation of group 1. (SS1 - Sum of group 1 answers²/10 = 0. 
SD2 : Sum Square of deviation of group 2, (SS2 - Sum of group 2 answers²/10 = 0. 

問題是獨立的。

我再奮鬥來計算計算負擔,因爲我使用的公式如下:

t = (Avg1 - Avg2)/Root((SD1+SD2)/(10+10-2) * (1/10 + 1/10)) 

而且我有一個空分母值。

有人能幫我理解我的錯誤嗎?

回答

0

學生的t檢驗比較兩組的平均值,根據標準誤差。簡單來說,一個t檢驗會問「他們有多少標準差錯?」

問題是你的組的標準偏差爲0,這意味着你的標準誤差爲0.學生的t檢驗作出了一些數學假設,其中之一是至少有一些在你的數據中傳播(否則,你可能不會做一個測試!)

所以不,這不是你的t檢驗計算中的任何錯誤的結果,它只是你的數據。

也許替代方案可能是卡方檢驗,並將數據簡化爲明確。下面是它會是什麼樣子在R:

data <- matrix(c(10,0,0,10), nrow=2, ncol=2) 
rownames(data) <- c("group 1","group 2") 
colnames(data) <- c("low","high") 

data 
##   low high 
## group 1 10 0 
## group 2 0 10 

chisq.test(data) 
## 
## Pearson's Chi-squared test with Yates' continuity correction 
## 
## data: data 
## X-squared = 16.2, df = 1, p-value = 5.699e-05 

微小的p值(0.000057),告訴你什麼你已經知道 - 有兩組之間調查答覆的比例有很大的區別。

+0

非常感謝您的解釋! –