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: firstname.lastname@example.org
- Delivered-to: email@example.com
- Delivered-to: firstname.lastname@example.org
- Delivered-to: email@example.com
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:= av[Exp[-x y], x]?
Out= av[E^(-x y), x]
In:= D[av[-x y, x], x]?
In:= D[av[-x y, x], y]?
Out= -av[x, x].
However, the most vital part for my calculations does not work:
In:= D[av[Exp[-x y], x], y]?
Out= -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.
Prev by Date:
Re: Finding branches where general solution is possible
Next by Date:
Re: Round-off error?
Previous by thread:
Re: ListPlot - assigning a list of colors to a set of points
Next by thread:
Re: defining averages over unknown PDF