You are on page 1of 8

Probability, Mean and Median

In the last section, we considered (probability) density functions. We went on to


discuss their relationship with cumulative distribution functions. The goal of this section
is to take a closer look at densities, introduce some common distributions and discuss the
mean and median.

Recall, we define probabilities as follows:


Proportion of population for Area under the graph of
( )
which is between and ( ) between and
b
a
p x dx
x a b p x a b
= =
}



The cumulative distribution function gives the proportion of the population that has
values below t. That is,


Proportion of population
( ) ( )
having values of below
t
P t p x dx
x t

= =
}



When answering some questions involving probabilities, both the density function and
the cumulative distribution can be used, as the next example illustrates.

Example 1:

Consider the graph of the function p(x).

2 4 6 8 10
x
0. 1
0. 2
px

Figure 1: The graph of the function p(x)

a. Explain why the function is a probability density function.
b. Use the graph to find P(X < 3)
c. Use the graph to find P(3 X 8)




1
Solution:

a. Recall, a function is a probability density function if the area under the curve is
equal to 1 and all of the values of p(x) are non-negative. It is immediately clear
that the values of p(x) are non-negative. To verify that the area under the curve is
equal to 1, we recognize that the graph above can be viewed as a triangle. Its base
is 10 and its height is 0.2. Thus its area is equal to
1
10 0.2 1
2
= .

b. There are two ways that we can solve this problem. Before we get started, though,
we begin by drawing the shaded region.

2 4 6 8 10
x
0. 1
0. 2
px


The first approach is to recognize that we can determine the area under the curve
from 0 to 3 immediately. The shaded area is another triangle, with a base of 3 and
a height of 0.1. Thus, the area is equal to 0.15.

A second approach would be to find the equation of the lines that form p(x) and
use the integral formula on the previous page.

For the first line, notice that the line passes through the points (0, 0) and (6, 0.2).
Using the point-slope formula, we see that the line is given by p(x) = (1/30)x.

The second line passes through the points (6, 0.2) and (10, 0). Again, using the
point-slope formula, we see that the line is given by p(x) = -(1/20)x + 1/2.

So, we have that
1
30
1 1
20 2
if 0 6
( ) if 6 10
0 otherwi
x x
p x x x

se
s s

= + < s



Returning to the original question, we have that P(X < 3) is given by the integral
. On [0, 3), p(x) = (1/30)x. Notice that P(t) = (1/60)t
2
. So,
we have that
3
0
( ) (3) (0) p x dx P P =
}
2 2
1 1 9
( 3) P X < = (3) (0) (3) (0) 0.15
60 60 60
P P = = = .

2
c. Again, we have two ways that we can approach this problem. Again, we start by
drawing out the shaded region.

2 4 6 8 10
x
0. 1
0. 2
px


If we want to use triangles, it is easiest to use the fact that the area under the curve
is equal to 1. The shaded region is thus equal to one minus the two triangles on
the sides.

In (b), we found the area of the left triangle is equal to 0.15. The area of the right
triangle is equal to 0.1. So, the area of the shaded region is 1 0.15 0.1 = 0.75.

If instead we were to use integrals, notice that p(x) changes functions at x = 6.
Thus, in order to compute the integral
8
3
( ) p x dx
}
, we need to split into two pieces.
That is,
8 6 8
3 3 6
( ) ( ) ( ) p x dx p x dx p x d = +
} } }
x .

6
6 6
2
3 3 3
1 1
( ) 0.45
30 60
p x dx xdx x
(
= = =
(

} }
.
8
8 8
2
6 6 6
1 1 1 1
( ) 0.3
20 2 40 2
p x dx x dx x x
| | (
= + = + =
|
(
\ .
} }
.

So, we see that the shaded area is equal to 0.45 + 0.3 = 0.75, which agrees with
the answer we found the other way.


Often times, we are concerned with finding the average value of a distribution.
There are two common measured that are used: the mean and the median.


The Mean

If a quantity has a density function p(x), then we define the mean value of the
quantity as ( ) xp x dx

}
.

3
Example 2:

Returning to the density function given in Example 1, compute its mean.

Solution:

Notice that p(x) changes functions at x = 6. Thus, in order to compute the integral
10
0
( ) xp x dx
}
, we will need to again split it into two pieces. Thus, we have that the mean is
equal to

10 6 10
0 0 6
6 1
3 3 2
0 6
1 1
( )
30 20 2
1 1 1
90 60 4
216 176 16
90 60 3
0
1
xp x dx x xdx x x dx
x x x
| |
= + +
|
\ .
( (
= + +
( (

= + =
} } }



The Median

A median of a quantity x distributed through a population is a value T such
that half of the population has values of x less than T and half the population has
values of x greater than T. That is, T satisfies the equation

1
( )
2
T
p x dx

=
}


