Sign in

username:

password:



Not a member?

Search Online Books



Search tips

Free Online Books

Ads

Chapters

Chapter Contents:

Search Spectral Audio Signal Processing

  

Book Index | Global Index


Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?

  

Random Variable



Definition: A random variable $ x$ is defined as a real- or complex-valued function of some random event, and is fully characterized by its probability distribution.



Example: A random variable can be defined based on a coin toss by defining numerical values for heads and tails. For example, we may assign 0 to tails and 1 to heads. The probability distribution for this random variable is then

$\displaystyle p(x) = \left\{\begin{array}{ll} \frac{1}{2}, & x = 0 \\ [5pt] \frac{1}{2}, & x = 1 \\ [5pt] 0, & \mbox{otherwise}. \\ \end{array} \right. \protect$ (D.1)



Example: A die can be used to generate integer-valued random variables between 1 and 6. Rolling the die provides an underlying random event. The probability distribution of a fair die is the discrete uniform distribution between 1 and 6. I.e.,

$\displaystyle p(x) = \left\{\begin{array}{ll}
\frac{1}{6}, & x = 1,2,\ldots,6 \\ [5pt]
0, & \mbox{otherwise}. \\
\end{array}\right.
$



Example: A pair of dice can be used to generate integer-valued random variables between 2 and 12. Rolling the dice provides an underlying random event. The probability distribution of two fair dice is given by

$\displaystyle p(x) = \left\{\begin{array}{ll}
\frac{x-1}{36}, & x = 2,3,\ldots,...
...6}, & x = 7,8,\ldots,12 \\ [5pt]
0, & \mbox{otherwise}. \\
\end{array}\right.
$

This may be called a discrete triangular distribution. It can be shown to be given by the convolution of the discrete uniform distribution for one die with itself. This is a general fact for sums of random variables (the distribution of the sum equals the convolution of the component distributions).



Example: Consider a random experiment in which a sewing needle is dropped onto the ground from a high altitude. For each such event, the angle of the needle with respect to north is measured. A reasonable model for the distribution of angles (neglecting the earth's magnetic field) is the continuous uniform distribution on $ [0,2\pi)$, i.e., for any real numbers $ a$ and $ b$ in the interval $ [0,2\pi)$, with $ a\leq
b$, the probability of the needle angle falling within that interval is

$\displaystyle \int_a^b \frac{1}{2\pi}d\theta = \frac{1}{2\pi}(b-a), \quad a,b\in[0,2\pi).
$

Note, however, that the probability of any single angle $ \theta$ is zero. This is our first example of a continuous probability distribution. Therefore, we cannot simply define the probability of outcome $ \theta$ for each $ \theta\in [0,2\pi)$. Instead, we must define the probability density function (PDF):

$\displaystyle f(\theta) = \left\{\begin{array}{ll}
\frac{1}{2\pi}, & 0\leq \theta < 2\pi \\ [5pt]
0, & \mbox{otherwise}. \\
\end{array}\right.
$

To calculate a probability, the PDF must be integrated over one or more intervals. As follows from Lesbegue integration theory (``measure theory''), the probability of any countably infinite set of discrete points is zero when the PDF is finite. This is because such a set of points is a ``set of measure zero'' under integration. Note that we write $ p(x)$ for discrete probability distributions and $ f(x)$ for PDFs. A discrete probability distribution such as that in (D.1) can be written as

$\displaystyle f(x) = \frac{1}{2}\delta(x) + \frac{1}{2}\delta(x-1)
$

where $ \delta(x)$ denotes the impulse function.D.1


Order a Hardcopy of Spectral Audio Signal Processing

Previous: Independent Events
Next: Stochastic Process

written by Julius Orion Smith III
Julius Smith's background is in electrical engineering (BS Rice 1975, PhD Stanford 1983). He is presently Professor of Music and Associate Professor (by courtesy) of Electrical Engineering at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), teaching courses and pursuing research related to signal processing applied to music and audio systems. See http://ccrma.stanford.edu/~jos/ for details.


Comments


No comments yet for this page


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )