MathGroup Archive 2001

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

Search the Archive

Restting Probabilities

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29284] Restting Probabilities
  • From: loopm at yahoo.com (Michael Loop)
  • Date: Mon, 11 Jun 2001 04:38:26 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I am a new user of Mathematica, and I am having a little difficulty grasping
the syntax.  I am trying to generate a matrix of 0's and 1's given by a
Bernoulli probability distribution.   If we look at a case for a matrix with
five different probabilities, x={0.05,0.09,.15,.23,.47}.  I have been able
to construct a matrix with these probabilities, but what I cannot do is
reset the probabilites back to the start of the list when a 1 was the last
result in the table.  In other words, each time a random Bernoulli generates
a 1, I want the probability for the next xi in the row to be 0.05 again and
continue to preoceed down the list again until another 1 is reached.  If
anyone could provide me with some help on the proper syntax for resetting
the probability at the start of the list {x}after a 1 is reached in the row,
I would be grateful.


  • Prev by Date: JLink on Linux with Sun JDK 1.3.1
  • Next by Date: Re: Regress, Eliminate Outliers, Regress
  • Previous by thread: Re: JLink on Linux with Sun JDK 1.3.1
  • Next by thread: Re: Restting Probabilities