Definition 2.7.1.Let \(X\) be a random variable with probability function \(f_X(x)\), then cumulative
distribution function (cdf) of \(X\) denoted by \(F_X(x)\) and is given by
\[F_X(t)=P(X\leq t)\]
specifically, calculated as \[F_X(t)= \begin {cases} \sum \limits _{\{X:X\leq t\}}P(X=x) & \text {if}\quad X \quad \text {discrete}\\ \displaystyle {\int \limits _{\{X:X\leq t\}}}f_X(x)\, dx & \text {if}\quad X \quad \text {is continuous}\\ \end {cases} \]
From fundamental theorem of calculus, it follows that if \(F_X(t)\) is differentiable then
\[f_X(x)=\frac {d}{dx}F_X(x).\]
3.
For discrete random variables \(X\) with possible values in ascending order \(x_1,x_2,x_3,\cdots \) then
\[F_X(t)=P(X\leq t)=\sum \limits ^k_{j=1}P(X=x_j)\]
where \(k\) is such that \(x_{k-1}<t\leq x_k\).
If \(X\) is continuous random variable with pdf having support in the interval \((u,v)\). i.e. \(f_X(x)\) is defined on \((u,v)\)
and 0 else where \[ F_X(t)= \begin {cases} 0 & \text {if}\hspace {0.3cm} t<u\\ \displaystyle {\int ^t_uf_X(x)dx} & \text {if}\hspace {0.3cm} u<t<v\\ 1 & \text {if}\hspace {0.3cm} t\geq v\\ \end {cases} \]
Example 2.7.5.Suppose a random variable has the following probability mass functions: \[P(X = 1) = \frac {1}{2}\, , \quad P(X = 2) = \frac {1}{4}\, ,\quad P(X = 3) = \frac {1}{8}\, , \quad P(X = 4) = \frac {1}{8}.\]
Find the c.d.f of the random variable \(X\) and use it to find \(P(X \leq 1)\, , \quad P(1 < X < 3)\) and \(P(1\leq X \leq 3)\).
Theorem 2.7.7.\(X\thicksim N(\mu ,\sigma ^2)\) is read as \(X\) is distributed as a normal with mean \(\mu \) and variance \(\sigma ^2\). If
\[Z=\frac {X-\mu }{\sigma },\]
then \(Z\) is distributed as normal with mean 0 and variance 1 and is known as standard normal,
notation \(Z\thicksim N(0,1)\).
Note 2.7.8.Normal variable is usually referred to as Gaussian Distribution.
The c.d.f for the standard normal
\[\Phi (z)=\int ^z_{-\infty }\frac {e^{\displaystyle {-\frac {1}{2}v^2}}}{\sqrt {2\pi }}\, dv\]
Example 2.7.9.The Rock well hardness of a metal specimen is determined by pressing the
surface of the specimen with hardened point, and then measuring the depth of penetration.
The hardness of an alloy is normally distributed with mean 70 units and standard deviation
3 units.
1.
If a specimen is acceptable only if its hardness is between 66 and 74 units. What is the
probability that a randomly chosen specimen is acceptable?
Figure 2.29: \(P(0<Z<c/3)=0.475\), so the area to the left of \(c/3\) is \(0.975\).
□
2.7.1 Practice problems
Problem 2.7.1.[Tutorial Sheet 2] The c.d.f. of a continuous random variable \(X\) is given by \[F(x) = \begin {cases} 0 & x<0\\[2pt] \frac {1}{2}x-\frac {1}{8}x^2 & 0\leq x<1\\[6pt] a+\frac {1}{4}x & 1\leq x<2\\[6pt] b+\frac {1}{8}x^2-\frac {1}{4}x & 2\leq x\leq 3\\[6pt] 1 & x>3. \end {cases}\]
Find
(a).
the values of \(a\) and \(b\);
(b).
the p.d.f. of \(X\);
(c).
the mean and standard deviation of \(X\);
(d).
\(P\left (1\leq X<\frac {5}{2}\right )\).
Show solution
Solution.(a). The c.d.f. of a continuous random variable is continuous, so the pieces must
agree where they meet. That is what determines \(a\) and \(b\).
At \(x=1\): \[\frac {1}{2}(1)-\frac {1}{8}(1)^2 = a+\frac {1}{4}(1) \implies \frac {3}{8} = a+\frac {1}{4} \implies a = \frac {1}{8}.\] At \(x=2\): \[a+\frac {1}{4}(2) = b+\frac {1}{8}(2)^2-\frac {1}{4}(2) \implies \frac {1}{8}+\frac {1}{2} = b+\frac {1}{2}-\frac {1}{2} \implies b = \frac {5}{8}.\] As a check, the last piece must reach 1 at \(x=3\): \(\tfrac 58+\tfrac 98-\tfrac 34 = 1\). It does.
(b). The density is the derivative of the c.d.f. on each piece: \[f(x) = F'(x) = \begin {cases} \frac {1}{2}-\frac {1}{4}x & 0\leq x<1\\[6pt] \frac {1}{4} & 1\leq x<2\\[6pt] \frac {1}{4}x-\frac {1}{4} & 2\leq x\leq 3\\[6pt] 0 & \text {otherwise.} \end {cases}\] It integrates to 1, as it must.
(c). The density falls from \(\tfrac 12\) to \(\tfrac 14\), is flat, then rises from \(\tfrac 14\) back to \(\tfrac 12\) – it is symmetric about \(x = \tfrac 32\), so
\(E(X) = \tfrac 32\). Confirming by integration, \[E(X) = \int _0^1 x\left (\tfrac 12-\tfrac {x}{4}\right )dx + \int _1^2 \frac {x}{4}\,dx + \int _2^3 x\left (\tfrac {x}{4}-\tfrac 14\right )dx = \frac {3}{2}.\] For the variance, \[E(X^2) = \int _0^1 x^2\left (\tfrac 12-\tfrac {x}{4}\right )dx + \int _1^2 \frac {x^2}{4}\,dx + \int _2^3 x^2\left (\tfrac {x}{4}-\tfrac 14\right )dx = \frac {19}{6},\] so \[\operatorname {Var}(X) = \frac {19}{6}-\left (\frac {3}{2}\right )^{2} = \frac {11}{12} \approx 0.917,\] and the standard deviation is \(\sqrt {11/12}\approx 0.957\).
(d). Work directly from the c.d.f.: \[P\left (1\leq X<\tfrac 52\right ) = F\left (\tfrac 52\right )-F(1) = \left (\frac 58+\frac {25}{32}-\frac 58\right )-\frac 38 = \frac {25}{32}-\frac {12}{32} = \frac {13}{32}.\] Because \(X\) is continuous, \(P(X=1) = 0\), so it makes no difference here
whether the endpoint is included.
Problem 2.7.2.[Assignment] Derive the cumulative distribution function of each of the
following.
(a).
\(f_X(x) = \frac {1}{b-a}\) for \(x\in [a,b]\), and \(0\) otherwise.
(b).
\(f_X(x) = \frac {x-1}{36}\) for \(x = 2,\ldots ,6\) and \(\frac {13-x}{36}\) for \(x = 7,\ldots ,12\).
(c).
\(f_X(x) = \frac {3x^{2}}{7}\) for \(x\in [1,2]\), and \(0\) otherwise.
Show solution
Solution.(a). The uniform distribution. For \(a\leq t\leq b\), \[F(t) = \int _a^{t}\frac {1}{b-a}\,dx = \frac {t-a}{b-a},\] so \[F(t) = \begin {cases} 0 & t<a\\ \frac {t-a}{b-a} & a\leq t\leq b\\ 1 & t>b.\end {cases}\] The c.d.f. rises in a straight line – the
defining picture of a uniform distribution.
(b). This is the distribution of the total on two dice. It is discrete, so the c.d.f. is a step
function: accumulate the probabilities. Writing everything over 36, the p.m.f. is \(\tfrac {1}{36},\tfrac {2}{36},\ldots ,\tfrac {5}{36}\) for \(x = 2,\ldots ,6\), then \(\tfrac {6}{36}\)
at \(x=7\), then back down \(\tfrac {5}{36},\ldots ,\tfrac {1}{36}\). So \(F(t) = \tfrac {1}{36},\tfrac {3}{36},\tfrac {6}{36},\tfrac {10}{36},\tfrac {15}{36}, \tfrac {21}{36},\tfrac {26}{36},\tfrac {30}{36},\tfrac {33}{36},\tfrac {35}{36},1\) on \(2\leq t<3\), \(3\leq t<4\), and so on up to \(t\geq 12\), with \(F(t) = 0\) for \(t<2\).
(c). For \(1\leq t\leq 2\), \[F(t) = \int _1^{t}\frac {3x^{2}}{7}\,dx = \left [\frac {x^{3}}{7}\right ]_1^{t} = \frac {t^{3}-1}{7},\] so \[F(t) = \begin {cases} 0 & t<1\\ \frac {t^{3}-1}{7} & 1\leq t\leq 2\\ 1 & t>2,\end {cases}\] and as a check \(F(2) = \tfrac {8-1}{7} = 1\).
Problem 2.7.3.[Assignment] Given the following cumulative distribution functions, find the
corresponding probability functions, and then the stated probabilities.
(a).
\(F_X(t) = 1-e^{-t^{2}/(2\lambda ^{2})}\) for \(t\geq 0\) (and 0 for \(t<0\)), where \(\lambda >0\). Find \(P(\lambda <X<2\lambda )\).
(b).
\(F_X(t) = \frac {t^{2}}{K^{2}}\) for \(0\leq t<K\), with \(F=0\) below and \(F=1\) above, where \(K>0\). Find \(P\left (\frac {K}{3}<X<\frac {K}{2}\right )\).
(c).
\(F_X\) is the step function taking values \(0,\ \frac 14,\ \frac 38,\ \frac 58,\
\frac 34,\ 1\) on \(t<1\), \(1\leq t<3\), \(3\leq t<5\), \(5\leq t<7\), \(7\leq t<9\), \(t\geq 9\). Find \(P(2<X<8)\).
Show solution
Solution. For a continuous variable the density is the derivative of the c.d.f.; for a discrete
one the probabilities are the jumps.
(b). \[f_X(t) = \frac {2t}{K^{2}}, \qquad 0\leq t<K,\] and \[P\left (\frac {K}{3}<X<\frac {K}{2}\right ) = \frac {(K/2)^{2}}{K^{2}}-\frac {(K/3)^{2}}{K^{2}} = \frac {1}{4}-\frac {1}{9} = \frac {5}{36}.\] Notice the answer does not depend on \(K\) – it is a pure scale parameter.
(c). The jumps occur at \(1,3,5,7,9\) and their sizes are the probabilities: \[P(1) = \tfrac 14,\quad P(3) = \tfrac 18,\quad P(5) = \tfrac 14,\quad P(7) = \tfrac 18,\quad P(9) = \tfrac 14,\] which sum to 1. For the
probability, the interval \(2<X<8\) picks up the atoms at \(3, 5\) and \(7\): \[P(2<X<8) = \tfrac 18+\tfrac 14+\tfrac 18 = \frac {1}{2}.\] Equivalently \(F(8)-F(2) = \tfrac 34-\tfrac 14 = \tfrac 12\). With a discrete variable
it pays to be careful about whether an endpoint carries an atom; here neither 2 nor 8 does,
so strict and non-strict inequalities agree.