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


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

Re: Linear combinations of Expectation of EmpiricalDistribution

From Clemens Fruhwirth <clemens@endorphin.org>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Linear combinations of Expectation of EmpiricalDistribution
Date 2012-09-19 08:55 +0000
Message-ID <k3c1aq$ets$1@smc.vnet.net> (permalink)
References <20120918074019.14F1B6847@smc.vnet.net> <CAEtRDSd3DFdjW9UayPVrrCLLvoNbXUeEUdUz+5kB1sKzyaxNAg@mail.gmail.com>
Organization Time-Warner Telecom

Show all headers | View raw


On 18 September 2012 16:13, Bob Hanlon <hanlonr357@gmail.com> wrote:

> Expectation[x + y,
>  {x, y} \[Distributed] EmpiricalDistribution[
>    Thread[{{0, 1, 2}, {0, 10, 20}}]]]
>
> 11

This creates a single multivariate distribution that does not
represent two independent random variables[*]. Ideally, Expectation
would not only know about the universally applicable linear
combination law, but also rules for the independent random variable
case, such as E(A*B) = E(A)*E(B). There are other laws as well that
apply to other Moment-s that I would like to see working for
EmpiricalDistribution.

Only EmpiricalDistribution seems to be affected. Specifying two
independent NormalDistribution-s just works fine:

Expectation[
 x + y, {x \[Distributed] NormalDistribution[3, a],
  y \[Distributed] NormalDistribution[10, b]}]

13

[*] That could be fixed by simulating independence /. Thread -> Tuples
-- 
Fruhwirth Clemens http://clemens.endorphin.org

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


Thread

Re: Linear combinations of Expectation of EmpiricalDistribution Clemens Fruhwirth <clemens@endorphin.org> - 2012-09-19 08:55 +0000

csiph-web