当两个样本有0个方差时,T学生

时间:2017-06-15 08:24:00

标签: statistics average mean

您好我正在尝试更好地了解t-student方法。

我有两个不同的小组,它给了我10个问题的答案:

  

从1到5的等级,你有多少......

  1. 第1组每回答一个问题。
  2. 第2组每回答5个问题。
  3. 我想说团体答案存在显着差异,并选择使用t学生。这是我到目前为止所做的:

    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.
    

    第1组和第2组的问题是独立的。

    然后我努力计算t,因为我使用的公式如下:

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

    我有一个零分母值。

    有人可以帮助我理解我的错误吗?

1 个答案:

答案 0 :(得分: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)告诉你你已经知道的事情 - 各组之间的调查反应比例有很大差异。