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


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

defining averages over unknown PDF

From Sune <sunenj@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject defining averages over unknown PDF
Date 2013-11-05 04:11 +0000
Message-ID <l59r4m$rd0$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


Dear all.

I want to do some symbolic manipulations of an expression involving averages over a stochastic variable with an unknown density. Therefore, I figured I could define a function av, which would correspond to the average over this unknown parameter density function.
I did as follows:
av[y_ + z_, x_] := av[y, x] + av[z, x]?
av[c_ y_, x_] := c av[y, x] /; FreeQ[c, x]
av[c_, x_] := c /; FreeQ[c, x]

So these are basic properties of the average over the distribution of X. Some things work okay, for example
In[52]:= av[Exp[-x y], x]?
Out[52]= av[E^(-x y), x]
and
In[79]:= D[av[-x y, x], x]?
Out[79]= -y
and
In[80]:= D[av[-x y, x], y]?
Out[80]= -av[x, x].

However, the most vital part for my calculations does not work:
In[81]:= D[av[Exp[-x y], x], y]?
Out[81]= -E^(-x y) x

It should have been av[-Exp[-x y] x,x].

Any clues to what I'm doing wrong? I'm thinking that I need to specify some rules for differentiation, but I don't know how. But then I'm wondering how come it got the other expressions for differentiation right.

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


Thread

defining averages over unknown PDF Sune <sunenj@gmail.com> - 2013-11-05 04:11 +0000

csiph-web