# How to define sample space for discrete random variable

If $S$ is the sample space of some discrete random variable $X$, what is usually given as its superset? $S \subset \mathbb{R}$ or $S \in \mathbb{Q}$? The $X$'s I have are digitized biomedical data.

Edit

I'm writing an introduction to biomedical data analysis. As a part of it, I must provide some introduction to statistics. The reason I came to ask this is that I don't know statistics very well myself. Anyway, I was assigned to write this up so I'm trying to do it the right way, and learn something myself too.

So, like I wrote the situation is that I have some digitized biomedical data. There was some continuous signal that was sampled (thus its discrete in time) and then quantized (after which the signal may have only certain discrete values).

My sample space is the set of values the signal may take. Usually one sample is presented with 16 bits, so there's 65536 possible values. However, the sample values are not presented as integers but decimal values like 0.101 or 0.521.

The confusion came from that in principal there the one-to-one mapping like you have written but clearly 0.101 is not an integer.

I don't have very strong mathematical / statistical background, so I'm pretty much learning the basics still (for the data I have I am just the "end user").

• What definition of "sample space" are you using? Why would the answer to this question matter in your application?
– whuber
Commented Jul 12, 2013 at 17:36
• For something to be discrete, it must be in one-to-one correspondence with a subset of $\mathbb{Z}$. Taking your question at face value, I think that's your answer. But, like whuber, I'm unsure whether that's what you're asking (and, if so, why?). Commented Jul 12, 2013 at 17:42
– chl
Commented Jul 12, 2013 at 19:54
• Most people would not think of a "signal" that has $2^{16}$ possible values as discrete. As far as the sample space goes, it may be more fruitful to think of your sample space as being the set of all possible (discretized) signal patterns over time. That's a huge set, potentially infinite (if you allow unbounded lengths of time). You need to be very clear that a "random variable"--your $X$--is a numeric property of elements in the sample space. E.g., $X$ could be the amplitude of a particular Fourier coefficient of a signal.
– whuber
Commented Jul 12, 2013 at 20:36
• You also might find it helpful conceptually to construct a sample space of idealized (not digitized) signals. These might be real-valued functions of specified time intervals. The process of obtaining and digitizing the signal can be thought of as measurement of the true underlying signal. This invites you to analyze your situation into stages we can schematize as (underlying physico-mathematical model)-->(set of possible measurements)-->(values of a random variable)-->(data). Statistics is a rational process of going back along this chain to draw conclusions about its earlier stages.
– whuber
Commented Jul 12, 2013 at 20:42

If it is actually discrete, then it should be possible to place your sample space in one-to-one correspondence with (some subset of) $\mathbb{Z}$. That's more or less the definition of discrete.

However, the actual values a discrete random variable takes can come from anywhere. The sample space for the roll of a dice is $S = \{1,2,3,4,5,6\}$ and the individual values are obviously integers too. On the other hand, suppose you bin circular data into four quadrants. The centers of your bins might be at $S = \{45^{\circ}, 135^{\circ}, 225^{\circ}, 315^{\circ}\}$, which are also in $\mathbb{Z}$. If you convert them to radians, then $S = \{ \frac{\pi}{4}, \frac{3\pi}{4}, \frac{5\pi}{4} \frac{7\pi}{4} \}$, which are clearly in $\mathbb{R}$, but not $\mathbb{Z}$ or $\mathbb{Q}$, but it is pretty easy to map them back onto $\mathbb{Z}$--just divide by $\frac{\pi}{4}$.

I can't think of a situation where you would care too much about what set $S$ was a subset of, but the correspondence might be useful if you need to show that something is discrete.

• We need to be careful with definitions. To illustrate (with an important practical example): let the sample space $S$ be the set of all countable binary sequences and let $X:S\to\mathbb{Z}$ be the number of initial zeros. Endow $S$ with a probability measure in the usual way (by thinking of its elements as outcomes of iid coin flips). Although the random variable $X$ is discrete, the sample space has cardinality $\aleph_1$ which is not in one-to-one correspondence with $\mathbb{Z}$.
– whuber
Commented Jul 12, 2013 at 19:14
• Would it be better to say that if a random variable is discrete, then its domain is in bijection with $\mathbb{Z}$? I must confess I'm a little hazy on the difference between sample space and the domain of an r.v. Commented Jul 12, 2013 at 21:41
• The domain of a RV (as a formal function) is, by definition, the sample space itself. Associated with an RV $X$ is its distribution, which is a measure on the Real line. By definition, $X$ is discrete when its distribution is the sum of at most a countable infinity of "atoms" ("jumps" or "point measures" if you like). The locations of these atoms are the values that $X$ can "take". One subtlety is that the range of $X$ (as a function) could still be uncountable; discreteness is partly a property of the probability measure on $S$.
– whuber
Commented Jul 12, 2013 at 22:45
• Here's a nice example for the space of binary (heads-tails) sequences where H and T have equal and independent probabilities at each step. Let $X$ be the limit superior of the fraction of heads. With probability $1$, $X$ takes the value $1/2$: its distribution is an atom of weight $1$ at $1/2$. (That's the Strong Law of Large Numbers.) However, $X$ (as a function from $S$ into $\mathbb{R}$) attains all values between $0$ and $1$ inclusive: an uncountable infinity of possibilities. But the probability of any of these values, or of any measurable subset of them, is zero.
– whuber
Commented Jul 12, 2013 at 22:53
• I think I follow--it's actually the distribution (which is something like the image?) that has to have a one-to-one correspondence with a subset of integers? That is, there must be a finite/countably infinite number of values with non-zero probability? Thanks for the explanation (and your patience!) Commented Jul 12, 2013 at 23:08