Re: symbolic Variance - Integration
- To: mathgroup at smc.vnet.net
- Subject: [mg84596] Re: symbolic Variance - Integration
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Sun, 6 Jan 2008 05:55:36 -0500 (EST)
- References: <flnjkg$jve$1@smc.vnet.net>
Hi, a) Mathematica will not split Integrate[f[x] + g[x], x] because for certain functions Integrate[f[x] + g[x], x] may be convergent while Integrate[f[x], x]+Integrate[g[x], x] may be indeterminate. b) you must program your own rules to handle expectation values of random variables. @article{citeulike:1051201, author = {Goodman, Leo A. }, citeulike-article-id = {1051201}, journal = {Journal of the American Statistical Association}, keywords = {product-of-rv}, number = {297}, pages = {54--60}, priority = {2}, title = {The Variance of the Product of K Random Variables}, url = {http://links.jstor.org/sici?sici=0162-1459\%28196203\%2957\%3A297\%3C54\%3ATVOTPO\%3E2.0.CO\%3B2-X}, volume = {57}, year = {1962} } may help you .. Regards Jens Regards Jens jess wrote: > Hi there! > > I came across a formula for variance of a product of random variables > X and Y. The formula was given under the assumption that X and Y are > independent, and there was a remark that without this assumption the > formula is very complicated. > > I thought to myslef, okay i have mathematica on my pc so let's see how > complicated it is... > > Then i realized that the only way to calculate variance in mathematica > is to: > - give a list of points (i.e. uniform discrete distribution) > - give a specific distribution, and say, its parameters ( eg. normal > or gamma dist.) > > so there is no way to make a symbolic calculation using an arbitrary > random variable... > > Huuuh, so i thought okay variance and expected value are nothing but > integrals so i can try to define my own function using integrals (i do > not want to consider just discrete or continues random variables)... > > and then i realized i can't even obtain that integration is additive > i.e. from > > Integrate[f[x] + g[x], x] > > i could not get > > Integrate[f[x], x] + Integrate[g[x], x] > > (so my function for expected value would not even tell me that > EValue(X+Y) = EValue(X) + EValue(Y)... not to mention about > calculating Variance( XY) = ????.... ) > > Coming back to my original problem: how to make mathematica do this > > In[1] =E[XY] > Out[1]=E[X]E[Y]+Cov[XY] > > and further > > In[2]=Var[XY] > In[2]= ?????????? > > Please I would appreciate absolutely any comment at all... > > Jess >