# AP Statistics Curriculum 2007 Uniform

(Difference between revisions)
 Revision as of 20:18, 7 July 2011 (view source)JayZzz (Talk | contribs)← Older edit Current revision as of 20:18, 7 July 2011 (view source)JayZzz (Talk | contribs) Line 119: Line 119: * SOCR Home page: http://www.socr.ucla.edu * SOCR Home page: http://www.socr.ucla.edu - {{translate|pageName=http://wiki.stat.ucla.edu/socr/index.php/AP_Statistics_Curriculum_2007_Chi-Square}} + {{translate|pageName=http://wiki.stat.ucla.edu/socr/index.php/AP_Statistics_Curriculum_2007_Uniform}}

## General Advance-Placement (AP) Statistics Curriculum - Uniform Distribution

### Uniform Distribution

In the continuous uniform distribution, all intervals of the same length are equally probable. The distribution is defined by two parameters, a and b, which are the minimum and maximum values of the interval. For example, U[3,6] is the uniform distribution from 3 to 6. In the discrete uniform distribution, there are n equally spaced values, each of which have the same $\tfrac{1}{n}$ probability of being observed.

### Continuous Uniform Distribution

PDF:
$\begin{cases} \frac{1}{b - a} & \text{for } x \in [a,b] \\ 0 & \text{otherwise} \end{cases}$

CDF:
$\begin{cases} 0 & \text{for } x \le a \\ \frac{x-a}{b-a} & \text{for } x \in [a,b] \\ 1 & \text{for } x \ge b \end{cases}$

Mean:
$\tfrac{1}{2}(a+b)$

Median:
$\tfrac{1}{2}(a+b)$

Mode:
any value in [a,b]

Variance:
$\tfrac{1}{12}(b-a)^2$

Support:
$x \in [a,b]$

Moment Generating Function:
$\frac{\mathrm{e}^{tb}-\mathrm{e}^{ta}}{t(b-a)}$

### Discrete Uniform Distribution

PDF:
$\begin{matrix} \frac{1}{n} & \mbox{for }a\le k \le b\ \\0 & \mbox{otherwise } \end{matrix}$

CDF:
$\begin{matrix} 0 & \mbox{for }kb \end{matrix}$

Mean:
$\frac{a+b}{2}\,$

Median:
$\frac{a+b}{2}\,$

Mode:
N/A

Variance:
$\frac{(b-a+1)^2-1}{12}=\frac{n^2-1}{12},$

Support:
$k \in \{a,a+1,\dots,b-1,b\}\,$

Moment Generating Function:
$\frac{e^{at}-e^{(b+1)t}}{n(1-e^t)}\,$

### Applications

Generation of random numbers. Random numbers are often generated from a uniform distribution U[0,1]

In R, to generate 5 random integers from [1:10] with replacement:

> sample(1:10, 5, replace = TRUE)

### Example (Continuous)

It is known that the time to complete an oil change at a certain dealership is random and takes between 35 to 45 minutes. If you take your car to this dealership to get an oil change, what is the probability that it will take between 40 to 42 minutes?

$P(40 \leq x \leq 42) = \tfrac{(42-40)}{(45-35)} = 0.2$

### Example (Discrete)

If you throw a fair six sided die, what is the probability that you get a number greater than 2?

$P(x=3 or x=4 or x=5 or x=6) = \tfrac{1}{6}+\tfrac{1}{6}+\tfrac{1}{6}+\tfrac{1}{6} = \tfrac{4}{6} = \tfrac{2}{3}$

http://www.distributome.org/ -> SOCR -> Distributions -> Distributome

http://www.distributome.org/ -> SOCR -> Distributions -> Continuous Uniform Distribution

http://www.distributome.org/ -> SOCR -> Distributions -> Discrete Uniform Distribution

http://www.distributome.org/ -> SOCR -> Functors -> Continuous Uniform Distribution

http://www.distributome.org/ -> SOCR -> Functors -> Discrete Uniform Distribution

http://www.distributome.org/ -> SOCR -> Experiments -> Uniform Estimate Experiment

http://www.distributome.org/ -> SOCR -> Experiments -> Uniform E-Estimate Experiment

SOCR Uniform Distributions calculators:

$\cdot$ http://socr.ucla.edu/htmls/dist/ContinuousUniform_Distribution.html

$\cdot$ http://socr.ucla.edu/htmls/dist/DiscreteUniform_Distribution.html