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


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

Re: Unexpected expectation behaviour

From Roland Franzius <roland.franzius@uos.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Unexpected expectation behaviour
Date 2013-06-06 11:22 +0000
Message-ID <kopreb$cgj$1@smc.vnet.net> (permalink)
References <komoio$1up$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


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


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


Thread

Unexpected expectation behaviour Donagh Horgan <donagh.horgan@gmail.com> - 2013-06-05 07:15 +0000
  Re: Unexpected expectation behaviour Roland Franzius <roland.franzius@uos.de> - 2013-06-06 11:22 +0000
    Re: Unexpected expectation behaviour Donagh Horgan <donagh.horgan@gmail.com> - 2013-06-11 06:21 +0000
    Re: Unexpected expectation behaviour debguy <johnandsara2@cox.net> - 2013-06-11 06:23 +0000

csiph-web