Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Biased Random[Integer]?

  • To: mathgroup at
  • Subject: [mg19004] Biased Random[Integer]?
  • From: siegman at (AES)
  • Date: Tue, 3 Aug 1999 13:44:43 -0400
  • Organization: Stanford University
  • Sender: owner-wri-mathgroup at

"Random[Integer]" gives 0 or 1 with .probability 1/2.

What's the simplest expression that will yield 0 or 1 with probabilities 
p  and  1-p ?

(p itself might be a rational fraction, p = p1/p2.)

I can write various expressions that do this, but what's the cleanest or
tersest way?

  • Prev by Date: Re: Removing Graphics3D polygon edges
  • Next by Date: Curious weakness in Simplify with Assumptions
  • Previous by thread: Re: Removing Graphics3D polygon edges
  • Next by thread: Re: Biased Random[Integer]?