Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16765
| From | Barrie Stokes <barrie.stokes@newcastle.edu.au> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Bug with ProbabilityDistribution |
| Date | 2014-04-10 07:09 +0000 |
| Message-ID | <li5g41$3lj$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
Hi Charles
Writing
scriptD = 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[ scriptD, {x, y}] looks interesting, and
CDF[ scriptD, {x, y}] gives Undefined.
OTOH,
Mean[scriptD ] gives (1=8E2, 0)
And
Variance[scriptD ] gives {1=8E4, 0}
whereas
Covariance[scriptD ] doesn't work.
DiscretePlot3D[ PDF[ scriptD, {x, y}], {x, -2, 2}, {y, -2, 2},
AxesLabel -> {"x", "y", "PDF"} ]
Corroborates
PDF[ scriptD, {1, 1}]
PDF[ scriptD, {0, 1}]
PDF[ scriptD, {1, 0}]
PDF[ scriptD, {0, 0}]
If you look closely.
I note that there is documentation in V.9 for Discrete Univariate
Distributions, but I don't see anything under "Discrete Multivariate
Distributions"
Hmmm.
Cheers
Barrie
On 9/04/14 6:14 PM, "CHARLES GILLINGHAM" <cgillingham1@me.com> 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?
>
>Thanks.
>
>
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar
Re: Bug with ProbabilityDistribution Barrie Stokes <barrie.stokes@newcastle.edu.au> - 2014-04-10 07:09 +0000
csiph-web