I have a list of probabilities p = [p1, p2, …, pn].
p = [p1, p2, …, pn]
All I want is to simulate a list s = [0, 1, 0, 0, 1, …, 1], whose first element is
s = [0, 1, 0, 0, 1, …, 1]