where p(x) is the density function of the quantity. In words, we have that half
the area under the graph of p(x) lies to the left of T (and half lies to the right of T.)



Example 3:

Returning to the density function given in Example 1, compute its median.

Solution:

Looking at Figure 1, notice that more than half of the area occurs in the left side of the
triangle. Thus, the median will be a number between 0 and 6.

4
Since we do not need to worry about the function changing (since it is the same on the
interval [0, 6]), we have that
0
1
30 2
T
xdx
1
=
}
. That is,
2
1
60 2
T
= . Solving for T, we see that
30 T = .

Note: We did not use the 30 for T, since we know that T is a positive number.


There are a number of important distributions that arise in a variety of situations.
Below, we list three such distributions as well as associated properties.


The first important distribution we shall consider is the uniform distribution. We
introduced this distribution in the previous section. The graph of the density function is
constant on the interval [a, b] and zero elsewhere.

a b
x
1
b-a
px

Figure 2: The density of the uniform distribution on [a, b]


Uniform Distribution

The density of the uniform distribution is given by

1
( ) p x
b a
=

, for a x b

The cumulative distribution function is given by

( ) ( )
t
a
t a
P t p x dx
b a

= =

}
, for a t b



Another important distribution we shall consider is the exponential distribution. The
graph of the density function is characterized by an exponential decay.

5
x
1
px

Figure 3: The density of the exponential distribution for c > 0.


Exponential Distribution

The density of the exponential distribution is given by

( )
cx
p x ce

= , for x 0 and any constant c > 0



The cumulative distribution function is given by

0
( ) ( ) 1
t
ct
P t p x dx e

= =
}
, for t 0



Example 4:

Suppose that the probability density function for the wait time in line at a counter is
given by
/5
0 if 0
( )
if 0
x
x
p x
ke x

<
=

>


a. What is the value of the constant k?
b. Determine the probability that a person will wait at least 3 minutes.
c. What is the mean wait time?

Solution:

a. Comparing the form of the density function with that given in the box above, we
see that c = 1/5. Thus, we must have that k = 1/5. Another way to see this would be
to do the integration and solve for k.

( )
/5 /5 /5 /5
0
0 0
1 lim lim 5 lim 5 5
b
b
x x x b
b b b
ke dx ke dx ke k ke k



( = = = =
} }
5 =

Dividing both sides by 5, we see that k = 1/5.

6
b. The probability that a person will wait at least 3 minutes is given by

( )
3/5 3/5
3 3
( ) lim ( ) lim ( ) (3) 1 (3) 1 (1 )
b
b b
p x dx p x dx P b P P e e



= = = =
} }
= .

Here, we used the fact that lim ( ) 1
b
P b

= to simplify the above expression.



c. The mean wait time is given by
/5
0
5
x
x
e dx

}
. Using integration by parts, we have:

( )
( )
/5 /5 /5 /5
0
0 0 0
/5 /5
0 0
/5 /5
lim lim
5 5
lim 5
lim 5 5
5
b b
b
x x x
b b
b b
x x
b
b b
b
x x
e dx e dx xe e dx
xe e
be e

| |
( = =
|

\ .
( ( =

= +
=
} } }
x
cx



Note: In general, if ( ) p x ce

= for x 0, then
0
1
( ) xp x dx
c

=
}
.



The final distribution which we shall examine is the normal distribution. The graph
of its density function is a bell-shaped curve which peaks at its mean, denoted by m. The
width of the curve is determined by the standard deviation, denoted by s.

m
x
s s

Figure 4: The density of the normal distribution with parameters m and s.





7
Normal Distribution

The density of the normal distribution is given by

2 2
( ) 2
1
( )
2
x
p x e
o
o t

= , for - < x <

where m is the mean of the distribution and s is the standard deviation.



It is beyond the scope of this course to verify that ( ) 1 p x dx

=
}
. However, we can see
that 0 p(x) 1 for all x, since
2 2
( ) 2 x
e
o
will always be positive (but less than 1) and
1
2 o t
is a positive scalar that is less than 1.


The normal density function is not an elementary integral. That is, a closed form of the
antiderivative does not exist. But, as Figure 4 above illustrates, there is still area under the
curve. To evaluate the integral, we use a calculator or a table of values.


Example 5:

Lengths of human pregnancies are normally distributed with mean 268 days and
standard deviation 15 days. What percentage of pregnancies last between 250 days and
280 days?

Solution:

Using the fact that m = 268 and s = 15, we have that the density function is given by
2
( 268) 2(15)
1
( )
15 2
x
p x e
t

=
2
. Finding the integral numerically, we have:


2 2
280
( 268) 2(15)
250
Proportion of pregnancies lasting
1
0.673
between 250 days and 280 days
15 2
x
e dx
t

= ~
}
.
8

You might also like