Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16758

Re: Bug with ProbabilityDistribution

From Bill Rowe <readnews@sbcglobal.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Bug with ProbabilityDistribution
Date 2014-04-10 07:07 +0000
Message-ID <li5fuv$3jl$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


On 4/9/14 at 4:14 AM, cgillingham1@me.com (CHARLES GILLINGHAM) wrote:

>Evaluate this:

>ProbabilityDistribution[
>Piecewise[{{0, x1 == 1 && x2 == 1}, {1/2, x1 == 1 && x2 == 0}, {0,
>x1 == 0 && x2 == 1}, {1/2, x1 == 0 && x2 == 0}}], {x1, 0, 1,
>1}, {x2, 0, 1, 1}
>]
>PDF[%][{1, 1}]

>And you get:

>Undefined

>But the probability is obviously 0

>Is there something I am misunderstanding about how simple Boolean
>probability distributions should be set up?

Start with a fresh session and pay attention to the syntax
coloring. Note that x1 and x2 are undefined and your syntax does
not make these local variables. That is entering

f[x_]:=2 x

will cause x to be colored differently than your x1, x2 above.

You get undefined as a result since x1 and x2 are never defined.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar


Thread

Re: Bug with ProbabilityDistribution Bill Rowe <readnews@sbcglobal.net> - 2014-04-10 07:07 +0000

csiph-web