On Sun, Feb 22, 2009 at 7:12 PM, Damien Morton <dmorton at bitfurnace.com> wrote: > I need to generate a sequence of bits where Pr(1) < 0.5 > I know I can do this by generating a sequence of numbers [0,1) and testing r > < Pr(1). def lowProbOne(): while True: yield 0.0 Or is that too low? ;-) Do you also want Pr(1) > lb, for some lb?