I needed to simulate data from a random guess binary classifier such that
$p(success) = 0.55$ and $p(failure) = 1-0.55$.
So I simulated the data from a Bernoulli distribution as follows and compared the results with the actual response data.
set.seed(123)
#predicted response
y_pred=replicate(50,rbinom(1,1,prob = 0.55))
#actual response
y=sample(rep(0:1,each=25))
table(y,y_pred)
y_pred
y 0 1
0 13 12
1 10 15
Did I do this correctly? Any guidance would be really helpful.