Example

Example
x $(\alpha, \beta )$ 上均勻分布. 求(a) E[X] 和 (b) Var(X).
Solution:
(a)
$\begin{array}{rcl}
E[X] & = & \displaystyle\int_{- \infty}^\infty xf(x)dx \\ \\...
...a - \alpha} dx \\ \\
& = & \displaystyle\frac{\beta + \alpha }{2}
\end{array}$
換句話說, 在某一區間上均勻分布的隨機變數, 其期望值為該區間的中間點.

(b) 欲求 Var(X), 我們先求 E[X2].
$\begin{array}{rcl}
E[X^2] & = & \displaystyle\int_\alpha ^\beta \displaystyle\f...
...
& = & \displaystyle\frac{\beta ^2 + \alpha \beta + \alpha ^2 }{3}
\end{array}$

因此,

$ Var(X) = \displaystyle\frac{\beta ^2 + \alpha \beta + \alpha ^2}{3} -
\frac{(\alpha + \beta)^2}{4} = \frac{(\beta - \alpha)^2}{12} $
所以, 在某一區間上均勻分布的隨機變數, 其變異數為該區間之長度的平方除以 12 .          $\rule[0.02em]{1.0mm}{1.5mm}$

Example
Buses arrive at a specified stop at 15-minute intervals starting at 7 A.M. That is, they arrive at 7, 7:15, 7:30, 7:45, and so on. If a passenger arrives at the stop at a time that is uniformly distributed between 7 and 7:30, find the probability that he waits (a) less than 5 minutes for a bus; (b) more than 10 minutes for a bus.
Solution:
Let X denote the number of minutes past 7 that the passenger arrives at the stop. Since X is a uniform random variable over the interval (0,30), it follows that the passenger will have to wait less than 5 minutes if (and only if) he arrives between 7:10 and 7:15 or between 7:25 and 7:30. Hence the desired probability for (a) is
$P\{10<X<15\}+P\{25<X<30\}=\displaystyle\int_{10}^{15}\frac{1}{30}dx+
\int_{25}^{30}\frac{1}{30}dx=\frac{1}{3}$
Similarly, he would have to wait more than 10 minutes if he arrives between 7 and 7:05 or between 7:15 and 7:20, and so the probability for (b) is
$P\{0<X<5\}+P\{15<X<20\}=\displaystyle\frac{1}{3}\qquad\rule[0.02em]{1.0mm}{1.5mm}$