You are on page 1of 30

'Uniform Distribution'

Uniform Distribution
In statistics, a type of probability distribution
in which all outcomes are equally likely.
There are two types of uniform distributions:
discrete and continuous.
The possible results of rolling a die provide an
example of a discrete uniform distribution
Examples: discrete uniform
have a countable number of outcomes

Coin p=1/2
Dice p=1/6
So probability= 1/x in case of x outcomes
Continuous uniform random variable
Infinite values but have equally probable
intervals
Eg
Height ranges
Baby weights
Waiting time at bus stop
Late from office
Blood pressures/ sugar levels
Probability functions
A probability function maps the possible values of
x against their respective probabilities of
occurrence, p(x)
p(x) is a number from 0 to 1.0.
The area under a probability function is always 1.
Example: rolling dice sum=1
Defined at points only
x

p(x)

1/6

1

4

5

6

2

3


x all
1 P(x)
Probability mass function (pmf)
x

p(x)

1

p(x=1)=1/6

2

p(x=2)=1/6

3

p(x=3)=1/6

4

p(x=4)=1/6

5

p(x=5)=1/6

6

p(x=6)=1/6

1.0
Cumulative distribution function
(CDF)
x
P(x)
1/6
1 4 5 6 2 3
1/3
1/2
2/3
5/6
1.0
Cumulative distribution function
x

P(xA)

1

P(x1)=1/6

2

P(x2)=2/6

3

P(x3)=3/6

4

P(x4)=4/6

5

P(x5)=5/6

6

P(x6)=6/6

Continuous case
The probability function that accompanies a
continuous random variable is a continuous
mathematical function that integrates to 1.
The probabilities associated with continuous
functions are just areas under the curve
(integrals!).
Probabilities are given for a range of values,
rather than a particular value (e.g.,heights
between 5.9-6 feet).

examples
For continuous data we
dont have equally spaced
discrete values so instead
we use a curve or function
that describes the
probability density over
the range of the
distribution.
The curve is chosen so
that the area under the
curve is equal to 1.
probability density function
The probability that a continuous random
variable will be between limits a and b is given
by an integral, or the area under a curve.

The probability that the
continuous random variable, X, is between a
and b corresponds to the area under the curve
representing the probability density function
between the limits a and b.
For uniform continuous variable
It would be a rectangle/ straight line
At height 1/n in case of n equal divisions/intervals
Area under curve= area of rectangle
Sum of total area =1

Density and cumulative distt
Developing the prob function
Say a plane flying to karachi from islamabad takes
anywhere from 120 to 140 minutes
Say the distribution of flying time is uniform over
the interval 120 to 140
This basically means the probability of each 1
minute interval between 120 and 140 has the
same probability of occurring.
In other words, the plane has the same chance of
landing in the 120 to 121 interval as the 131 to
132 interval and so on.
17
x = minutes of
flight time.
120 140
a b
1/20
0
f(x)
1/(b a)
18
On the previous screen you see a rectangle. It is on the interval
120 to 140 because this is the number of minutes a plane would
take.
In general we say the interval is from a to b. Then the base of the
rectangle is b a = 140 120 = 20 in our example.
Now, here is an important point based on rules of probability.
Remember that the sum of all the probabilities of the outcomes
must sum to 1. Since we want the area to represent probability the
area of the rectangle must equal =1.
We do this by making the height 1/(b a) = 1/(140 20) = 1/20.
Base time height is then (20)(1/20) = 1
Now we can answer more questions dealing with the probability of
an event when we have a uniform distribution.
19
What is the probability the plan will land between 122 and
124 minutes?
We just want to find the area inside the rectangle between
122 and 124. The base is 124 122 = 2 and the height is 1/20,
so we have a probability 2(1/20) = .1.
You might see the same problem asked in the following way:
P(122 <= x <= 124), or what is the probability x is greater than
or equal to 122, but less than or equal to 124?
Special case
P(x = 125)? What is the probability the plane lands in 125
minutes? Well 125 125 = 0 and 0(1/20) = 0. Since
probabilities are areas for continuous variable, the probability
for any one value is zero. We can only do probabilities over an
interval.
20
x = minutes of
flight time.
120 122 124 140
a b
1/20
0
f(x)
1/(b a)
Example 2
A student arrives at a bus stop and waits for the
bus. He knows that the bus comes every 15
minutes (which we will assume is exact), but he
doesnt know when the next bus will come.
Lets assume the bus is as likely to come in any
one instant as in any other within the next 15
minutes. Let the time the student has to wait
for the bus be x minutes.
Mean , Variance
The expected value for a uniform variable is
E(x) = (a + b)/2 and in our example equals
(120 + 140)/2 = 130.
The variance is
Var(x) = (b a)
2
/12 and in our example equals
(140 120)
2
/12 = 400/12 = 33.33
prove

You might also like