Jump to content

Talk:Random variable/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1Archive 2

Delete example?

Would it be appropriate to delete the "example" section at the bottom? 203.173.32.84 06:52, 22 Mar 2005 (UTC)

I think so, don't see what it adds. Frencheigh 08:20, 22 Mar 2005 (UTC)
Yes. Moreover, it is not an example of random variable. Its just a realization of random variable. Hardly misleading. --140.78.94.103 17:59, 24 Mar 2005 (UTC)

I thought this was very useful because it showed an example where the map was not the identity map. I propose putting it back. Pdbailey (talk) 00:48, 5 July 2008 (UTC)

False statement

A continuous random variable does not always have a density. —Preceding unsigned comment added by 194.4.140.135 (talk) 14:08, 11 June 2008 (UTC)

Definition

I dont like the definition here, not that I'm letting my ignorance of stats stop me from commenting, but could this be considered a clearer definition?:

"Random Variable

The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we often want to represent outcomes as numbers. A random variable is a function that associates a unique numerical value with every outcome of an experiment. The value of the random variable will vary from trial to trial as the experiment is repeated.

There are two types of random variable - discrete and continuous.

A random variable has either an associated probability distribution (discrete random variable) or probability density function (continuous random variable).

I think this is definitely an improvement but it should be pointed out that there exists r.v.'s which are neither discrete nor continuous (for example take the sum of one r.v. of each type) Brian Tvedt
The current definition is bad in that it is neither clear to the lay reader nor specific to the technical reader. The above definition is far better on both counts and so I will put it on the page. Pdbailey (talk) 21:35, 22 March 2008 (UTC)
BTW, sorry about the no summary edit, I hit the enter key accidentally. Pdbailey (talk) 21:36, 22 March 2008 (UTC)

Examples

  1. A coin is tossed ten times. The random variable X is the number of tails that are noted. X can only take the values 0, 1, ..., 10, so X is a discrete random variable.
  2. A light bulb is burned until it burns out. The random variable Y is its lifetime in hours. Y can take any positive real value, so Y is a continuous random variable.

"

I think the above definition (for the original reference, pls search via google) explains to me that it is a mapping between a value and the sequence number of that value, rather like a numeric index to a database record. This would appear to allow greater generalization in statistical definitions and algorithms. The earler Wikiedia definition led me to comment on another Wikipedia definition incorrectly because I think I may have misunderstood the concept after looking at this Wikipedia definition.


A random variable is a function that assigns a numerical value to an event. This example:


just assigns another event to an event. Could we change it to something like:

Consider a game where if a 6 is rolled on a fair six-sided die, player 1 wins, and otherwise, player 2 wins. Let X represent the number of times player 1 wins. Then


and

or maybe include an example of a continuous random variable? What do you think? Thelittlestspoon (talk) 07:33, 21 May 2008 (UTC)


This section should begin with a sentence of the form "A random variable is ...". To avoid this is to show that you don't quite know what to say -- like "I cannot define pornography, but I know it when it see it". Begin by trying to defining a variable (of the type seen in elementary school) -- A variable is a symbol with an associated domain, this symbol represents any member of the domain". Now what is a random variable? "A random variable is a symbol, with an associated domain, and a probability measure on that domain. The associated probability indicates how likely the symbol is to represent various values in the domain." Wrstark (talk) 04:15, 19 February 2010 (UTC)

Minimal meanderings on meta-definintions

