标签:
PDF & CDF
The probability density function of the uniform distribution is $$f(x; \alpha, \beta) = \begin{cases}{1\over\beta-\alpha} & \mbox{if}\ \alpha < x < \beta\\ 0 & \mbox{otherwise} \end{cases} $$ The cumulative distribution function of the uniform distribution is $$F(x) = \begin{cases}0 & x\leq\alpha \\ {x-\alpha\over \beta-\alpha} & \alpha < x < \beta\\ 1 & x \geq \beta \end{cases}$$
Proof:
$$ \begin{align*} \int_{-\infty}^{\infty}f(x; \alpha, \beta)\ dx &= \int_{\alpha}^{\beta}{1\over\beta-\alpha}\ dx\\ &= {x\over\beta-\alpha}\Big|_{\alpha}^{\beta}\\ &= {\beta\over\beta-\alpha} - {\alpha\over\beta-\alpha}\\ &= 1 \end{align*} $$ And $$ \begin{align*} F(x; \alpha, \beta) &= \int_{-\infty}^{x}f(x; \alpha, \beta)\ dx\\ &= \int_{-\infty}^{x}{1\over\beta-\alpha}\ dx\\ &= {x\over\beta-\alpha}\Big|_{\alpha}^{x}\\ &= {x - \alpha\over\beta-\alpha} \end{align*} $$
Mean
The expected value is $$\mu = E[X] = {\beta + \alpha \over 2}$$
Proof:
$$ \begin{align*} E[X] &= \int_{-\infty}^{\infty}xf(x; \alpha, \beta)\ dx\\ &= \int_{\alpha}^{\beta}{x\over\beta-\alpha}\ dx\\ &= {x^2\over2(\beta - \alpha)}\Big|_{\alpha}^{\beta}\\ &= {\beta^2-\alpha^2\over2(\beta-\alpha)}\\ &= {\beta + \alpha \over 2} \end{align*} $$
Variance
The variance is $$\sigma^2 = \mbox{Var}(X) = {(\beta - \alpha)^2 \over 12}$$
Proof:
$$ \begin{align*} E\left[X^2\right] &= \int_{-\infty}^{\infty}x^2f(x;\alpha, \beta)\ dx\\ &= \int_{\alpha}^{\beta}{x^2\over\beta-\alpha}\ dx\\ &= {x^3\over 3(\beta - \alpha)}\Big|_{\alpha}^{\beta}\\ &= {\beta^3 - \alpha^3\over 3(\beta - \alpha)}\\ &= {\beta^2 + \alpha\beta + \alpha^2\over 3} \end{align*} $$ Hence $$ \begin{align*} \mbox{Var}(X) &= E\left[X^2\right] - E[X]^2\\ &= {\beta^2 + \alpha\beta + \alpha^2\over 3} - {\alpha^2+2\alpha\beta +\beta^2 \over 4}\\ &= {\beta^2 + \alpha^2 -2\alpha\beta \over 12}\\ &= {(\beta - \alpha) ^2 \over 12} \end{align*} $$
Examples
1. If $X$ is uniformly distributed over $(0, 10)$, calculate the probability that (a) $X < 3$, (b) $X > 6$, (c) $3 < X < 8$.
Solution:
The uniform density function is $f(x) = {1\over 10}$, for $x\in (0, 10)$.
(a) $$P(X < 3) = \int_{0}^{3}{1\over10}\ dx = {3\over10}$$(b) $$P(X > 6) = \int_{6}^{10}{1\over10}\ dx = {4\over10} = {2\over5}$$ (c) $$P(3 < X < 8) = \int_{3}^{8}{1\over10}\ dx = {5\over10} = {1\over2}$$
2. Buses arrives at a specified stop at 15-minute interval 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$ be the number of minutes past 7 that the passenger arrives at the stop. The uniform density function is $f(x) = {1\over 30}$, for $x\in (0, 30)$.
(a) The passenger would have to wait less than 5 minutes if he arrives between 7:10 and 7:15 or between 7:25 and 7:30. $$P(10 < X < 15) + P(25 < X < 30) = \int_{10}^{15}{1\over30}\ dx + \int_{25}^{30}{1\over30}\ dx = {1\over3}$$ (b) The passenger would have to wait more than 10 minutes if he arrives between 7 and 7:05 or between 7:15 and 7:20. $$P(0 < X < 5) + P(15 < X < 20) = \int_{0}^{5}{1\over30}\ dx + \int_{15}^{20}{1\over30}\ dx = {1\over3}$$
Reference
基本概率分布Basic Concept of Probability Distributions 7: Uniform Distribution
标签:
原文地址:http://www.cnblogs.com/zhaoyin/p/4210516.html