1.2.4 Functions

We often need the concept of functions in probability. A function $f$ is a rule that takes an input from a specific set, called the domain, and produces an output from another set, called co-domain. Thus, a function maps elements from the domain set to elements in the co-domain with the property that each input is mapped to exactly one output. For a function $f$, if $x$ is an element in the domain, then the function value (the output of the function) is shown by $f(x)$. If $A$ is the domain and $B$ is the co-domain for the function $f$, we use the following notation: $$f:A \rightarrow B.$$



Example


The output of a function $f: A \rightarrow B$ always belongs to the co-domain $B$. However, not all values in the co-domain are always covered by the function. In the above example, $f:\mathbb{R} \rightarrow \mathbb{R}$, the function value is always a positive number $f(x)=x^2 \geq 0$. We define the range of a function as the set containing all the possible values of $f(x)$. Thus, the range of a function is always a subset of its co-domain. For the above function $f(x)=x^2$, the range of $f$ is given by $$\textrm{Range}(f)=\mathbb{R}^{+}=\{x \in \mathbb{R} | x \geq 0 \}.$$

Figure 1.14 pictorially shows a function, its domain, co-domain, and range. The figure shows that an element $x$ in the domain is mapped to $f(x)$ in the range.
Function
Fig.1.14 - Function $f: A \rightarrow B$, the range is always a subset of the co-domain.




The print version of the book is available on Amazon.

Book Cover


Practical uncertainty: Useful Ideas in Decision-Making, Risk, Randomness, & AI

ractical Uncertaintly Cover