-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathvar-continuous.Rmd
86 lines (68 loc) · 3.4 KB
/
var-continuous.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Variance of Continuous Random Variables {#var-continuous}
## Theory {-}
The variance is defined for continuous random variables in exactly the
same way as for discrete random variables, except the expected
values are now computed with integrals and p.d.f.s, as in Lessons
\@ref(ev-continuous) and \@ref(lotus-continuous), instead of sums and p.m.f.s.
```{definition var-continuous, name="Variance"}
Let $X$ be a random variable. Then, the **variance** of $X$, symbolized
$\text{Var}[X]$ is defined as
\begin{equation}
\text{Var}[X] \overset{\text{def}}{=} E[(X - E[X])^2].
(\#eq:var-continuous)
\end{equation}
```
The "shortcut formula" also works for continuous random variables.
```{theorem var-shortcut-continuous, name="Shortcut Formula for Variance"}
The variance can also be computed as:
\begin{equation}
\text{Var}[X] = E[X^2] - E[X]^2.
(\#eq:var-shortcut-continuous)
\end{equation}
```
The standard deviation is also defined in the same way, as the square root of the variance,
as a way to correct the units of variance..
\[ \text{SD}[X] = \sqrt{\text{Var}[X]}. \]
We apply the shortcut formula to derive formulas for the expected values of the
uniform and exponential distributions.
```{example uniform-var, name="Variance of the Uniform Distribution"}
Let $X$ be a $\text{Uniform}(a, b)$ random variable. We calculated
$E[X]$ in Example \@ref(exm:ev-unif) and $E[X^2]$ in Example \@ref(exm:ev-unif-sq), so
most of the work has already been done.
\begin{align*}
\text{Var}[X] &= E[X^2] - E[X]^2 \\
&= \frac{b^3 - a^3}{3(b-a)} - \left( \frac{a + b}{2} \right)^2 \\
&= \frac{(b-a)^2}{12}
\end{align*}
```
```{example exponential-var, name="Variance of the Exponential Distribution"}
Let $X$ be a $\text{Exponential}(\lambda)$ random variable. We calculated
$E[X]$ in Example \@ref(exm:ev-expo) and $E[X^2]$ in Example \@ref(exm:ev-expo-sq), so
most of the work has already been done.
\begin{align*}
\text{Var}[X] &= E[X^2] - E[X]^2 \\
&= \frac{2}{\lambda^2} - \left( \frac{1}{\lambda} \right)^2 \\
&= \frac{1}{\lambda^2}
\end{align*}
```
Formulas for the variance of named continuous distributions can be found
in Appendix \@ref(continuous-distributions).
## Essential Practice {-}
1. The distance (in hundreds of miles) driven by a trucker in one day is a continuous
random variable $X$ whose cumulative distribution function (c.d.f.) is given by:
\[ F(x) = \begin{cases} 0 & x < 0 \\ x^3 / 216 & 0 \leq x \leq 6 \\ 1 & x > 6 \end{cases}. \]
a. Calculate the standard deviation of $X$.
b. What is the probability that $X$ is within 1 standard deviation of the mean
(i.e., expected value)?
2. Small aircraft arrive at San Luis Obispo airport according to a Poisson process at a
rate of 6 per hour.
a. What is the expected value and standard deviation of the time between two arrivals (in hours)?
b. What is the probability that the time between two arrivals will be more than 1
standard deviation above the mean (i.e., expected value)?
## Additional Practice {-}
1. The article "Modeling Sediment and Water Column Interactions for Hydrophobic Pollutants"
(Water Res., 1984: 1169–1174) suggests the uniform distribution on the interval $[7.5, 20]$ as a
model for depth (cm) of the bioturbation layer in sediment in a certain region.
a. What are the mean and variance of depth?
b. What is the probability that the observed depth is within 1 standard deviation of the
expected value?