Hacker News new | ask | show | jobs
by lifthrasiir 3611 days ago
In the other words, E(...) has a hidden lambda there, and the fully consistent usage would be E(X -> X^2) (instead of E(X^2)) and so on. The covariance thing would be E((X,Y) -> X*Y) with an implied domain being a Cartesian product of that of X and Y. Of course we humans can easily infer the domains, and writing explicit domains every time is not efficient.
2 comments

Well, formally a random variable is already a function which assigns values to elements of the probability space (outcomes). The expected value is just another name for an integral over this space. When the probability space is discrete, "the integral over a probability space" is just another name for a weighted sum. The domain is always the same: it's the probability space.

The real bad notation (which is employed here, actually) is f² meaning (x ↦ f(x)²) while at the same time f⁻¹ means the inverse function of f instead of (x ↦ f(x)⁻¹).

I understood math better once I used it for coding.

Linear algebra and matrices, for example, by creating a simple 3D simulation and later studying a circuit simulation.

Same with physics and other sciences, which are typically taught more like math calculation and/or memorization classes.

It would be nice to see more math documented and taught as code.