How to define an expectation operator

asked 1 year ago

Cyrille gravatar image

updated 1 year ago

Is there a way to define as a new operator the mathematical expectation.

Say we call it M as in the old Mir (russian books).

We should have

$\mathrm{M}(kX) = k\mathrm{M}(X)$

M(X±Y)=M(X)±M(Y)

and as a résult

M(XMX)2=M(X2)M(X)2

and other result for variances and covariances

Preview: (hide)

Comments

What do you intend X to be ? A function ?, A distribution ? A random variable ? In the lattercase, Sage defines what you want for discrete random variables (and the doc explains why it does not do it for continuous random variables...).

If you want real random variables and the Lebesgue measure, integration should do what you want...

RTFM (again)...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 1 year ago )