Example:Winnings as a random variable

From CS2800 wiki

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].