Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Unexpected expectation behaviour
Replies: 3   Last Post: Jun 11, 2013 2:23 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Roland Franzius

Posts: 459
Registered: 12/7/04
Re: Unexpected expectation behaviour
Posted: Jun 6, 2013 7:22 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Am 05.06.2013 09:15, schrieb Donagh Horgan:
> Hi all,
>
> I've been playing around with the following expected value, but I've run into some odd behaviour with Expectation and NExpectation. The following example illustrates the problem:
>
> Expectation[Abs[y - 1]^3,
> y \[Distributed] NoncentralChiSquareDistribution[1, s]]
> Plot[{%, NExpectation[Abs[y - 1]^3,
> y \[Distributed] NoncentralChiSquareDistribution[1, s]]}, {s, 0,
> 10}]
>
> All advice greatly appreciated.


Mathematica uses algebraic knowlegde about the parameters in MarcumQ
function, the cumulative distribution

CDF[ NoncentralChiSquareDistribution[1, s]]

Take a trace

Trace[Expectation[y - 1,
y \[Distributed] NoncentralChiSquareDistribution[1, s]]]]

and you will see an evaluation process typical for gaussian integrals.

Unfortunately these procedures do not work for distributional
observables like

UnitStep[y-1]((y-1)^3) or Abs[(y-1)^3]

and the like.

In this cases one needs the primitive integrals over the density
function explicitely.

So Mathematica gets lost as usual in its unevaluted and never fully
understandable evaluation processes of definite integrals.

WRI should change this odd behaviour by just implementing a table lookup
eg in
Prudnikov/Marichev et al Tables.

The big conceptual error is to let users fill in transformed variables
just for fun instead of stating a certain algebraic type of integral and
the transformation rules of arguments and parameters applied.

A user friendly definite integrate processor should end the search with
a comment and an Abort if the definite integral seems to be unknown.

As a mathematical physicist, I am quite unhappy with WRI's "Integrate
policy": Not to cite the sources and hiding algorithmic trivialities
clear to the community just for fear of what?

In the case of existing notation differences eg between
Abramovitz/Stegun und body of the mathematical literature of function
theory - eg in the case of elliptic functions - the Mathematica function
body itself needs much more commentaries and hints in which cases to use
which functions.

--

Roland Franzius






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.