MathGroup Archive 2007

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

Search the Archive

Re: Logics and probability

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78483] Re: [mg78475] Logics and probability
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Tue, 3 Jul 2007 05:19:52 -0400 (EDT)
  • References: <200707021100.HAA18229@smc.vnet.net>

On 2 Jul 2007, at 20:00, Dr. Wolfgang Hintze wrote:

> Hello,
>
> this is really a very elementary question.
> How can I treat the logics and numerics of probabilities?
>
> For example consider two events A and B.
>
> The probability of the event (A U B) is then
>
> w1 = P(A U B) = P(A) + P(B) - P(A/\B)
>
> Now let P(A) = P(B) = p and P(A/\B) = p^2 then
>
> w1 = p(2-p).
>
> When we have to deal with more complicated expressions like
>
> w2 = P((AB/\BD) U (AB/\BC/\CB) U (AC/\BC/\BD) U (AC/\CD))
>
> where there are five events AB, BD, BC, CD, AC.
>
> How can Mathematica calculate the probability for me?
> Some kind of "ProbabilityExpand" should reduce the expression
> to a sum of probablities of pure AND-events (LogicExpand is not
> appropriate).
>
> Thanks in advance
> Wolfgang
>
>
>

What do you mean by ""LogicalExpand is not apropriate"? It is  
perfectly appropriate:

p[Or[A_, B_]] :=
  p[LogicalExpand[A]] + p[LogicalExpand[B]] - p[LogicalExpand[A && B]]

p[A || B || C]
p[A] + p[B] + p[C] - p[A && B] - p[A && C] - p[B && C] + p[A && B && C]

p[(AB && BD) || (AB && BC && CB) || (AC && BC && BD) || (AC && CD)]
p[AB && BD] + p[AC && CD] + p[AB && BC && CB] + p[AC && BC && BD] -
   p[AB && AC && BC && BD] - p[AB && AC && BD && CD] -
   p[AB && BC && BD && CB] - p[AC && BC && BD && CD] +
   p[AB && AC && BC && BD && CD] - p[AB && AC && BC && CB && CD] +
   p[AB && AC && BC && BD && CB && CD]

In TraditionalForm it will even look right.

Andrzej Kozlowski


  • Prev by Date: Re: search for an operator in an expression
  • Next by Date: question
  • Previous by thread: Logics and probability
  • Next by thread: Re: Logics and probability