4 ms·
I think the fundamental source of confusion might be due to not understanding the concept of a random variable. In his example, X is a random variable; the expe
by jamessb 10y ago
I think the fundamental source of confusion might be due to not understanding the concept of a random variable. In his example, X is a random variable; the expectation E[X] is an functional applied to its probability mass function. Given this, it should not be surprising if it seems to behave differently to "any other function, in math".
If you understand this, I think the notation is natural:
We have a random variable X, which takes value x_i with probability p(x_i).
Thus, the random variable X^2 will take value (x_i)^2 with probability p(x_i).
Given that the expection for the random variable X with p.m.f p(x_i) is defined as E[X] = \sum x_i p(x_i), it should be clear that to obtain the expectation of any random variable we must sum over the product of (value) and (probability of that value).
It should also be clear that this gives E[X^2] = \sum (x_i)^2 p(x_i)
I'm confused by his comment that:
p(xi) isn't, because it doesn't make any sense in the first place. It should really be just PXi or something, because it's a discrete value, not a function!
The probability mass function is a function: for a given value, it gives the probability that the the discrete random variable takes that value. To calculate the expectation we use the values obtained by evaluating the function at discrete points, but what else could we do?
- adrianratnapala 10y agoYou are right, and the deeper source of the authers beef seems to be that he wants mathematics to be about textual rules. Now that's a fine thing in a computer language -- and there are philosophers who say mathematical truth is no more than computation. But mathematical notation is for humans to talk about things that have meanings that humans can understand. The fact is that E[X^2] is natural way of an important concept. Whereas "\sum \sum (x_i)^2 p(x_i^2)", need mean nothing at all (especially is $p$ is not defined over all the $x_i^2$).
- pwdisswordfish 10y ago> Now that's a fine thing in a computer language -- and there are philosophers who say mathematical truth is no more than computation. But mathematical notation is for humans to talk about things that have meanings that humans can understand. Then how come an unfamiliar piece of source code is easier to follow than a mathematics paper using unfamiliar notation? You can look up the definition of each function and learn precisely what it does, without ambiguities. You can open up a debugger and trace every step of the algorithm. Source code tends to be formatted to emphasise its division into units that can be analysed separately. Even if the code uses a framework you don't recognise, you can probably understand some of the underlying logic just fine, thanks to a consistent syntax and (often) descriptive function names. In a mathematical paper, often there's some notation that isn't defined and there isn't even any pointer where to look for definitions. Important objects are given one-letter names. Theorems are often only numbered; good luck remembering what lemma 2.17.3b was about. Proofs are written in prose (instead of something like Leslie Lamport proposed[0]). You have to fill in conceptual gaps and remind yourself of unstated assumptions. Notation and terminology is often ambiguous — what does "exponential time" mean? Is it DTIME(2^(c*n)) or DTIME(2^polynomial(n))? Does "increasing" mean "strictly increasing" or "non-decreasing"? Is zero a natural number? And so on. A mathematical formalism that could be interpreted in a purely mechanical way would be a huge improvement. [0] http://research.microsoft.com/en-us/um/people/lamport/pubs/proof.pdf http://research.microsoft.com/en-us/um/people/lamport/pubs/p...
- _dps 10y ago> Then how come an unfamiliar piece of source code is easier to follow than a mathematics paper using unfamiliar notation? This is clearly subjective. I read lots of mathematics research that I find more accessible than even pretty mundane source code (and yes, I write software for a living and have done so for over ten years).
- mcphage 10y agoThe answer to all of your questions: computer programs are written for computers to understand, and computers aren't very smart. Mathematical papers are written for mathematicians to understand, and they tend to be a lot smarter than computers.
- panic 10y agoMachine language is also written for computers to understand, but it's not easy to read. Computer-formalized math is usually even harder to read than regular notation. I don't think computers have much to do with this.
- mcphage 10y agoTrue, I should have said it better as, programming languages are written for compilers to read, and they're not very smart. Machine language is written for computers themselves. Computer-formalized math I don't think is written for anyone to read.
- wolfgke 10y ago> A mathematical formalism that could be interpreted in a purely mechanical way would be a huge improvement. Look at Homotopy Type Theory: > https://homotopytypetheory.org/ https://homotopytypetheory.org/
- Smaug123 10y agoI feel obliged to point out that HoTT is… really rather abstract. I'm just starting to learn about it now in my spare time, and I hold a master's degree in mathematics specialising in logic.
- data_hope 10y ago> he wants mathematics to be about textual rules that is a princial problem with his blog post. In a way he is also kind of right - although I don't agree with his conclusion. E[X^2] is not the most precise notation. I have occasionally seen notations like E_X[X^2] to avoid confusion and clearly state "the expected value for X^2 with respect to the distribution of X" or something like that. I remember multiple times were imprecise notation has kept me from understanding statistical methods, while I would say that I am reasonably familiar with the field. Another problem: Different "schools" use different notations, which are then mixed arbitrarily. This is a major problem for example on Wikipedia, where articles use different notation and sometimes switch notations within the article.