@banana

ダンゴムシ 5匹

August 01, 2020 · R
mesu<-c(38,83,93,43,98)
osu<-c(18,58,58,28,73)
t.test(mesu,osu,var.equal=TRUE)
shukaku<-c(16,10,14,13,21,20,20,14,18)
hinsyu<-c("K","K","K","S","S","S","H","H","H")
hiryo<-c("A","B","C","A","B","C","A","B","C")
summary(aov(shukaku~hinsyu+hiryo))
taiju<-c(32,21,20,35,25,39,36,38,20,49,32,25,15,42,39)
taiju
esa<-c("X","X","X","X","X","Y","Y","Y","Y","Y","Z","Z","Z","Z","Z")
esa
oneway.test(taiju~esa,var.equal=T)

二元配置分散分析

July 22, 2020 · R
aji<-c(6,4,5,3,2,10,8,10,8,9,11,12,12,10,10,5,4,2,2,2,7,6,5,4,3,12,8,5,6,4)
ondo<-c("r","r","r","r","r","r","r","r","r","r","r","r","r","r","r","j","j","j","j","j","j","j","j","j","j","j","j","j","j","j")
meigara<-c("I","I","I","I","I","B","B","B","B","B","V","V","V","V","V","I","I","I","I","I","B","B","B","B","B","V","V","V","V","V")
summary(aov(aji~ondo*meigara))
id1<-c("P1","P2","P3","P4","P5","P1","P2","P3","P4","P5","P1","P2","P3","P4","P5","P1","P2","P3","P4","P5","P1","P2","P3","P4",
koido<-c(7,8,9,5,6,5,4,7,1,3,8,6,7,2,5)
kamoku<-c("s","s","s","s","s","b","b","b","b","b","t","t","t","t","t")
hito<-c("T","K","D","Y","O","T","K","D","Y","O","T","K","D","Y","O")
summary(aov(koido~kamoku+Error(hito)))
test<-c(15,9,18,14,18,13,8,8,12,7,10,6,11,7,12,10,7,3,5,7)
shido<-c("A","A","A","A","A","B","B","B","B","B","C","C","C","C","C","D","D","D","D","D")
oneway.test(test~shido,var.equal=T)
summary(aov(test~shido))
anova(lm(test~shido))

3つの薬の効き目

July 16, 2020 · R
kusuri<-matrix(c(23,15,12,11,14,23),3,2)
kusuri
chisq.test(kusuri,correct=FALSE)

ダイエット食品

July 16, 2020 · R
mae <- c(59.4, 61.3, 58.8, 60.6, 61.9, 57.3, 57.4, 50)
ato <- c(54.2, 58.8, 56.8, 55.5, 56.5, 52.3, 52.5, 48.1)
t.test(mae,ato,paired=TRUE)

ダンゴムシ

July 16, 2020 · R
mesu <- c(38,83,93,43,98,103,48,53,108,43,73,58,58,83,73,38,93,73,38,48)
osu <- c(18,58,58,28,73,83,38,38,88,33,48,43,43,58,48,18,63,48,28,33)
t.test(mesu,osu,var.equal=TRUE)

B大学

July 16, 2020 · R
bu<-matrix(c(160,120,40,80),2,2)
bu
chisq.test(bu,correct=FALSE)

夕食

July 16, 2020 · R
shokuji<-matrix(c(4,6,11,6,16,11),2,3)
shokuji
chisq.test(shokuji,correct=FALSE)

指の長さ

July 08, 2020 · R
right<-c(5.4,6.5,7.0,6.8,5.5)
right
max(right)
min(right)
left<-c(5.5,6.4,7.1,6.6,5.3)
left
length(left)
var(left)
cor(right,left)
plot(right,left)

数学と統計

July 08, 2020 · R
math<-
c("dislike","dislike","like","like","dislike","dislike","dislike","dislike","dislike","like","like","dislike","like","dislike","dislike","like","dislike","dislike","dislike","dislike")
stat<-
c("like","like","like","like","dislike","dislike","dislike","dislike","dislike","dislike","like","like","like","dislike","like","dislike","dislike","dislike","dislike","dislike")
table(math)
table(stat)
table(math,stat)

散布図

July 08, 2020 · R
stat1<-c(6,10,6,10,5,3,5,9,3,3,11,6,11,9,7,5,8,7,7,9)
stat2<-c(10,13,8,15,8,6,9,10,7,3,18,14,18,11,12,5,7,12,7,7)
shinri<-c(13,14,7,12,10,6,8,15,4,14,9,6,10,12,5,12,8,8,12,15)
plot(stat1,stat2,main="Seiseki",col="blue",pch=22,xlim=c(5,8))
plot(shinri,stat1)
plot(shinri,stat2)
cor(stat1,stat2)
cor(shinri,stat1)
cor(shinri,stat2)

ヒストグラム

July 08, 2020 · R
 height <-
 c(161.6, 178.2, 169.8, 161.7, 171.3, 162.9, 184, 172.7, 172.3, 165.4) 
 height
 hist(height)

マトリックス

July 08, 2020 · R
hawks <-
matrix(c(173,178,180,183,182,174,179,179,174,192,17000,14000,9000,50000,30000,12000,900,2100,1000,25000),10,2)
hawks