MathGroup Archive 2004

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

Search the Archive

Re: Bernoulli variables again

  • To: mathgroup at
  • Subject: [mg46551] Re: Bernoulli variables again
  • From: drbob at (Bobby R. Treat)
  • Date: Mon, 23 Feb 2004 02:15:42 -0500 (EST)
  • References: <c1amhq$3qt$>
  • Sender: owner-wri-mathgroup at

Because of the peculiar structure of the expression below, you may
profit from the transformation x[i_]->1-y[i]. A lot of extra
complexity is due to all those 1 - xi. If your problems can be cast in
terms of the y[i], this will help a lot. If you HAVE to go back to
x[i] at some point, I think I'd do it as late in the game as possible.
But I doubt it's necessary. After all, the y[i] are Bernoulli too,
with an easy transformation between the probabilities associated.


jmyers6761 at (JMyers6761) wrote in message news:<c1amhq$3qt$1 at>...
> Consider the following expresion where each of the xn are Bernoulli variables:
> 1 - (1 - (1 - (1 - x1) (1 - x2)) x4) (1 - (1 - (1 - x2) (1 - x3)) x5)
> when this expression is Expanded we get:
> x1 x4+x2 x4 - x1 x2 x4 + x2 x5 + x3 x5 - x2 x3 x5 - x1 x2 x4 x5 - x2^2 x4 x5 +
> x1 x2^2 x4 x5 - x1 x3 x4 x5 - x2 x3 x4 x5 + 2 x1 x2 x3 x4 x5 + x2^2 x3 x4 x5 -
> x1 x2^2 x3 x4 x5
> but since a Bernoulli variable, x, can take on only values of 0 or 1 and x^n =
> x this expression is subject to the transformation x^n-> x with the following
> result:
> x1 x4 + x2 x4 - x1 x2 x4 + x2 x5 + x3 x5 - x2 x3 x5 - x2 x4 x5 - x1 x3 x4 x5 +
> x1 x2 x3 x4 x5
> My question is does anyone know how to transform such an unexpanded expression
> without having to first do an Expand? The actual expressions I am dealing with
> have a very large number of fully expanded terms ( > 10^6) and as a result
> Mathematica runs out of memory attemting to Expand the expressions. I know that
> the resulting expressions, after the Bernoulli transformation, if they could be
> expanded, would still be large but the number of terms would be much smaller,
> on the order of 10^3 terms. Does anyone know of a technique that could used to
> transform the unexpanded expression?
> Thank you for your thoughts.
> Al Myers

  • Prev by Date: Attributes and behaviors?
  • Next by Date: Re: Can Mathematica Ver 5 Import ESRI *.shp, *.shx and DBase *.dbf files??
  • Previous by thread: Bernoulli variables again
  • Next by thread: Re: Bernoulli variables again