[R] qbinom

jaybell stephenn9 at yahoo.com.tw
Fri Nov 30 18:47:51 CET 2012


a=c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)
b=c(0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1)
cor(a,b)= -1

a'=qbinom(a, 1, 0.5)
b'=qbinom(b, 1, 0.5)
why cor(a',b') becomes -0.5 ?



--
View this message in context: http://r.789695.n4.nabble.com/qbinom-tp4651460.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list