데이터분석

Sheet 구성

구분내용시트
사전-사후 비교 : 프로젝트표본통계량, 데이터의 대표값, 분포값, 표준오차, 대응표본 t검정D01
사전-사후 비교 : 템플릿표본통계량, 데이터의 대표값, 분포값, 표준오차, 대응표본 t검정D02
				
					> pretest <-c(29.64,212.93,23.4,1371.78,9.53,7.93,27.53,195.6,613.8,784.8,1095.92,9.8,73.78,611.3,1316.63,96.08,442.33,2286.72,522.64,1298.88,3.2,55.33)
> posttest <-c(904.17,27.17,74.63,634.35,55.94,70.04,273.28,584.09,1429.83,534.59,1708.14,1052.09,408.76,58.5,1002.38,2536.46,2163.4,3287.69,156.77,1723.9,4.33,339.73)
> t.test(pretest, posttest, paired = TRUE, alternative = "two.sided")
				
			

데이터분석 결과

Paired t-test

data: pretest and posttest
t = -2.2664, df = 21, p-value = 0.03412
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval: -692.13986 -29.74105
sample estimates:
mean of the differences -360.9405

				
					> library(ggpubr)
> mc<-read.csv(file='d:/mc.csv')
> compare_means(mc~group,data=mc,paired=TRUE) 
> ggpaired(mc,x="group",y="mc", color = "group",line.color="gray",line.size=0.4)+stat_compare_means(paired=TRUE)
				
			

데이터분석 결과

# A tibble: 1 x 8
.  y .  group1  group2 p                      p.adj           p.format p.signif method
1 mc before   after     0.0000477 0.000048 4.8e-05     **** Wilcoxon

				
					pretest = [29.64,212.93,23.4,1371.78,9.53,7.93,27.53,195.6,613.8,784.8,1095.92,9.8,73.78,611.3,1316.63,96.08,442.33,2286.72,522.64,1298.88,3.2,55.33]
posttest = [904.17,27.17,74.63,634.35,55.94,70.04,273.28,584.09,1429.83,534.59,1708.14,1052.09,408.76,58.5,1002.38,2536.46,2163.4,3287.69,156.77,1723.9,4.33,339.73]
import scipy.stats
scipy.stats.ttest_rel(pretest, posttest)
				
			

데이터분석 결과

Ttest_relResult(statistic=-2.266359014537293, pvalue=0.034116739156765025)