In the formulas below, we will presume that we have a random variable 5.2.1\(X\) which maps the sample space S onto some range of real numbers \(R\text{.}\) From this set, we then can define a probability function \(f(x)\) which acts on the numerical values in \(R\) and returns another real number. We attempt to do so to obtain (for discrete values) P(sample space value s)\(= f(X(s))\text{.}\) That is, the probability of a given outcome s is equal to the composition which takes s to a numerical value x which is then plugged into f to get the same final values.
For example, consider a random variable which assigns a 1 when you roll a 1 on a six-sided die and 0 otherwise. Presuming each side is equally likely, \(f(1) = \frac{1}{6}\) and \(f(0) = \frac{5}{6}\text{.}\)
Definition5.3.1.Probability "Mass" Function.
Given a discrete random variable 5.2.1\(X\) on a space \(R\text{,}\) a probability mass function on \(X\) is given by a function \(f:R \rightarrow \mathbb{R}\) such that:
\begin{align*}
& \forall x \in R , f(x) \gt 0\\
& \sum_{x \in R} f(x) = 1\\
& A \subset R \Rightarrow P(X \in A) = \sum_{x \in A}f(x)
\end{align*}
For \(x \not\in R\text{,}\) you can use the convention \(f(x)=0\text{.}\)
Definition5.3.2.Probability "Density" Function.
Given a continuous random variable \(X\) on a space \(R\text{,}\) a probability density function on \(X\) is given by a function \(f:R \rightarrow \mathbb{R}\) such that:
\begin{align*}
& \forall x \in R , f(x) \gt 0\\
& \int_{R} f(x) dx = 1\\
& A \subset R \Rightarrow P(X \in A) = \int_{A} f(x) dx
\end{align*}
For \(x \not\in R\text{,}\) you can use the convention \(f(x)=0\text{.}\)
For the purposes of this book, we will use the term "Probability Function" to refer to either of these options.
Consider \(f(x) = x^2/c\) for some positive real number c and presume \(R\) = [-1,2]. Then f(x) is nonnegative (and only equals zero at one point). To make \(f(x)\) a probability density function 5.3.2, we must have
Notice, \(F(-1) = 0\) since nothing has yet been accumulated over values smaller than -1 and \(F(2) = 1\) since by that time everything has been accumulated. In summary:
Table5.3.9.Continuous Distribution Function Example
X
F(x)
\(x \lt -1\)
0
\(-1 \le x \lt 2\)
\(x^3/9 + 1/9\)
\(2 \le x\)
1
Theorem5.3.10.
\(F(x)=0, \forall x \lt \inf(R)\) where inf is the infimum...the "minimum" but in a limit sense.
Assume \(X\) is continuous and \(f\) and \(F\) as above. Notice, by the definition of \(f\text{,}\)\(\lim_{x \rightarrow \pm \infty} f(x) = 0\) since otherwise the integral over the entire space could not be finite.
Now, let \(A(x)\) be any antiderivative of \(f(x)\text{.}\) Then, by the Fundamental Theorem of Calculus,
For discrete random variables, it is unlikely that a particular percentile will land exactly on one of the elements of \(R\) but you will want to take the smallest value in \(R\) so that \(F(c) \ge p\text{.}\)
The 50th percentile (as before) is also known as the median.