When you're asking P(Heads) of a coin, its short hand for "P(event=heads) for all possible events that can happen when flipping a coin". You notice that in this idealized world the event is always two things (heads or tails), and never null, side, cow because we have defined that the P(event=cow) = 0.
Probability functions are at the end of the day models that we can use to analyze real world non-deterministic phenomena with the rigor of mathematics.
[0] - with credit to Prof Gubner https://directory.engr.wisc.edu/ece/Faculty/Gubner_John/
They are functions that map from the space of random events to whatever other space you want. Why restrict yourself to the real number line?
Eg the 'moral character of the next stranger I encounter' is a random variable that maps from some abstract space of random events (we often used the Greek letter Omega for that) onto some space of moral characters.
And if you want to restrict yourself to numbers, why restrict yourself to reals? Why not complex numbers or p-adic numbers or numbers in F_5 or numbers in [0, 1] or 'natural numbers expect 17'?
EDIT: looks like you are right in English! See https://news.ycombinator.com/item?id=40796146 and my reply there.
Edit: I misread. I agree with you. Sorry!
If it maps elsewhere, mathematicians like to call it a random element instead.
I can understand why some might make a cut between pure numbers and other objects, but it's not something that troubles many.
I can see why you would teach the more restricted definition eg in high school.
Definition 3. A random variable X is a real function which is measurable with respect to the underlying sigma-algebra. The function F defined by F(T) = P{X < T} us called the distribution function of X.
(He introduces later complex-valued random variables though - in the context of characteristic functions.)Though as kazinator demonstrates in this thread, it looks like this approach can lead to some confusion between random variables and expected values.
For a random variable consisting of a unit vector, it may be possible to construct an Expected Value: take all the vectors that can occur, multiply them by their probability and add together. (Or if the vectors are not quantized, use integration over their space).
We can't do that for bead colors that have not been mapped to values.
That looks like a good litmus test: if we can calculate a meaningful Expected Value, it is almost certain a random variable. Otherwise not.
On the other hand, it's possible to construct probability distributions that have a meaningful expected values, but don't have anything to do with numbers.
> It is not like colors of beads in a jar that have no value until we assign one, which we do arbitrarily.
Huh? 'Red' and 'blue' are a perfectly fine values as far as I am concerned.
A random unit vector can perhaps be represented by a bunch of numbers (assuming you fix some finite dimension), but is not by itself a numerical quantity. Eg you can't multiply vectors.
It's also not completely clear that the definition of expected value of unit vectors you gave is necessarily the right one for every context: with your definition the expected value of a distribution over unit vectors is (in general) not a unit vector itself.
Often it's convenient to rig things in such a way that the expected value is a thing of the same type.
If you allow the expected value to be of a different type, you can say that the expected value of drawing from our urn is the expression `30% * blue + 70% * red` with `*` and `+` being purely formal operators from the free ring.
---
In any case, expected values and random variables are separate subjects.
Right; that needs to be better articulated. For the Cauchy distribution, we can meaningfully explore whether it has an expected value. We can write down the expression.
If it is not absurd to explore whether the distribution has an expected value (even though it may turn out that it isn't numerically defined), the distribution is of a random variable.
It is absurd to think about what is the expected value of a random experiment that produces the words "red", "green" and "blue" with various probabilities.
It doesn't exist as a category, not due to a calculation problem. I.e. it's "not even undefined".
> Eg you can't multiply vectors.
You can multiply vectors together in 2D (complex numbers) and 3D (cross product). Also 4D (quaternions, non-commutatively).
You can multiply vectors in any number of dimensions by scalars, which is all we need for averaging a bunch of vectors, with weights.
But yes, vector fields are not fields though, so vectors are not numbers in every sense.
Thanks for talking yourself into agreeing with my point:
Even for an expected value to make sense, you don't need a 'number'; ie you don't need a field, and you don't even need a ring. You can use a less restricted structure.
> It is absurd to think about what is the expected value of a random experiment that produces the words "red", "green" and "blue" with various probabilities.
Why is it absurd? It's perfectly possible to define the result over a suitable 'free' structure. (In fact you can always do that, even for 'numbers' and then later collapse that free structure into something concrete.)
Btw, it's perfectly possible to define some weighted average of colours, if you wanted to. But that's about as relevant as the different not-quite-multiplications you brought up.
> It doesn't exist as a category, not due to a calculation problem. I.e. it's "not even undefined".
Free algebras are perfectly well studied structures in math. They 'exist' just as much as anything else in math does. And, by definition, they have all the right properties we need to define the expected value.
---
> You can multiply vectors together in 2D (complex numbers) and 3D (cross product). Also 4D (quaternions, non-commutatively).
Those operations are often called 'multiplication', just like we often call any random group operation 'multiplication'. But there's no vector multiplication you can define in general (for all number of dimensions) that would give you a field or even just a ring. So they aren't really the kind of multiplication we need.)
I really appreciate comments like this.
That said, while I appreciate and admire free textbooks published online, I think the exposition would be much improved if the author had a better sense of who he was writing for (the most common writing advice...).
And I take issue with the view that the sample space is where the random phenomenon lives, as it were. In my experience, it's more common to use the random variable itself to model the (observable aspect of) the random phenomenon, and for the sample space to be either a hidden (i.e., more abstract) aspect of the phenomenon or else a purely abstract formalism introduced only for ease of mathematical computation.
It would be helpful also to see some more context, especially historical (who introduced the concept of a sample space, and for what purpose?).
For a random variable we can calculate something called the expected value. We can't do that if the value of the variable is in the domain { red, green, blue }.
Not all probability distributions over real numbers have expected values. See https://en.wikipedia.org/wiki/Cauchy_distribution
Many probability distributions over something other than the real numbers have expected values.
Hmm, that sentence at the beginning is already wrong. Random variables can measure anything, not just numbers. Heads or Tails of a coin, or colours of cars etc.
It's fine to restrict yourself to numeric random variables only. But if you are writing a rant telling other people to be more careful in their analysis, you better dot your i's and cross your t's yourself.