Interesting! When I studied math (in Germany) we used the German equivalent of 'random variable' to describe the more generalised concept that English seems to call 'random element'.
I'm an American mathematician and have always allowed the codomain of a random variable to be any measurable space. I haven't noticed anyone mention random elements. I don't work in probability though, so maybe people directly in the field care more.
From what I saw as a recent grad student in probability, most texts do define a random variable to necessarily map into the reals, or the extended reals or perhaps a subset thereof, or occasionally the complex numbers, and the more general concept is a "random element" (when a more specific term is called for, there are "random vectors", "random graphs", "random processes", etc.). But this is certainly not universal even within probability. In any case, I don't believe it matters much -- it's hard to see how a mix-up here might cause any real confusion, though as always it is annoying that there isn't a common convention.
Indeed, I suspect those two wikipedia articles ( Random variable | Random element ) have been captured by a particular school of thought, I studied post grad math in Australia and interacted with many mathematicians from a number of backgrounds, all appeared fine with treating (say) a random unit vector ( or point on the surface a sphere ) as a Random variable.
I can understand why some might make a cut between pure numbers and other objects, but it's not something that troubles many.
One benefit to defining the codomain of a random variable as a (real) number because it makes defining the expectation of a random variable easier to understand. (Of course, it is possible to define the expectation more abstractly, but people who study probability often have not taken an abstract/linear algebra course.)
A random unit vector is a numerical quantity. It is not like colors of beads in a jar that have no value until we assign one, which we do arbitrarily.
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.
> There are plenty of probability distributions on real numbers that don't have an expected value.
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.
> You can multiply vectors in any number of dimensions by scalars, which is all we need for averaging a bunch of vectors, with weights.
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.)
This is from Feller (vol. II), not exactly a high school text.
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.)
If it maps elsewhere, mathematicians like to call it a random element instead.
https://en.m.wikipedia.org/wiki/Random_element