Everywhere I have seen, random variable is a numeric quantity. Is it a rule? Can random variable be a non-numeric quantity?

Suppose I toss a coin. Can I declare my random variable X to be the outcome of the toss, i.e. X will take values from {'heads', 'tail'} rather than some numeric values like {0, 1}?

If say random variable cannot take numeric values then how should I describe something like P(X='heads') = 1/2. What is X in this case?

  • 1
    $\begingroup$ Sometimes the term "random element" is used for quantities that are not necessarily real numbers. $\endgroup$ – Glen_b Sep 25 '16 at 4:14
  • $\begingroup$ What's exactly what I'm confused about! Thanks so much! $\endgroup$ – Gqqnbig Mar 7 at 5:53
  • $\begingroup$ This is the Wikipedia article explaining random element. I bet it's what you were looking for. en.wikipedia.org/wiki/Random_element $\endgroup$ – Gqqnbig Mar 7 at 6:52

The nomenclature I'm familiar with is that the term "random variable" is reserved for a random quantity that is real-valued. "Random quantity" is the more general term for a measurable function on a probability space. Such a function's codomain need not be a subset of the real numbers, or have anything to do with numbers at all.

  • 1
    $\begingroup$ What would you call X in case you want to express P(X='heads') = 1/2. Would you call X an event, outcome or random variable? $\endgroup$ – Lokesh Sep 25 '16 at 3:34
  • $\begingroup$ @Lokesh Precisely what mathematical object do you mean by "heads"? $\endgroup$ – Kodiologist Sep 25 '16 at 6:00
  • 1
    $\begingroup$ I am not sure. I want to do is to express the idea probability of X that will take value "heads" is 1/2. What should be X be and "heads" in this case, I do not know. $\endgroup$ – Lokesh Sep 25 '16 at 6:41
  • $\begingroup$ @Lokesh The usual approach is to use 1 for heads and 0 for tails, as you mentioned in the original question. $\endgroup$ – Kodiologist Sep 25 '16 at 14:19

Random variable is simply a mapping from outcome to real number (from outcome space to real space).

Probability is a mapping from event space to [0, 1]. Here event can be "getting a head".

Probability in itself was sufficient to describe expectation of events. But sometimes we want expectation of f(event). For example, probability of sum(heads) in three tosses. So now you see, sum(heads) is a real quantity, but is derived from the outcomes. That's how notion of Random Variable came into usage.

Take away is :

For events, use probability. But for f(event), use random variable.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.