In relation to the above, comparing the two definitions, one seems more mathematically formal than the other. We should probably bear in mind when posting (not that I've done much), that one's definition should stand on it's own as far as possible. That is, it should be very comprehensible to an average target reader in a minimum time. This means we may need to take great care when using references to other definitions and also avoid overly specialized terms. This is not to suggest that relevant specialized references should be avoided. Often experts in a field may use highly specialized terms in a definition as they are most familiar with that definition, although it may not be the most suitable for the general reader. This probably means, amongst other things, that we should try to use plain language to describe the concept as far as possible, together-with/based-on a minimum number of external definitions/explanatory references, especially those external to Wikipedia. Perhaps this comment could be added to the general rules for posting as a form of guidance.

Definition of cumulative distribution function

I have edited the page to consistently use the right-continuous variant (using less-than-or-equals as opposed to less-than) for the cumulative distribution function. This is the convention used in the c.d.f. article itself.

Also, I fixed was a minor error in the example, in that it implicitly assumed the given r.v. was continuous. For what it's worth, I agree that the example adds little to the article and should be deleted. Brian Tvedt 03:05, 14 August 2005 (UTC)


Reverted change to definition

The change I reverted was:

The expression "random variable" is an embarrassingly dogmatic misnomer: a random variable is simply a function mapping from events to numbers.

It's not so simple. A random variable has to be measurable. Also, the opinionated tone is not appropriate.Brian Tvedt 01:06, 21 August 2005 (UTC)

A question about Equality in mean

Why is "Equality in mean" as defined in 4.2 different from "Almost sure equality" ? A nonnegative random variable has vanishing expectation if and only if the random variable itself is almost surely 0, no ? Apologies if I missed a trivial point. MBauer 15:48, 28 September 2005 (UTC)

Yes, that seems the same.--Patrick 20:20, 28 September 2005 (UTC)


A 'first iteration' simple explanation possible?

In the first paragraph I find: " For example, a random variable can be used to describe the process of rolling a fair die and the possible outcomes { 1, 2, 3, 4, 5, 6 }. Another and the possible outcomes { 1, 2, 3, 4, 5, 6 }. Another random variable might describe the possible outcomes of picking a random person and measuring his or her height." I am not at all sure what the random variable *is* in these two cases from the description. How does a rnd.var. describe a process? Isn't it the result of a process that it pertains to? How does a rnd.var. *describe* the possible outcomes? My understanding is that it could be e.g. the number of dots facing upwards in an experiment being one throw of a die (but what about a coin? head/tail is not a number, or for a die with different color faces?), or e.g. the number of occurrences of the die showing a '1' in a given number of throws. In the second example, I guess it is the height of a person that is the rnd.var. Again I'm not sure how this *describe* the possible outcomes, I thought the 'range' of possible outcomes would be the interval from the height of the lowest person in a population to the highest, and I don't see how a rnd.var. *describe* this. What I often miss in definitions are some simple, yet precise descriptions and examples, before the more elaborate definitions, which are often too technical to be helpful at first (but good to visit later when my understanding of the subject has grown). Could anybody with a better knowledge of the subject please change/amend the introduction? Thank you. M.Andersen

80.202.85.143 11:07, 9 August 2006 (UTC)


I think it will be convenient to have sections in discussion pages in order to manage different questions around the same subject. Apart from this suggestion, I sincerely think that the text at the begining of the article is circular. Indeed, saying that "a random variable is a function that maps results of a random experiment..." is saying nothing. I agree with the point that "we should try to use plain language to describe the concept as far as possible...". But I think it must be clear when we are describing (informally) a subject and when we are defining (formally) the same thing. The correct definition is already on the text but it began with an horrible "Mathematically, a random variable is..." If we introduce, in mathematical subjects, a section of informal description and a section of formal definition, I think we will gain in clarity. I will not change the subject attending comments on my suggestion. --Crodrigue1 15:54, 19 November 2006 (UTC)

Other definition

==Incorrect sentence - "random variable"==

I don't think this sentence is correct:

Some consider the expression random variable a misnomer, as a random variable is not a variable but rather a function that maps outcomes (of an experiment) to numbers

.. A random variable is a variable... a value that can take on multiple different values at different times. It is NOT a function. A function could describe the rate at which that random variable takes on different values. They aren't the same thing. Just like an object in space or a thrown ball aren't the same things as the functions that describe their trajectories. Fresheneesz 07:05, 29 January 2007 (UTC)

Looking into it further, I think that there are two different definitions of a "random variable". In statistical experiments, you hold as many variables constant so that you can study a very few (preferably just one) variable. This variable *will* be random with some probability distribution. This is not the random variable that this article is talking about.
My question is: whats the difference between this and a probability distribution? We should add a second page covering the other definition or at least put a note on this article. Fresheneesz 07:11, 29 January 2007 (UTC)
Well, when you formalize things, a random variable becomes nothing than a measurable function. In the same way as a probability becomes nothing than a kind of measure. Oleg Alexandrov (talk) 16:07, 29 January 2007 (UTC)
I suppose. Well, I think some effort needs to go into reconciling these two mergable ideas of a "random variable" and a "random function" so that either definition will be consistent with the one in the article. Fresheneesz 21:08, 5 February 2007 (UTC)
As my calculus/probability professor said many years ago, "Random Variables - they are neither RANDOM nor VARIABLES" 65.96.187.78 19:34, 27 July 2007 (UTC)

A Lacking Explanation for the Average Reader

This page suffers from the same problem as most of the math definitions in Wikipedia. For the average reader, the definition is mostly NOT helpful. There is a single short sentence at the beginning that attempts to describe generally what a random variable is. Then the article goes straight into the formal definition. In order for this article to be helpful, this first sentence needs to be expanded upon. What are Random Variables for? How can one envision a random variable? Where would one be likely to use a random variable? In what other terms could one describe what a random variable means (without the formal math terms)? Perhaps a "function that maps outcomes from experiments to numbers" may not be entirely accurate, but it can certainly help the average person to better understand the concept. I would propose putting the formal definition in a completely separate second section, after the introduction. It's not just math people who are trying to read and understand some of these concepts. Please consider the average user when you write these definitions!

Bravo!
It seems that the Wikipedia is really changing in that regard and that it's no more aiding the accessibility of science for average people, as I first thought. You cannot imagine how much dedication and advertisement I have been carrying on for this great project, but it seems that something is going seriously wrong, since I am no more able benefit from reading the mathematical Wikipedia for example, along with some other types of articles :^(
This article was not helpful at all for me 77.30.105.76 (talk) 19:15, 14 November 2008 (UTC).

Title of Article: "Random Variable" vs. "Random Value"

Sorry to be negative, but this article is misnamed. A random variable is a variable chosen at random. E.g., if I have variables x, y, and z, then I might choose variable x at random.

I think this definition refers to a random value which might be assigned to a variable. As in:

x = rand(95) + 32;

Where if x represented an ASCII character, it could be anything from a space to a tilde. It's linked from so many places I'm a little scared to rewrite it. But in the context of many of the links, which are in cryptography, pseudorandom number generators, and password strength, it is even more clearly misnamed. What do others think?

P.S. Functions are not random. Functions are, by definition, deterministic. Call it pseudorandom function if you must, but there is another article on that.

—The preceding unsigned comment was added by GlenPeterson (talkcontribs).

They are called random variables. It's not Wikipedia's job to make up new names for things. --Zundark 17:55, 12 July 2007 (UTC)

Flipping coins

Is there any explanation for the seemingly astounding fact that we have managed to flip a negative number of tails in the first example? No surer way to confound the enterprising novice than to begin right away with total absurdity. My powers of visualization are nowhere near the point of being able to picture five negative coin flips. And how is w equal to both T and H if T and H have different values? Sometimes I think you guys are inventing your own mathematical notation as you go. ```` —Preceding unsigned comment added by 76.116.248.48 (talk) 03:46, 23 February 2008 (UTC)

It doesn't say anything about "five negative coin flips". Nor does it say that ω is equal to both T and H, it only says what value X(ω) takes if ω = T, and what value it takes if ω = H. I'll add a couple of ifs to make this clearer. --Zundark (talk) 08:32, 23 February 2008 (UTC)

Problem with "Functions of random variables"

The article asserts that the composition of measurable functions is measurable, and makes use of this "fact". However, this is false. In fact, there is a measurable g and continuous f such that g(f(x)) is not measurable. (See Counterexamples in Analysis by Gelbaum and Olmsted.) I am reluctant to edit the article to correct this, since I do not know how the probability community deals with this issue. My inclination would be to say that if X is a random variable and f is a Borel function, then Y=f(X) is a random variable; this works because the composition of a Borel function with a measurable function is measurable.

cshardin (talk) 17:31, 29 April 2008 (UTC)

Just to clarify, the counterexample is a non-Measurable function and you believe that this statement is true for all Measurable functions? Pdbailey (talk) 01:42, 30 April 2008 (UTC)
The counterexample is three functions: a measurable function g, a continuous function f, and their composition gof, which is not measurable. Since all continuous functions on the reals are measurable, this example gives two measurable functions whose composition is not measurable. I am not saying that for all measurable functions, their composition is not measurable. I am saying that for some measurable functions f and g, their composition is not measurable. It is wrong to say "the composition of measurable functions is measurable" when this only happens to be true for some measurable functions. cshardin (talk) 14:38, 30 April 2008 (UTC)
Perhaps you should start at measurable function (see the properties section) and then move over here--that article is more critical to the counterexample and is more critically flawed. BTW, I'm still not clear on if f is measurable in the counterexample. Pdbailey (talk) 15:19, 30 April 2008 (UTC)
The article measurable function is careful not to state outright that the composition of measurable functions is measurable. It makes a much more precise statement that specifies the exact sense in which each function involved is measurable. I think the issue here is one of usage, not mathematics. When one speaks of a function g from the reals to the reals as being measurable, does one mean that g is Lebesgue measurable, Borel, or something else? (In the counterexample I refer to, g is Lebesgue measurable but not Borel; f is continuous, Borel, and Lebesgue measurable.) The prevailing usage I have seen is that, in the context of functions from the reals to the reals, "measurable" means Lebesgue measurable unless otherwise specified; the article measurable function implies that, in the context of functions from the reals to the reals, "measurable" means Borel unless otherwise specified. I am not an expert on usage so I will not take issue with that, and if that's the convention here, then so be it. It might benefit from a clarification, though, since a lot of mathematicians will read "measurable" to mean Lebesgue measurable by default, when one is speaking of a function from the reals to the reals. cshardin (talk) 16:43, 30 April 2008 (UTC)

definition

I'm all for adding a technical definition later, but i think this article needs to state what it is talking about up front. Pdbailey (talk) 17:41, 30 April 2008 (UTC)

Determinism

I noticed the subject of determinism has not been brought up, and other articles seem to champion the incorrect viewpoint that random variables are not deterministic. It is important to recognize that a deterministic system can create variables where one of a set number of outcomes are equally likely.

IE those variables in which factors that create large variance in the outcome for a small amount of change such that all the infinite possibilities are rolled into a finite number of outcomes with an equal percent of the infinite possibilities being channeled into each one...

More general definition

At the moment the article seems to assume that a random variable only takes on values in the real numbers, but many authors use a more general definition. An informal definition might be: A random variable (often abbreviated to rv) is an object used widely in Probability and Statistics. An rv does not have a fixed value but instead takes on any of a set of values with frequencies determined by a probability distribution. The values taken on by the rv may be real numbers or integers or more generally they may be vectors or vertices of a graph or colors or members of any set whatsoever. Many authors restrict their definition to the real numbers or the integers.

We would then have to give alternate formal definitions for the restricted and the general case.

I think we need to do this because different authors do use different definitions. I'll make the changes if I don't get negative comments. Dingo1729 (talk) 05:31, 16 October 2008 (UTC)

Can you give a reference that uses a definition like this? Pdbailey (talk) 01:54, 17 October 2008 (UTC)

Trying to Understand Random Variables

I'm trying to refresh my memory on what a random variable is (maybe I never understood what it was in the first place), and seems like something very basic is missing: (it seems) a random variable is basically an assignment of real values to elements in the sample space. Such an assignment imposes a natural mapping from events to (real) values. If some version of what my previous statement, it could be added to the intro.

In the definition section, "real values" could be generalized to measurable spaces.

While I do not understand the purpose of using general measurable spaces (barely acquainted with them), it seems we should also add the following restriction on rv , if this generalization is to be of much use: .

A cosmetic suggestion: Why not use a more suggestive symbol for the set of events, such as ? If is an established convention, we can stick to that.

Danielx (talk) 10:58, 9 November 2008 (UTC)

This example could be misleading...

"Continuous random variables can be realized with any of a range of values (e.g., a real number between zero and one)" It might easily lead to the idea that all r.v. must take on values between [0,1] —Preceding unsigned comment added by 71.231.101.149 (talk) 20:27, 10 February 2009 (UTC)

Why Random Variable have such name?

How is it "Random"? Why is it called Random Variable? —Preceding unsigned comment added by 220.241.115.165 (talk) 07:49, 31 March 2009 (UTC)

More on the introduction

Everyone has done a great job with this article and I see you've wrestled with many of the thorny issues surrounding "random variables," balancing mathematical precision and user-friendliness. You're almost there. But the definition in the introduction is still not right:

"Continuous random variables can be realized with any of a range of values (e.g., a real number between negative infinity and positive infinity) that have a probability greater than zero of occurring."

Actually, the probability for any value of a continuous random variable is zero. We can speak of a positive probability density, but not a positive probability. A set of values may have a positive probability. If this is what you mean by saying a "range of values ... that have a probability greater than zero", then this needs to be made clearer. The total probability of the range of values that the continuous random variable is defined on is 1, not just "greater than zero." However this sentence was meant to be understood (and it is not clear), it is not right. --seberle (talk) 20:02, 28 May 2009 (UTC)

Ambiguity in the meaning of "random variable"

The meaning of "random variable" and the corresponding denotation of a random variable symbol is ambiguous throughout the article.

On the one hand "random variable" is used to refer to an observation or generation process from which values can be obtained (in some distribution). This process is modeled by a probability distribution over a space of possible values. So the random variable symbol denotes a structure consisting of a probability space and a mapping to a value space.

But on the other hand many of the examples indicate that the random variable symbol actually denotes some value taken at random from the value space.

The second meaning is not fully coherent, since a mathematical symbol must have a unique denotation --- it cannot randomly refer to a value. But despite not being fully coherent, this second meaning is somewhat useful as it suggests how certain notation should be interpreted, which would be incoherent if the random variable always denoted the whole structure that models the random process.

For instance consider:

 P( X < k )

denoting the probability that the random variable X yields a value less than k (which is a member of the value space of X).

The X here seems to denote some value from the value space because it is compared to a particular element k of the value space. But the symbol "X" cannot itself have a random value, otherwise the expression P(X < k) would on some occasions have the value 1 and on other occasions have the value 0. What the notation is intended to denote is the probability of the set of sample elements of X such that their associated value determined by X is less than k. This is a kind of quantification operation, which might be represented by something like the following:

   Prob_X(S) where S = {x | x in Samp_X and Val_X(x) < k} 

Clearly P( X < k ) is much simpler, but relies on an implicit and rather subtle interpretation of the notation.

Sifonios (talk) 23:31, 27 June 2009 (UTC)

Archive 1Archive 2

Codomain of a random variable: observation space?

See Wikipedia talk:WikiProject Mathematics#Codomain of a random variable: observation space?. Boris Tsirelson (talk) 16:53, 27 March 2010 (UTC)

random variables don't have to be real-valued!

This treatment of random variables is just weird for an encyclopedia article on the subject. Many people daily use random variables that are integer-valued, vector-valued, sequence- or string-valued, complex-valued, function-valued (e.g., a process), state-valued (e.g., in a Markov chain over some arbitrary state set), etc. Yet the article seems to have been written by someone with a peculiar focus on real-valued random variables:

A random variable can be thought of as an unknown value that may change every time it is inspected. Thus, a random variable can be thought of as a function mapping the sample space of a random process to the real numbers. [And then the section goes on to encode the events "heads" and "tails" as 0 and 1, as if "heads" and "tails" weren't perfectly good ways to describe the outcomes already.]

a random variable is a (total) function whose domain is the sample space, usually mapping events to real numbers.

Typically, the observation space is the real numbers with a suitable measure.

In addition, the section on "equivalence of random variables" also restricts itself to real-valued RVs without stating this restriction. (Presumably this material should be part of the section on "real-valued random variables," if it belongs in this article at all.)

I think this is quite misleading. First, it suggests that real-valued RVs may have some kind of privileged status in the theoretical setup, or at the very least are more convenient. Second, it gives a falsely narrow picture of how random variables are used in practice. Third, it is likely to confuse the kind of naive reader who doesn't yet understand what a random variable is -- all this discussion of how outcomes are real numbers will encourage a naive reader to confuse outcomes with the other objects in probability theory that really do have to be real numbers, such as measures of sets. (Concretely: The reader is told that an RV is a function mapping events to real numbers, and this is illustrated with a die example involving two functions, one of which returns integer values like 1,2,3,4,5,6, the other of which returns obviously real values like 1/6. It sure looks like the second one ought to be the random variable!)

How about revising the article to emphasize rather than attempt to suppress the diversity of domains for random variables? (I am employing the common usage of the term "domain", a usage that should probably be noted in the article: One often says that the "domain" of a boolean-valued RV is {true,false}, even though properly speaking, the RV is a function whose range is {true,false}.) Eclecticos (talk) 07:44, 1 June 2010 (UTC)

I agree with most of the above, and I have made a few changes in the article to address some of the valid criticisms that Eclecticos has made. I am sure further changes along the same lines could usefully be made. However, I do think that for the inexperienced reader it is helpful to emphasise examples using real-number valued variables. Expressing the ideas in the more abstract setting of measurable sets is likely to completely lose the majority of readers, who have no idea what a "measurable set" is, and do not have the mathematical background to pick up that understanding by simply following a link to the Wikipedia article on the topic. Another good reason for emphasising real-valued examples is that in practice most people using random variables are using real-valued random variables. It seems to me to be a question of striking a balance: to suggest (as parts of the article seemed to) that random variables inherently have real numbers as their values is certainly unhelpful, but to give special prominence to real-valued variables is likely to be helpful. One of the changes I have made is to express two examples in non-numerical form, and then to show that they can be expressed as real numbers if desired. However, adding some more non-real-valued examples to the article would be helpful too, particularly ones which cannot usefully be expressed as real numbers. JamesBWatson (talk) 11:11, 1 June 2010 (UTC)
We've discussed this issue before, and nobody was able to come up with a reliable reference for the definition were a random variable would be non-real (see the random element though). The problem here probably is because most authors would like to speak of the expected value of the random variable, which might not exist for an arbitrary “observation space”. // stpasha » 04:09, 2 June 2010 (UTC)
I agree with Stpasha. Boris Tsirelson (talk) 06:46, 2 June 2010 (UTC)
Well, I must say that I was puzzled when I first read that a random variable would be real-valued by definition. (I remember this from the Handbook for Applied Cryptography.) But that's not what I learned in my math lectures, AFAIR. And it doesn't really make too much sense to restrict it to real numbers, as pointed out by Eclecticos. It seems more like a convenience matter to make it real-valued (and this would in fact cover integers and rationals as well). But see Wolfram's definition of a random variable. Nageh (talk) 07:15, 2 June 2010 (UTC)
I'd say, Wolfram's text is a bit Bourbaki-ish. I like it when speaking to (good) students of math department. But I did not expect it to be preferred in a (non-mathematical) encyclopedia. Boris Tsirelson (talk) 08:18, 2 June 2010 (UTC)
I wouldn't say it is preferred. But as for an encyclopedia I think it should cover both aspects. I think it should still provide a rather generic definition first, without going into details, and state that random values are often considered real-valued functions. Later in the article an exact formulation regarding measurable spaces should be provided. This means I mostly agree with the current situation of the article (rather than the previous one). Nageh (talk) 12:02, 2 June 2010 (UTC)
I think usage varies greatly. But one respected dictionary of statistics does specifically define "random variable" as "a real-valued function on a sample space", going on to distinguish discrete and continuous random variables. It has separate entries for "random process", "random event", "random series" and "random linear graph". However it is probably more important that this article fits in with other wikipedia articles which, I think, take the approach that a random variable is real-valued unless specifically stated (as being multi-dimensional or complex-valued). The question of what "random variable" should mean in Wikipedia articles seems an important one and it might be good to aim eventually for some statement in something like Wikipedia:WikiProject Mathematics/Conventions. Personally, I prefer the scalar-valued interpretation of "random variable", with other possibilities stated explicitly. Melcombe (talk) 10:08, 2 June 2010 (UTC)
I agree with Melcombe. Let me remind that I have checked 4 books and all 4 define "random variable" as "a real-valued function on a sample space". (Believe me I did not post-select; these were all appropriate books on my shelf; or do not believe and check yourself on your shelf.) It would be quite inconvenient to say in the majority of cases "the expectation of a real-valued random variable", "the median of a real-valued random variable", "the sum of two real-valued random variables" etc etc. (all these notions are inapplicable to random elements of general measurable spaces). It is just not optimal, to make many cases harder while rare cases easier. Boris Tsirelson (talk) 14:59, 2 June 2010 (UTC)
Because it does not actually simplify, but even contradicts common sense. If you draw a ball from an urn, and X denotes a random variable describing its color, then you'll want to compute P(X=red), and not map it to a real value first. Even though random variables are repeatedly defined as real-valued, it really was confusing me when I saw that definition first. Sure you may compute expected values etc. but for some spaces it simply doesn't make sense. (What is the expected color of a ball drawn at random?) And AFAICT, simple examples like drawing colored balls from urns are those you start with when you learn probability theory and stochastics in school/introductory lectures. Nageh (talk) 15:27, 2 June 2010 (UTC)
As for me, you talk about a random color (more formally, a random element of the set of colors), which is completely legitimate; but why call it random variable?
Surely you have something to reply, but anyway: two different points of view are presented, each having its strong and weak features. What now? Should one of them be chosen? Or both, combined? In which proportion? According to the number of supporting WP editors? To their insistence? To the number of supporting reliable sources? Something else? Boris Tsirelson (talk) 17:49, 2 June 2010 (UTC)
From the point of view of analysis, the “random variable” ball color is not particularly interesting. The only thing which is interesting is the event “ball color = red”, which is already a binomial random variable, meaning that it takes real values 0 and 1. Ok, it's probably hard to see the point in this simple example, so consider another one. Suppose we have a “random variable” shape of an amoeba cell. If you're a biologist you might be highly interested in this random variable, you may observe it as many times as you want under your microscope, you may take pictures and write long papers about it. But if you want to actually analyze this “random variable”, you'll have to cast it into the domain of real numbers first. Thus you'll have an area of amoeba, its circumference, its diameter, its surface energy (a measure of curvature), etc. With these real-valued random variables we can already calculate summary statistics, run regressions, draw scatterplots — that is, apply the statistical analysis. With the shape “random variable” we can't do anything except taking pretty pictures. // stpasha » 08:43, 3 June 2010 (UTC)
Yes, pretty pictures. Also some highly abstract math: introduce an appropriate space of all "shapes", endow it with a sigma-algebra, consider probability measures on it, prove that they lead to standard probability spaces etc. In fact, I like this math; but a typical reader of WP likes it much less, I believe. Boris Tsirelson (talk) 10:08, 3 June 2010 (UTC)
What is a typical WP reader? See, even though I rely on a math background, I am not a mathematician. And I can only repeat that I find it highly confusing when random variables are introduced as real-valued "by definition". What is wrong with stating them as functions into some observation space, and pointing out that often this can be considered R? Anyway, I don't vote here, and I don't insist, just expressing an opinion. Nageh (talk) 10:27, 3 June 2010 (UTC)
It would be helpful to insert the amoeba example to this article and/or to the "random element" article. It could clarify the relation between random variables and random elements. Boris Tsirelson (talk) 11:09, 3 June 2010 (UTC)
Stpasha, a few remarks in response. You focus on statistics but random variables start out as part of probability theory; they just have applications to statistics. Let A (for "amoeba") be your shape-valued random variable. First, there are many reasonable things to ask about A itself without extracting real numbers from it, such as its entropy, or its mutual information with another random variable (which represents the same amoeba 1 second earlier, or a polygon that approximates A). Second, you are pointing out that C = circumference(A) and D = diameter(A) are also random variables and are real-valued. That is true, but it just highlights why it is important to regard A to be a random variable as well! If you know the distribution of A, then you immediately obtain the joint distribution over the pair (C,D); you may not be able to define the distribution over (C,D) without reference to A. Third, you suggest that you can't "do any statistics" with A except through the lens of real-valued variables like C and D. But that seems odd to me. For example, I'm sure you'd agree that estimators and decision rules are part of statistics. Suppose you have an estimator for the circumference C based on noisy observations A1, A2, ..., which are themselves shape-valued random variables that are conditionally independent given A. The bias, variance, risk of this estimator involve integrating over the possible values for A1, A2, ... directly. Eclecticos (talk) 12:43, 20 June 2010 (UTC)

Hi, original poster here (sorry to have started this discussion and then not checked back). I think it will be clearer for me to respond collectively rather than inline.

Stpasha asks for a reliable reference for the general definition of random variables. Here is one (via Google Books) from a textbook, Fristedt & Gray (1996), p. 11. (This was merely the first book I tried: I happened to run into a textbook via Google when checking the definition of conditionally exchangeable sequence, so I checked its definition of random variable.)

My guess is that any graduate-level probability theory textbook would use this general definition, because it is laying out the theoretical foundations of the field. However, I understand that some statistics textbooks (particularly introductory or applied ones) will focus on the real-valued case. That is the focus of traditional statistics and is rich enough to fill a first textbook with theorems about moments, the bias and variance of estimators, particular distributions over reals, etc.

Traditional statistics aside, however, modern statisticians often deal with random variables that are not real-valued. I think the relevant question is this: If you are a statistician and you want to refer to such an object, what do you call it? Well, I have read hundreds of machine learning papers that refer to such objects as random variables ... whereas I have never seen the term "random element" used as a standalone technical term (it is only used in a phrase like "random element of set S," meaning a random variable ranging over the elements of S). People do refer to random sequences, random graphs, etc., but these are understood to be special cases of random variables: "random graph" is just short for "graph-valued random variable."

I gather from the random element article that when Fréchet (1948) generalized the classical definition of "random variable," he thought it would be less confusing to his readers if he introduced a new term "random element" for the generalization. However, I am asserting that modern usage simply does not bother to make this distinction.

I have participated in several oral qualifying examinations of Ph.D. students where the student stumbled on the type of the mathematical objects involved, and so was asked by one or another statistics professor to give the formal definition of a random variable. The desired answer was always simply that it is a measurable function on a probability space. Not a measurable real-valued function. In fact, in these exams, the random variable that triggered the question typically ranged over sequences or graphs or whatever was being studied in the student's thesis proposal.

Boris asks how we should make the decision about this article. My take is this: When a first-year computer science graduate student is struggling to read a research paper, and is using the web to fill in gaps in his or her prob/stats background, the first Google hit for "random variable" is this article. So this article should make it easier, not harder, for the student to understand the paper. The papers that I give my first-year graduate students almost always use "random variable" in the broader sense, so the current article will only confuse them (i.e., it is worse than useless to them). Nor can I usefully email this link to current students to remind them of what a random variable is formally. I would be happy to cite examples of current papers that require the broader definition.

Several people are rightly worrying about presentation. I think a good order would (1) give an intuitive notion of random variables as unknown quantities (and mention that they can be assumed to be real-valued unless otherwise specified), (2) observe that to talk about multiple correlated random variables they all need to be functions of the same underlying outcome space, (3) give the formal measure-theoretic definition of required properties of these functions, (4) give examples. Eclecticos (talk) 12:43, 20 June 2010 (UTC)

Well, I have only one objection — to the phrase "My guess is that any graduate-level probability theory textbook would use this general definition". When starting this discussion I just listed four books that do the opposite (and these were just all the relevant books on my shelf at that moment). But I agree that Fristedt & Gray is a good example on the other side. About "several oral qualifying examinations of Ph.D. students", well, I have no such statistics; probably you are right. About "a good order" (1–4) I have no objections. Boris Tsirelson (talk) 15:42, 20 June 2010 (UTC)
Beyond Fristedt & Gray, I think I could quickly turn up several other references supporting my usage (on WP itself, by the way, see the discussion at random variate, which defines random variable as I do). Here's a clear statement on p. 40 of Michael I. Jordan's 2005 NIPS tutorial: "In elementary probability theory, random variables are defined as functions whose ranges are the reals. In more advanced probability theory, one lets random variables range over more general spaces, including function spaces and spaces of measures."
Just for the record: my first note and discussion, further discussion. And here are the four books: "Probability: theory and examples" by Richard Durrett, "Probability with martingales" by David Williams, "Theory of probability and random processes" by Leonid Koralov and Yakov Sinai, and "Measure theory and probability theory" by Krishna Athreya and Soumendra Lahiri. Not at all books for statisticians! Just graduate textbooks in probability. Boris Tsirelson (talk) 15:52, 20 June 2010 (UTC)
Boris: thanks for the refs. It looks like I have to withdraw my statement that in modern usage, "random variable" is always taken to be the more general term and encompasses the notions of "random vector", "random sequence", etc.
  • Athreya and Lahiri (2006) restrict "random variable" to real-valued even though random vectors, sequences, etc. are very much within the scope of the book -- they define all of these terms on p. 191 as distinct special cases of measurable functions.
  • Koralov & Sinai (2010) go even farther: they actually restrict even the term "measurable function" to real-valued functions! However, they are inconsistent: when they get around to defining "random process" and "random field" on p. 171, they say that "all the random variables X_t [in the process or field] are assumed to take values in a common measurable space ... in particular, we shall encounter real- and complex-valued processes, processes with values in R^d, and others with values in a finite or countable set [emphasis mine]." So they seem to assume the general efinition when they need it.
I think the lesson is that terminology varies. If you're writing a textbook, you have room to include definitions, and then you are entitled to define your terms in a way that will allow you to state your theorems in as few words as possible. If you have one chapter of theorems that are specifically about random real numbers and another chapter specifically about random sequences, then you might want to have separate short names for those things. I think this is why Athreya & Lahiri choose their terminology as they do. On the other hand, if your theorems are about conditional independence, inference, and sampling, as in the graphical models literature, then your results are mainly indifferent to the types of the random objects involved, and so you want a term that is general enough to cover any type. The term usually used in this general setting, in my experience, is "random variable" (and not "random element" or "random object" or "measurable function"). Eclecticos (talk) 03:26, 21 June 2010 (UTC)
Eclecticos, when I think of a random variable, I think of something I can manipulate with the typical machinery. Can you help me out: in the amoeba example, A is the "shape" of an amoeba and C is its circumference, can you please tell me what the definition and meaning of E(A), Var(A), Cov(A,C) is. Thanks. 018 (talk) 16:10, 20 June 2010 (UTC)
Oh, those expressions are not defined -- they're not well-typed, unless one has defined appropriate sum and product operations on shapes. Like ordinary variables in math or in computer science, random variables have types, which indicate what you can do with them. (Similarly, you may reasonably ask about the distribution of the random quantity C+3, but there is no random quantity A+3 since that expression is not well-typed. On the other hand, there is a random quantity rotate(A,π). Closer to your question, there is a conditional expectation of C given A, but not vice-versa.) Eclecticos (talk) 03:26, 21 June 2010 (UTC)
Anyway, I think the amoeba discussions are somewhat tangential. You and stpasha are asking the interesting question of why statisticians would ever want to theorize about random quantities that are not real-valued. But the fact is that they do (sometimes under names like "random measure," "random process", "random field", "random complex number," etc.). The question here is just about terminology. Eclecticos (talk) 03:26, 21 June 2010 (UTC)
Eclecticos, there are a few different types of generalizations of RVs. There are generalizations that allows E(X) to make sense: vector valued, complex valued, integer valued. Then there are the ones where E(X) makes no sense at all (amoeba valued). The point is the terminology is specifically designed to make it so that all RVs have the right "type" so that E(X) is defined. I do see the value of thinking of the frontier of an amoeba as a shape and performing operations on it. But my point is semantic: RVs are the real valued things (though they generalize slightly). 018 (talk) 03:49, 21 June 2010 (UTC)
Now the article is inconsistent. I see, we took the burden to say "real valued" whenever needed. (This is what I tried to avoid but was not convincing.) Now please add it to the "Moments" section, and "Equality in mean "section, and "Convergence" section, and whenever needed (and not only in this article). And what about "Functions of random variables"? Either random variables should be real-valued, or functions should be general. Boris Tsirelson (talk) 13:19, 21 June 2010 (UTC)

Okay, so the current version of the page now has this general definition but never uses anything but random variables (remember, the real valued is implied). Clearly we need a section on properties of non-real-valued random variables and examples. 018 (talk) 16:41, 21 June 2010 (UTC)

We need to merge the random element article into this one, since both names can in fact be used interchangeably.
There is a bigger problem with the explanation of the concept of a random variable though. There seems to be a huge gap between the mathematical definition of a random variable, as a function which maps the sample space into the “observation space”, and the real-life examples of random variables, such as age, height, temperature, income, race, etc. The problem is mainly that the “sample space” is a highly theoretical construct, and is not actually observable in the real life. Usually we rely on the Kolmogorov’s theorem, which states that given a distribution function one can construct the sample space and the measurable mapping X such that the resulting random variable will have the desired distribution. I’m not sure if this kind of theorem can be extended to our new generic definition of a random variable, but probably it can. Anyways, the meaning of this theorem is that we can alternatively define random variables in terms of their distribution functions (a much more comprehensible definition), so that the Kolmogorov’s theorem becomes the theorem about the equivalence of two definitions.  // stpasha »  07:55, 22 June 2010 (UTC)
Why?? Just the opposite. The age and height are functions from the population (endowed with the uniform distribution) to the real line. This is the simplest case, easy to understand. The next step is, replacing the finite actually existing population with a more abstract, usually continuous set of possibilities; but the philosophy is the same: each point of a probability space is a possible man/woman. And ultimately: each point of a probability space is a possible state of the Universe. Kolmogorov's theorem is a technical mean needed only for infinite dimension. For dimension two (age and height) the plane endowed with the given joint distribution IS such a probability space. What is the problem? Boris Tsirelson (talk) 10:33, 22 June 2010 (UTC)
I'm not a big fan of the finite-population case, so let's talk about the random variable “height of a person chosen at random in year 2100”. Then the sample space Ω will be the space of all potential persons who could live in 2100. Then an elementary element ω will correspond to a single possible person. At this point my imagination betrays me. What could possibly be the sigma-algebra on such set Ω? In order to check that the random variable “height” conforms to the definition, we need to know this sigma-algebra... How to specify the probability function on Ω? Once we have this function we can push-forward it to the observation space and determine the distribution of the height r.v. I don't think these are simple questions, especially since we know that people don't just pop into our universe out of nowhere, but instead are generated through some very nontrivial processes, and thus can themselves be seen as random variables, say, originating from the space of DNA configurations.  // stpasha »  13:15, 23 June 2010 (UTC)
stpasha, Deming wrote a piece on treating a census as a sample that you might find enlightening. 018 (talk) 14:19, 23 June 2010 (UTC)
stpasha, do not be more serious than it is usually made. Philosophically, it is the space of possibilities. But mathematically in each specific case we know what to ask. As I wrote, if we want to discuss age and height, then the plane endowed with the given joint distribution is such a probability space. And, yes, if afterwards we decide to add the income, then we replace the probability space "on the fly". This is usual. We have a canonical, measure preserving, map from the new space to the old space, and so we transfer the old random variables to the new space, and forget the old one. And if we add infinitely many coordinates then indeed Kolmogorov theorem is useful. Otherwise Lebesgue-Stieltjes measures are what we need (or even less, just integration, if the joint density exists). Well, you may be dissatisfied by this approach, but then check whether this is your POV or you have sources in support. Boris Tsirelson (talk) 14:52, 23 June 2010 (UTC)
Which is more-or-less exactly my point. “Not being more serious than it is usually made” means that there are certain conventions how the definition has to be applied in practice, and this layer of explanation is missing from the article. Say, if a simple person, who is not a probability guru, comes to this page and tries to figure out whether “the height” is indeed a random variable or not, using the definition provided, then I'm afraid he/she won't succeed. (Oh, and I don't know why I thought the Skorokhod's construction was called the Kolmogorov's theorem >.>)  // stpasha »  05:22, 25 June 2010 (UTC)
You are welcome to help to "the simple person" by explanation... Boris Tsirelson (talk)

Proposed middle ground

How about we define it like this: random variable has the reals (or some subset) as its domain and then say there is a generalization of random variable that allows the range to be any measurable space, noting that some authors simply call this a random variable. This makes expositional sense because it starts simple and then adds levels of complexity. In the words of Eclecticos, for students from classes similar to the ones I took, "this article should make it easier, not harder, for the student to understand the paper." In it's current state, it fails that test. But we can make it work for both students and keep in line with the sources.018 (talk) 14:12, 22 June 2010 (UTC)

This discussion alludes to random sequences among other random variables in the broad sense. It seems to me that our article Random sequence, after its second sentence, shifts attention to sequences of values (candidate random variates) rather sequences of functions (candidate random variables). Primarily it concerns assessing the randomness of particular binary sequences (domain N or one of its elements, codomain {0,1}), which seems to me the proper scope of our article Algorithmic randomness. Right?
What's at stake here? Is it to improve this article standalone or to agree an expository strategy for all articles in some sense? (Probability and statistics may be a candidate scope of agreement.) If the latter, then our hope is that editors generally work along with this article and perhaps its cousin Randomness (where "Random" redirects); links to this article or these two will be generally useful to readers of all articles. --P64 (talk) 22:55, 1 August 2010 (UTC)
Algorithmic probability has its own terminology, not always consistent with that of "classical" probability. Usually the context suggests which one is used. Boris Tsirelson (talk) 08:00, 2 August 2010 (UTC)

I really hate this article now. What is a moment generating function now? What is a moment? What exactly is the disadvantage of including the broader definition in a section about a broader distribution? If we don't most the of article needs to be qualified. 018 (talk) 23:12, 21 August 2010 (UTC)

Removing prob. distribution stuff

I removed most of the probability distribution stuff since the definition of distributions should be in that article. This section was good, but doesn't belong here:

Er, OK, but where did you put it? I don't see the examples in probability density function. I also think that if you take this stuff out, you need to include a reference in this article to where to find it. At the minimum, you need a section "Functions of random variables" that includes a short discussion of what this means and a link to where to find a further discussion, including how to compute the density of a function of a random variable. Similarly there should be a section "Moments of random variables". Basically, everything that is relevant to random variables needs to be mentioned in this article; just because the detailed discussion might be more relevant elsewhere doesn't mean the issue should be removed entirely. Benwing (talk) 03:37, 22 October 2010 (UTC)
I think that all that stuff should be in probability distribution because a random variable -- erven a real-valued random variable -- need not have a distribution, and therefore need not have an expected value or a moment or any of that stuff. These things are all properties of the distribution (the measure itself) not the random variable (the measurable map.) I realize that the article about probability distribution needs a lot of work, but does it make sense to make up for it by putting all the stuff that belongs there over here? Imagine that you're looking to find out what a random variable is and you're flooded with all of this information that is only vaguely related to random variables -- it's good information, sure, but it doesn't answer your question at all. My vote for what should happen is that probability distribution be fixed. The merges that were suggested by user:Stpasha sound like good ideas. This section about "functions of random variables" is hard to place. Maybe it belongs here, but then it doesn't need to go into distributions. What do you think? MisterSheik (talk)
The problem with getting into probability distributions here is it gives the wrong impression -- it makes you think that the random variable has the probabilities built-in. All the random variable does is gather up the events into big pieces that gan be measured. E.g., if you had a die, you could have an indicator random variable for roll is less than 3. There's no mention about distributions, except the guarantee that whatever the underlying probabilities of the outcomes on the die have to agree with the probabilities of the indicator variable. So, why fool the reader into thinking that there are probabilities? Why not link to prob. distribution and over there say "probabiltity distributions with real support have statistics such as expected value, ..."
"a random variable need not have a distribution"?? This is your Point Of View. The standard definition in most general case is: a random variable is a measurable map from a probability space to a measurable space. If you prefer "from a measurable space to another measurable space", it is your original idea. Boris Tsirelson (talk) 09:18, 22 October 2010 (UTC)
Every random variable has a distribution (although not a density), a characteristic function, and a notion of expected value attached to it. That is the difference between a random variable and a mere measurable function. The section about probability distributions should be trimmed down, but cannot be omitted altogether, since it is one of the most important properties of a random variable. The transformation of random variables section may not be entirely appropriate here, — perhaps move it to the probability density function? Because it really it talks about the transformation of densities (the transformation of distribution functions is actually quite trivial — a superposition of two maps).  // stpasha »  13:44, 22 October 2010 (UTC)
I was just copying the definition out of http://www.math.duke.edu/~rtd/PTE/PTE4_Jan2010.pdf . (He defines random variable as a measurable map to the reals.) If there's another good reference that suggests otherwise, then I'm happy to leave the definition using prob. spaces. I agree that the other information should be in the density function page. MisterSheik (talk) 15:20, 22 October 2010 (UTC)
If you're talking about his definition at the beginning of paragraph 1.2, then he says that a random variable is a map from Ω to R, without specifying what that Ω is. But already at the bottom of this page he claims that “if X is a random variable, then X induces a probability measure on R called the distribution”. Thus he meant that Ω was a probability space all along.  // stpasha »  17:34, 22 October 2010 (UTC)
I'm talking about the section entitled Random Variables. It clearly shows that Omega is the sample space. It says A measurable map is.... and then it says if the target is the reals, then it's called a random variable. I'm considering that this is not case, but I don't see how there could be another interpretation. MisterSheik (talk) 18:14, 22 October 2010 (UTC)
So it means he has two inconsistent definitions of a random variable. And later on, when he talks about the expected value of a random variable, the probability distribution miraculously reappears... It'll be easier to write to the author of this manual and ask him to rectify the definition.  // stpasha »  00:27, 23 October 2010 (UTC)
Just another reference point here ... in the MathWorld definition here: [1] it specifically mentions that a r.v. is a function from a probability space to a measurable space, quoting Doob 1996. Benwing (talk) 07:28, 23 October 2010 (UTC)
You're right: it seems inconsistent. I think we should go with the probability space definition. However, I maintain that probability distribution and its consequences should be explained in that article. MisterSheik (talk) 08:07, 23 October 2010 (UTC)

Expectation of what?

"Expectation of a random variable"? Or rather, "Expectation of the distribution of a random variable"? The second option may be tempting, but leads to problems, as follows.

  • If XY almost surely then E(X)≤E(Y). Can we reformulate it in terms of distributions? Yes I can (can you?) but it becomes more technical and less intuitive.
  • E(X+Y)= E(X)+E(Y) (always, not just for independent random variables). Can we reformulate it in terms of distributions? Yes I can (can you?) but it becomes much more technical and less intuitive.
  • Also, think about Jensen inequality, first of all, (E(X))2≤E(X2), and many other statements.

Boris Tsirelson (talk) 07:08, 24 October 2010 (UTC)

The lead

"to each possible outcome of a random event" — really? Or rather, of a random trial? (or "experiment") Boris Tsirelson (talk) 12:03, 22 October 2010 (UTC)

I think this has to be random event. The events are defined to be sets of outcomes, and the outcomes are the things that are mapped by the random variable. MisterSheik (talk) 18:18, 22 October 2010 (UTC)
Really, you think so? Then, what about the probability of this event? It is the probability that the random variable is defined! It must be equal to 1 (if you do not want to replace the standard notion of a random variable with your original one). Thus, in order to make the formulation correct, we have to say
"to each possible outcome of a random event of probability 1"
which is a formally correct, but ugly and puzzling formulation. And no wonder: the notion "event" is not intended for such use. Boris Tsirelson (talk) 16:08, 23 October 2010 (UTC)
Let me add that you can successfully implement your idea of a good article only when you are familiar with the topic of the article. Otherwise you'd better suggest your changes on the talk page. Boris Tsirelson (talk) 16:12, 23 October 2010 (UTC)
I read the article as saying "to each possible outcome of any random event" rather than "to each possible outcome of a particular random event". I think it's unnecessarily ambiguous. Why not replace it with "the sample space". If the link doesn't satisfy, then "the sample space (the set of all possible outcomes.)". MisterSheik (talk)
"to each possible outcome of any random event" is a strange idea, since each outcome belongs to a lot of different random events, and they all are irrelevant to the point. Boris Tsirelson (talk) 07:02, 24 October 2010 (UTC)
Well, I did "possible outcome, that is, element of a sample space". Boris Tsirelson (talk) 13:01, 24 October 2010 (UTC)

about deletions

MisterSheik, you cannot cannot cannot simply remove stuff that you think belongs elsewhere without doing all the work yourself of moving it, integrating it into the new page, and making sure the old page provides sufficient context about what was moved that the relevant part of the new page is easily located. Just dumping it in a talk page is not a proper substitute; you're basically saying "OK, I think the house needs to be rewired, so I'm just going to remove all the wiring that I think doesn't belong and dump it in the corner; if you need any of that wiring, here's where to find it."

I understand how that can be frustrating, but in fairness there was talk on this very talk page describing how moments did not belong on the page and so on. It's the writer's responsibility to make sure that his work is in the right place too. I'll discuss the deletion that you find objectionable below to explain why I still think it makes sense to remove it. MisterSheik (talk) 08:22, 23 October 2010 (UTC)

I understand your desire to maintain technical correctness, and I totally sympathize with your instinct to write the article in a "pure" fashion that lays everything out linearly and concisely, the way you might in a good grad-level math textbook. I've done the same for WP articles on subjects where I really am an expert, such as Old English phonology. The problem however is that if you do this, the article is only readable by experts, which is exactly what you do not want, since 99.9% of the readers are likely to be non-experts. I could (maybe) argue that Old English phonology is a sufficiently esoteric subject that the typical reader will be linguistically savvy enough to make sense of a statement like "the pairs /k/~/tʃ/ and /ɡ/~/j/ are almost certainly distinct phonemes synchronically in Late West Saxon ..." without explaining the IPA symbols used and without bothering to explain what a "phoneme" is or what "synchronically" means ... But this is definitely not the case for random variables.

This is a great point, and thank you for taking the time to explain it so clearly. I do agree with you that accessibility is very important. I accepted that the first paragraph of the article be non-technical, but I still think that one sentence in the entire four paragraph lede to make it clear that there exists a formal, clear way of talking abou this concept would be great. No math symbols, just "In the measure theoretic formulation of prob. theory, a random variable is a measurable function from a probability space to a measurable space. One super short paragraph for other readers. MisterSheik (talk) 08:22, 23 October 2010 (UTC)

You should read WP:TECHNICAL. The article needs to be geared towards the average reader, not the expert. Ask yourself, your measure-theoretic concerns about whether a random variable technically must include a distribution or not, are they relevant to the average non-expert reader? Will the average non-expert reader be served by a discussion here about the distribution of a random variable, its expectation and variance, functions of a random variable, etc.? If the answers are "no" and "yes", respectively, then you need to discuss this stuff here. If you feel your measure-theoretic concerns are important, then by all means discuss them in the relevant "for experts only" section.

I totally agree, but it's humiliating to presume that the non-expert is also too stupid to learn about measurable spaces. He may not be interested, and for that he can just read three short paragraphs in the lead and know what a rv is. If he wants the measure theoretic formulation he only has to read one line, and then read about measure theory— if those articles are kept short, then he can reasonable teach himself measure theory on wikipedia. MisterSheik (talk) 08:22, 23 October 2010 (UTC)

But keep in mind that, based on my experience and the experience of others I've worked with, the average reader is going to be rather confused about what a random variable is, how to think about it intuitively, what the relationship between a probability distribution and a random variable is, what it means to apply a function to a random variable, how you actually go about deriving the distribution of a function of a random variable, etc. In fact, the average reader will be sufficiently confused that if you just move stuff over into probability distribution they may well have a hard time figuring out how to apply the stuff there to a random variable, even though it seems totally obvious to you. Hence, it helps to be really specific and include lots of examples. Once you straighten out this article I'm going to add some more stuff about some of the areas I was very confused about, which I think will be very useful. Benwing (talk) 07:55, 23 October 2010 (UTC)

I really think that having a clear separation between what shows up on the rv page and the distribution page will help cement the conceptual differences. Duplicating all of probability theory on every related page doesn't make things easier to understand. What we have to consider is that the reader gets tired, and every reader will only read a given number of words. It's better to keep the pages succinct. That means organizing things and defining related comments succinctly, and providing links instead of putting in entire sections that redefine the related concepts. MisterSheik (talk) 08:22, 23 October 2010 (UTC)
You've made a number of good points, and I'll respond to them, but first I must note that you've missed the main point that I'm trying to make, which is that you've deleted a lot of important material without moving it anywhere or supplying a link to it in this article. The result is that the article is in a bad state. You don't seem to show any interest in fixing the problems, so I've gone ahead and fixed it myself by undoing the deletions.
As for whether and how to separate probability distributions from random variables, the point is not that you have to duplicate everything everywhere, but that you need to include a sufficient discussion of all relevant matters on the page to which it's relevant. In this case you've left the article with no discussion whatsoever of functions of random variables, moments of random variables, etc. How is a general reader to know where to find this info? It won't be obvious for them to go look on probability distribution (and the info isn't even there anyway, since you never moved it). Also, as for your comment about "humiliating to presume that the non-expert is also too stupid to learn about measurable spaces", this isn't what I said. Rather, it's simply not relevant to the vast majority of readers, and many of them will be confused if you insert too much stuff about measurable spaces, since they will have never even heard of the concept. I really think you should actually go and read WP:TECHNICAL and take it to heart. Here's why it's not a good idea to litter the "for non-experts" sections with expert-only material: For the non-expert, such material will be confusing and make it hard to find the stuff that's relevant to them; for the expert who already knows about measure theory, they will expect a discussion of it and can simply go down and find the relevant section. Benwing (talk) 00:31, 24 October 2010 (UTC)
How can you possibly believe that I want to make everything too technical. Look at what I removed: some measure theoretic stuff about the composition of measurable functions. Who is going to miss that section?
Here's my suggestion though: why not rewrite these things I removed using one sentence for every paragraph. Moment can be explained in one sentence with a link. Same with "functions of random variables.
Also, we need to decide if r.v. means real-valued random variable. If you want it to mean that, it should say that in the first line of the article. Otherwise, I would suggest having some non-real-valued examples.
I'm sorry that I don't have time to rewrite everything to do with probability theory on wikipedia. MisterSheik (talk) 06:49, 24 October 2010 (UTC)
What a sorrow :-) Boris Tsirelson (talk) 07:15, 24 October 2010 (UTC)
OK, as for making things too technical, what I was referring to was the fact that you were letting concerns that are relevant only for experts drive the structure of the article. Maybe, possibly a random variable can have no distribution (but the other posters disagree on this), but this is a very technical issue, because from a practical standpoint, r.v.s always do have distributions. Also your suggestion to take out paragraphs and replace them with a short sentence might work, but I suspect it would simply render the article too confusing for non-experts. I'd have to see what you actually wrote to be sure. Keep in mind that statistical topics like random variables are very tricky for people to get their heads around, and even connections between topics that seem super-obvious to you will not be at all obvious to them. Hence, spelling out explicitly how everything connects and giving lots of examples is good. Obviously you can go overboard but I think it's better to err on the side of too much text rather than too little. As an example: a function of a random variable is a tricky concept, and someone who doesn't already grok it will not get it from a one-sentence description. Benwing (talk) 08:48, 24 October 2010 (UTC)
BTW your comment about non-real-valued examples is a great one, thanks for making it! I'll see about incorporating it.
In general, I really do appreciate your input into this article and I think others do as well ... almost all Wikipedia editors in the process of learning Wikipedia culture, expected etiquette, etc. occasionally have hiccups -- don't sweat it ... Keep up the good work! Benwing (talk) 08:48, 24 October 2010 (UTC)
Thanks for your well-word comments. I do try to keep everyone in mind, but it's true that I am most concerned about people who have the patience and mathematical background to learn — even though there are plenty of other people who might be put off by mathematical language, or text without examples. I think that's one benefit of having many editors on wikipedia: they balance the "concerns that drive the structure of the articles." MisterSheik (talk) 23:25, 24 October 2010 (UTC)

Examples

A random variable is real valued. Every single source defines it that way. Now, there are also non-real valued random variables, but then they are preceded by a quantifier: a complex-valued r.v., a vector-valued r.v., an (E, ℰ)-valued r.v., and so on. But if you omit the quantifier, then it has to be the real-valued random variable. Which is why the first example given in the Examples section is wrong, I have deleted it but then somebody put it back :( Also there is no point in giving the examples of the probability mass functions before you actually tell the reader what that is. The second example strikes me with its stupidity... Really, if X is “the number rolled on a die”, then who needs the “clarification” that X = 1 if 1 is rolled, 2 if 2 is rolled, ..., 6 if 6 is rolled ???  // stpasha »  08:05, 24 October 2010 (UTC)

I put it back because I was trying to undo deletions that MisterSheik had made. I didn't realize this was your work instead. I'm not sure what exactly you had done before, so either point me to what exactly it was and I'll delete it again, or go and and delete yourself.Benwing (talk) 08:27, 24 October 2010 (UTC)
Nonetheless, I don't believe it to be the case that if you just say "a random variable" without qualification, it must necessarily be real-valued (often yes, but always, no). Now, AFAIK a random variable is normally real valued, but can also take other types. In such a case, my English intuition tells me that if you just see "a random variable" without qualification, its interpretation is determined by context, with "real-valued" as the default. In other words, some contexts will make it so that there's only one logical interpretation; but if the context doesn't do that, then the "default" of "real-valued" wins out. For example, if you're describing how the Gibbs sampling algorithm works, and you describe each node in the Bayesian graphical model as being or having "a random variable" (with no qualification), then you are obviously talking about a general r.v. of arbitrary type, not a real-valued r.v. Benwing (talk) 08:27, 24 October 2010 (UTC)
I'm not sure I see your point there. In the standard Gibbs sampling algorithm every node is a real-valued pseudo-random variable. Now, of course the algorithm could be extended to non-real valued r.v.’s, but if you want to talk about arbitrary random variables without qualifying their type it’s better to use the term “random element”.
One of the principal reason why we want random variables to be real-valued is because then they possess several nice properties, such as cumulative distribution function, characteristic function, expectation operator, — all these might not be defined if the random variable has arbitrary type (say, X = {heads, tails} random variable).  // stpasha »  19:46, 24 October 2010 (UTC)
I just want to point out two things: The Durrett text, which is just one source that we all have access to, defines r.v. as real-valued. I liked the suggestion (whoever's it was) to merge random element into this page, and if we do that, then what would the distinction between random element and random variable be? MisterSheik (talk) 23:17, 24 October 2010 (UTC)
OK, but in the realm of natural language processing (NLP), which I work in, it's quite common to have non-real-valued random variables. Bishop's book "Pattern Recognition and Machine Learning" uses the term "random variable" in connection with general algorithms (Gibbs sampling, Variational Bayes), etc. where it's quite clear that he does not intend to restrict the algorithms to real numbers -- in fact the examples tend to include more vector-valued r.v.s than real numbers. Nowhere does "random element" appear anywhere in this text, nor in any other texts or research papers that I've seen in the field of NLP, despite the fact that many if not most of the r.v.s are not real-valued. Benwing (talk) 07:11, 27 October 2010 (UTC)

Mathematics or probability theory

Could anybody explain why in the lead sentence the topic is associated with the probability theory? Since the random variable is a mathematical variable, and used as a pattern in probability theory and statistics, it would be more common to mention only mathematics.--Kiril Simeonovski (talk) 18:56, 13 November 2010 (UTC)

Are you sure that "the random variable is a mathematical variable"? I am not. There is no formal notion of a "variable" in mathematics (there are sets, functions etc., but not "variables"), but even informally, a "variable" in mathematics (whatever it reasonably means) has no probability distribution. A random variable has. Boris Tsirelson (talk) 20:22, 13 November 2010 (UTC)
Indeed, there are variables in mathematics, described as changeable values. Unlike random variable, other variables do not have probability distribution, but other types of distributions (note the frequency distribution). However, you're right. There is not exact definition about what in general a variable should include.--Kiril Simeonovski (talk) 23:13, 15 November 2010 (UTC)
I agree with Boris, "variable" has a range of meanings within mathematics. In this case, a "random variable" is a particular type of mathematical object, one that (as I think about it anyway) has no value a-prior but that has associated with it a probability distribution function that determines values it could take on. I don't understand what Kiril means by "used as a pattern". I would say there are lots of types of objects in mathematics, one type is a "random variable", which has applications in probability and statistics. While I wouldn't be surprised if they are in some way isomorphic to something with broader applications in math, I think that's stretching it. —Ben FrantzDale (talk) 17:00, 14 November 2010 (UTC)
Thanks. I consider probability theory a branch of mathematics, same as algebra, geometry or calculus. The global usage and importance of the random variable in the field of probability theory made me compare it with another key mathematical terms, such as plane in geometry, or permutation in combinatorics. In the lead sentences of both, plane and permutation, is mentioned "mathematics" (not "geometry" and "combinatorics"), and therefore I used to do the same with the random variable (in general, no probability without random variable, as no geometry without plane). My notion is that the articles concerned with the probability theory are very well covered, which could be used to trim the other mathematical articles.--Kiril Simeonovski (talk) 22:38, 15 November 2010 (UTC)

Examples

I found the first example very confusing. It starts with "the following random variable : X=either head or tail." However, the definition of a random variable given just below is "a random variable is a measurable function". In the example, where is the function ? What is the variable of the function, what is the outcome depending on the variable ?? I find that very unclear : it seems to define the state space only. - Nicolas. 152.81.114.116 (talk) 15:00, 28 December 2010 (UTC)

Thanks for pointing this out. Hope my revision has answered your objection. Duoduoduo (talk) 15:33, 28 December 2010 (UTC)
Thanks, it's indeed much better. I'm wondering if the notation X(w=head)=1, X(w=tail)=0 would be better ? Or X(w)=1 iff w=head ? It would clearly indicate the state space and would show the random variable as a function. I'm not expert enough to decide by myself. 152.81.114.116 (talk) 15:48, 28 December 2010 (UTC)
How does it look now? Duoduoduo (talk) 20:42, 28 December 2010 (UTC)
Thanks. I guess this is better - but I'm not a mathematician! 152.81.114.116 (talk) 21:59, 29 December 2010 (UTC)

The real numbers with a suitable measure

Does "a suitable measure" refer to the probability measure, P? If so, maybe this could be made explicit. If not, why do the reals need a measure here? They're said to serve as the first item of the tuple (E,script E), but no measure was required for (E,script E) where E is not R. Dependent Variable (talk) 16:40, 2 March 2011 (UTC)

I agree, and remove the "suitable measure". --Boris Tsirelson (talk) 16:53, 2 March 2011 (UTC)

"try and improve comprehensibility"

The former phrase "Formally, it is a function from a probability space, typically to the real numbers" was correct. The new phrase "and the probability (or probability density for continuous random variables) of each of these values is defined by a probability space, typically restricted to the real numbers" is either incorrect or vague. In which way does the probability space define the probability? What is typically restricted to the real numbers, the probability space?! Boris Tsirelson (talk) 17:06, 8 February 2012 (UTC)

Now it is much better (I think so); but the phrase "discrete (ie it may assume any of a specified set of exact values)" disturbs me. Each real number is an "exact value", isn't it? Thus, say, the segment [0,1] is an example of a "specified set of exact values"... Boris Tsirelson (talk) 21:29, 8 February 2012 (UTC)

I agree that it is not a paragon of clarity but I think they are saying that you could not list out value such that your list would have non-zero measure. Sometimes, you are better off forcing the reader to click on the term in question. 018 (talk) 03:21, 9 February 2012 (UTC)
Well, now these are clickable, and "set" replaced with "list". Boris Tsirelson (talk) 06:58, 9 February 2012 (UTC)

Die

The sample space is the set of outcomes of the experiment. Possible outcomes are the number of eyes shown on the upper side of the die. These are numbers. The rv has as its values these numbers. This is a typical example of rv's of the type X(ω)=ω.Nijdam (talk) 06:58, 21 June 2012 (UTC)

No, the possible outcomes are not numbers. They are the possible state of affairs after the random event. State of affairs is something like "there is a 6 shown on the upper side of the die". A clear difference needs ot be made between the outcomes of the random event and the value of the random variable. Else things won't make sense to anyone. --rtc (talk) 17:11, 21 June 2012 (UTC)
On one hand, this makes sense. But on the other hand, we work with mathematical models, not with the reality itself. A mathematical model is built out of mathematical objects. "The set of an apple and an orange" is a common abuse of the mathematical language, but really the mathematical universe contains no fruits; we encode fruits (and other real things) by mathematical objects. Likewise, you cannot send an apple by email, but you can send a picture encoded by bits, – and it is a conventional substitute for the apple... Boris Tsirelson (talk) 20:52, 21 June 2012 (UTC)
This is the classic "platonist" view of mathematics, which is by no means uncontroversial. There are views that hold the mathematical world in fact to be not as separate from the real world as the Planonists claim. Anyway, the state of affairs of a die after rolling it is not the number it shows, and thus they should not use the same mathematical representation even if that's okay as far as theory is concerned. It's just too confusing and does not give readers the right intuition. --rtc (talk) 21:05, 21 June 2012 (UTC)
So, I am not uncontroversial, :-( but classic. :-) Boris Tsirelson (talk) 05:49, 22 June 2012 (UTC)

Take a look at sample space. Nijdam (talk) 21:18, 21 June 2012 (UTC)

Maybe both approaches could be mentioned. Indeed, the "nonclassic" approach is also not uncontroversial. Boris Tsirelson (talk) 05:49, 22 June 2012 (UTC)
The recently added "example" (of a pair a measures related to individuals in a population) emphasises the utility of regarding the sample space as a generic set of items, leaving the "numerical value" of a random variable to be treated as part of the "function" in the "functions defined on a probability space," rather than as part of the sample space. Melcombe (talk) 09:36, 22 June 2012 (UTC)

First sentence

Right now the first sentence says "In probability theory, a random variable, or stochastic variable, is a way of assigning a value to each possible outcome, that is element of a sample space." This seems very awkward: a rv is a way of assigning? each possible outcome of what? How about changing it to something like "In probability theory [or better, in probability and statistics], a random variable or stochastic variable is a variable that can take on any of various values -- one for each possible situation that could arise (each possible element of a sample space). Duoduoduo (talk) 21:47, 14 November 2010 (UTC)

Hi Duoduoduo, good catch there. "a rv is a way of assigning?" >> "r.v. is a function that assigns a value to each possible outcome" is more accurate. "each possible outcome of what?" >> It just tells about it in the second sentences, but sure it could be combined with the first sentence for the clarity. ~ Elitropia (talk) 22:19, 14 November 2010 (UTC)
And now I see "a random variable ... is a variable whose value results from a measurement on some random process"; the problem is that technically "random process" is a notion more complicated than "random variable" and in fact defined in terms of random variables. --Boris Tsirelson (talk) 16:20, 19 February 2011 (UTC)
Not only that: there is no "measurement" involved. The first sentence confuses the mathematical notion of random variable, which is well defined, with a supposedly empirical notion of a 'random' or 'stochastic' natural process (in the colloquial sense) that in practice is not defined empirically or otherwise, and is most likely meaningless. Better to stick to the purely mathematical definition. illywhacker; (talk) 21:11, 31 January 2012 (UTC)
A random variable is not a variable at all (nor is it random). That should probably clarified. 69.110.145.10 (talk) 16:14, 19 September 2012 (UTC)