Probability Mean and Median

Embed Size (px)

Citation preview

  • 7/31/2019 Probability Mean and Median

    1/8

    Probability, Mean and MedianIn the last section, we considered (probability) density functions. We went on to

    discuss their relationship with cumulative distribution functions. The goal of this sectionis to take a closer look at densities, introduce some common distributions and discuss themean 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 dxx a b p x a b

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

    Proportion of population( ) ( )

    having values of below

    t

    P t p x dxx 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 functionp(x).

    2 4 6 8 10x

    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

  • 7/31/2019 Probability Mean and Median

    2/8

    Solution:

    a. Recall, a function is a probability density function if the area under the curve isequal to 1 and all of the values ofp(x) are non-negative. It is immediately clearthat the values ofp(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 baseis 10 and its height is 0.2. Thus its area is equal to

    110 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 10x

    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 formp(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 byp(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 byp(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

    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)t2. So,

    we have that

    3

    0

    ( ) (3) (0)p x dx P P

    2 21 1 9( 3)P X (3) (0) (3) (0) 0.1560 60 60

    P P .

    2

  • 7/31/2019 Probability Mean and Median

    3/8

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

    2 4 6 8 10x

    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 onthe sides.

    In (b), we found the area of the left triangle is equal to 0.15. The area of the righttriangle 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 atx = 6.

    Thus, in order to compute the integral8

    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 .

    66 6

    2

    33 3

    1 1( ) 0.45

    30 60p x dx xdx x

    .

    88 8

    2

    66 6

    1 1 1 1( ) 0.3

    20 2 40 2p 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 functionp(x), then we define the mean value of the

    quantity as ( )xp x dx

    .

    3

  • 7/31/2019 Probability Mean and Median

    4/8

    Example 2:

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

    Solution:

    Notice thatp(x) changes functions atx = 6. Thus, in order to compute the integral10

    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 4216 176 16

    90 60 3

    0

    1xp x dx x xdx x x dx

    x x x

    The Median

    A median of a quantityx distributed through a population is a value Tsuch

    that half of the population has values ofx less than Tand half the population hasvalues ofx greater than T. That is, Tsatisfies the equation

    1( )

    2

    T

    p x dx

    wherep(x) is the density function of the quantity. In words, we have that halfthe area under the graph ofp(x) lies to the left ofT(and half lies to the right ofT.)

    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

  • 7/31/2019 Probability Mean and Median

    5/8

    Since we do not need to worry about the function changing (since it is the same on the

    interval [0, 6]), we have that0

    1

    30 2

    T

    xdx1

    . That is,2 1

    60 2

    T . Solving for T, we see that

    30T .

    Note: We did not use the 30 for T, since we know that Tis 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. Weintroduced this distribution in the previous section. The graph of the density function is

    constant on the interval [a, b] and zero elsewhere.

    a bx

    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 axb

    The cumulative distribution function is given by

    ( ) ( )t

    a

    t aP t p x dx

    b a

    , for atb

    Another important distribution we shall consider is the exponential distribution. The

    graph of the density function is characterized by an exponential decay.

    5

  • 7/31/2019 Probability Mean and Median

    6/8

    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

    ( ) cxp x ce , forx 0 and any constant c > 0

    The cumulative distribution function is given by

    0

    ( ) ( ) 1t

    ctP 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 0x

    xp xke 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, wesee 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 /50

    0 0

    1 lim lim 5 lim 5 5b

    bx x x b

    b b bke dx ke dx ke k ke k

    5

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

    6

  • 7/31/2019 Probability Mean and Median

    7/8

    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 bp x dx p x dx P b P P e e

    .

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

    P b

    to simplify the above expression.

    c. The mean wait time is given by /50

    5

    xxe dx

    . Using integration by parts, we have:

    /5 /5 /5 /5

    00 0 0

    /5 /5

    0 0

    /5 /5

    lim lim5 5

    lim 5

    lim 5 5

    5

    b bb

    x x x

    b b

    b bx x

    b

    b b

    b

    x xe dx e dx xe e dx

    xe e

    be e

    x

    cx

    Note: In general, if ( )p x ce forx 0, then0

    1( )xp x dx

    c

    .

    The final distribution which we shall examine is the normal distribution. The graphof 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.

    mx

    s s

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

    7

  • 7/31/2019 Probability Mean and Median

    8/8

    Normal Distribution

    The density of the normal distribution is given by

    2 2( ) 21( )2

    xp x e

    , for -