中位数比平均值还公平吗?
我最近阅读了有关建议,您通常不应使用中位数来消除异常值。示例:以下文章 http://www.amazon.com/Forensic-Science-Introduction-Scientific-Investigative/product-reviews/1420064932/ 目前有16条评论: review= c(5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 3, 2, 1, 1) summary(review) ## "ordinary" summary Min. 1st Qu. Median Mean 3rd Qu. Max. 1.000 3.750 5.000 4.062 5.000 5.000 因为他们使用平均数,所以该文章获得4星,但是如果使用中位数,它将获得5星。 中位数不是“更公平”的法官吗? 实验表明,中位数误差始终大于平均值。中位数更糟吗? library(foreach) #the overall population of bookjudgments n<-5 p<-0.5 expected.value<-n*p …