quality:corruption, information:classification, stylistic:tone, structural:expansion, linguistic:paraphrasing
Discrete random variable

Consider an experiment where a person is chosen at random. An example of a random variable may be the person's height. Mathematically, the random variable is interpreted as a function which maps the person to their height. Associated with the random variable is a probability distribution that allows the computation of the probability that the height is in any subset of possible values, such as the probability that the height is between 180 and 190 cm, or the probability that the height is either less than 150 or more than 200 cm.

Another random variable may be the person's number of children; this is a discrete random variable with non-negative integer values. It allows the computation of probabilities for individual integer values – the probability mass function (PMF) – or for sets of values, including infinite sets. For example, the event of interest may be "an even number of children". For both finite and infinite event sets, their probabilities can be found by adding up the PMFs of the elements; that is, the probability of an even number of children is the infinite sum PMF (0) + PMF (2) + PMF (4) + ⋯ {\displaystyle \operatorname {PMF} (0)+\operatorname {PMF} (2)+\operatorname {PMF} (4)+\cdots }.

In examples such as these, the sample space is often suppressed, since it is mathematically hard to describe, and the possible values of the random variables are then treated as a sample space. But when two random variables are measured on the same sample space of outcomes, such as the height and number of children being computed on the same random persons, it is easier to track their relationship if it is acknowledged that both height and number of children come from the same random person, for example so that questions of whether such random variables are correlated or not can be posed.

If { a n }, { b n } {\textstyle \{a_{n}\},\{b_{n}\}} are countable sets of real numbers, b n > 0 {\textstyle b_{n}>0} and ∑ n b n = 1 {\textstyle \sum _{n}b_{n}=1}, then F = ∑ n b n δ a n (x) {\textstyle F=\sum _{n}b_{n}\delta _{a_{n}}(x)} is a discrete distribution function. Here δ t (x) = 0 {\displaystyle \delta _{t}(x)=0} for x < t {\displaystyle x<t}, δ t (x) = 1 {\displaystyle \delta _{t}(x)=1} for x ≥ t {\displaystyle x\geq t}. Taking for instance an enumeration of all rational numbers as { a n } {\displaystyle \{a_{n}\}}, one gets a discrete function that is not necessarily a step function (piecewise constant).