Random variable

From CS2800 wiki

Outcomes describe the qualitative aspect of an experiment: what happened? Often, after performing a probabilistic experiment, we want to measure various quantitative aspects of the outcome and relate them to each other.

Random variables are the technical tool we use for this. A random variable gives a numeric value to each outcome:

Definition: Random variable
A (real-valued) random variable [math]X [/math] on a probability space [math](\href{/cs2800/wiki/index.php/S}{S},\href{/cs2800/wiki/index.php/Pr}{Pr}) [/math] is a function [math]X : S \href{/cs2800/wiki/index.php/%E2%86%92}{→} \href{/cs2800/wiki/index.php?title=%E2%84%9D&action=edit&redlink=1}{ℝ} [/math]. More generally, if [math]A [/math] is any set, an [math]A [/math]-valued random variable [math]X [/math] is a function [math]X : \href{/cs2800/wiki/index.php/S}{S} \href{/cs2800/wiki/index.php/%E2%86%92}{→} A [/math].
  • For example, if we were to model a game where I roll a die, and I win \$10 if I roll a 6 and lose \$3 if I roll 3 or less, then a reasonable sample space would be the set [math]\href{/cs2800/wiki/index.php/S}{S} \href{/cs2800/wiki/index.php/Definition}{:=} \href{/cs2800/wiki/index.php/Enumerated_set}{\{1,2,\dots,6\}} [/math], and the winnings would be described by a random variable [math]W : \href{/cs2800/wiki/index.php/S}{S} \href{/cs2800/wiki/index.php/%E2%86%92}{→} \href{/cs2800/wiki/index.php?title=%E2%84%9D&action=edit&redlink=1}{ℝ} [/math] given by [math]W(1) := W(2) := W(3) := -3\lt /math [/math], [math]W(4) := W(5) := 0 [/math], and [math]W(6) := 10 [/math].
  • For example, if we were to model an experiment where I select a person and sample their height, then a reasonable sample space would be the set of people, and the random variable of interest would be the function [math]H : \href{/cs2800/wiki/index.php/S}{S} \href{/cs2800/wiki/index.php/%E2%86%92}{→} \href{/cs2800/wiki/index.php?title=%E2%84%9D&action=edit&redlink=1}{ℝ} [/math] where [math]H(p) [/math] is the height of person [math]p [/math].