
Untitled
By:
tak30 on
May 22nd, 2012 | syntax:
R | size: 0.33 KB | hits: 51 | expires: Never
set.seed(12345)
Y1 <-rbinom(n=500,size=1,prob=0.8)
Y2 <-rbinom(n=500,size=1,prob=0.9)
Y3 <-rbinom(n=500,size=1,prob=0.6)
Y4 <-rbinom(n=500,size=1,prob=0.5)
t1 <- Y1|Y2
t2 <- Y3|Y4
t3 <- Y1|Y2
t4 <-rbinom(n=500,size=1,prob=0.7)
CIRCUITO <- t3&t4
prop <- sum(CIRCUITO)/500 # Cambia la semilla la proporcion
print(prop)