defining averages over unknown PDF
- To: mathgroup at smc.vnet.net
- Subject: [mg131941] defining averages over unknown PDF
- From: Sune <sunenj at gmail.com>
- Date: Mon, 4 Nov 2013 23:16:59 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
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.
- Follow-Ups:
- Re: defining averages over unknown PDF
- From: Itai Seggev <itais@wolfram.com>
- Re: defining averages over unknown PDF
- From: Itai Seggev <itais@wolfram.com>
- Re: defining averages over unknown PDF
- From: Itai Seggev <itais@wolfram.com>
- Re: defining averages over unknown PDF