R語言-配對T檢驗【程】

excel中整理數據


R語言-配對T檢驗【程】 - 瑞麟 - 瑞麟醫生

另存為


R語言-配對T檢驗【程】 - 瑞麟 - 瑞麟醫生

R語言界面

HVA<-read.table(file=file.choose(),header=T)
chaHVA<-HVA$preHVA-HVA$postHVA
t.test(chaHVA,alternative="greater")

============直接輸入

x<-c(20.15,24.07,15.23,21.24,25.54,26.57,19.12,14.64,21.6,16.98)
y<-c(4,1.65,7,1.5,4,5.69,13,4.53,1.2,0.1)
t.test(x-y,alternative="greater")
One Sample t-test
data: x - y
t = 8.5903, df = 9, p-value = 6.239e-06
alternative hypothesis: true mean is greater than 0
95 percent confidence interval:
12.78001 Inf
sample estimates:
mean of x
16.247

=======================

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容