Skip to content

Mathematics · Ch 7 — Probability

Random Variable and its Probability Distribution

6

Random Variable and its Probability Distribution

Definition of a Random Variable

A random variable is a real-valued function defined on the sample space of a random experiment -- that is, a rule XX that assigns a single real number X(ω)X(\omega) to every outcome ω\omega of the experiment. For example, if two coins are tossed, the sample space is {HH,HT,TH,TT}\{HH,HT,TH,TT\}, and X=X= "number of heads" assigns X(HH)=2X(HH)=2, X(HT)=X(TH)=1X(HT)=X(TH)=1, X(TT)=0X(TT)=0.

This chapter deals only with discrete random variables: those that take a finite (or countable) set of distinct values x1,x2,…,xnx_1,x_2,\dots,x_n.

Probability Distribution of a Random Variable

The probability distribution of a discrete random variable XX is the table (or function) that lists every value XX can take, together with the probability of XX taking that value:

Xx1x2⋯xnP(X)p1p2⋯pn\begin{array}{c|ccccc} X & x_1 & x_2 & \cdots & x_n\\ \hline P(X) & p_1 & p_2 & \cdots & p_n \end{array}

where pi=P(X=xi)p_i=P(X=x_i).

The Two Defining Conditions

A table of values and numbers is a valid probability distribution if and only if it satisfies both:

pi≥0 for every i,and∑i=1npi=1.p_i \ge 0 \text{ for every } i, \qquad \text{and} \qquad \sum_{i=1}^{n} p_i = 1.

The first condition simply says probabilities cannot be negative; the second says the random variable must take some value with certainty. Both conditions must always be checked (or, if a distribution contains an unknown constant, used to solve for it) before any further calculation with the distribution is trusted.

Worked Illustration

Three fair coins are tossed simultaneously and XX denotes the number of tails obtained. The sample space has 23=82^3=8 equally likely outcomes. Exactly (30)=1\binom30=1 outcome gives 00 tails, (31)=3\binom31=3 give 11 tail, (32)=3\binom32=3 give 22 tails, and (33)=1\binom33=1 gives 33 tails, so the probability distribution is exactly the table shown alongside this section. Its probabilities sum to 18+38+38+18=1\tfrac18+\tfrac38+\tfrac38+\tfrac18=1, confirming it is valid. …

Table 1Probability distribution of X = number of tails when three fair coins are tossed
xix_i0123
P(X=xi)P(X=x_i)18\dfrac1838\dfrac3838\dfrac3818\dfrac18