Cumulative Distribution
Cumulative Distribution
Recall
If p(x) is a density function for some characteristic of a population, then
Recall
If p(x) is a density function for some characteristic of a population, then
Recall
We also interpret density functions as probabilities: If p(x) is a probability density function (pdf), then
Gives: The proportion of population with value less than x The probability of having a value less than x.
Example: A Spinner
Last class: A spinner that could take on any value 0x 360. Density function: p(x) = 1/360 if 0x 360, and 0 everywhere else.
Example: A Spinner
Last class: A spinner that could take on any value 0x 360. Density function: p(x) = 1/360 if 0x 360, and 0 everywhere else. CDF:
Example: A Spinner
Density Function: Cumulative Distribution Function:
Properties of CDFs
P(x) is the probability of values less than x
If P(x) is the cdf for the age in months of sh in a lake, then P(10) is the probability a random sh is 10 months or younger.
Properties of CDFs
Conversely, P(x) is non-decreasing.
The derivative is a density function, which cannot be negative. Also, P(4) cant be less than P(3), for example.
Practice
Life expectancy (in days) of electronic component has density function , for x 1, and p(x) =0 for x<1. a) Probability component lasts between 0 and 1 day? b) Probability it lasts between 0 and 10 days? c) More than 10 days? d) Find the CDF for the life expectancy.
Practice
Life expectancy (in days) of electronic component has density function , for x 1, and p(x) =0 for x<1. a) Probability component lasts between 0 and 1 day? Zero!
Practice
Life expectancy (in days) of electronic component has density function , for x 1, and p(x) =0 for x<1. b) Probability it lasts between 0 and 10 days?
Practice
Life expectancy (in days) of electronic component has density function , for x 1, and p(x) =0 for x<1. c) More than 10 days?
Practice
Life expectancy (in days) of electronic component has density function , for x 1, and p(x) =0 for x<1. c) More than 10 days?
Practice
Life expectancy (in days) of electronic component has density function , for x 1, and p(x) =0 for x<1. d) Find the CDF for life expectancy. If x < 1, then If x 1, then
Practice
Life expectancy (in days) of electronic component has density function , for x 1, and p(x) =0 for x<1. d) Find the CDF for life expectancy.
Example
Someone claims this is the CDF for grades on the 2015 nal exam. Probability a random student scored. 25 or lower? 1, or 100%. 50 or lower? 0.5, or 50%. Conclusion? Theyre lying! This cannot be a cumulative distribution function! (It decreases.)
Example
Sketch the density function for the cdf shown.
Example
Sketch the density function for the cdf shown.
Slope?
Example
Sketch the density function for the cdf shown.
Slope? 0
Example
Sketch the density function for the cdf shown.
Slope? 0
Slope 1/2
Example
Sketch the density function for the cdf shown.
Slope 0
Slope? 0
Slope 1/2
Example
Sketch the density function for the cdf shown.
Slope 0
Slope? 0
Example
Sketch the density function for the cdf shown.
Slope 0
Slope 0
Slope? 0
Example
Sketch the density function for the cdf shown.
Slope 0
Slope 0
Slope? 0
Density Function
DF vs. CDF
You must know which is which. We work differently with density functions than with cumulative distribution functions.
Another Example
Suppose the cumulative distribution function for the height of trees in a forest (in feet) is given by
Find the height, x for which exactly half the trees are taller than x feet, and half the trees are shorter than x. In case - Quadratic Formula:
!b b 2 ! 4ac x= 2a
Another Example
Find the height, x for which exactly half the trees are taller than x feet, and half the trees are shorter than x.
0.1x ! 0.0025x 2 = 0.5 !0.0025x 2 + 0.1x ! 0.5 = 0 !0.0025(x 2 ! 40x + 200) = 0 using quadratic : x = 20 10 2 = 20 !10 2 " 5.86 ft
Example
(1)
(2)
(3)
(4)
In-class Assignment
The time to conduct a routine maintenance check on a machine has a cumulative distribution function P(t), which gives the fraction of maintenance checks completed in time less than or equal to t minutes. Values of P(t) are given in the table. t, minutes 0 P(t), fraction completed 0 5 .03 10 .08 15 .21 20 .38 25 .80 30 .98
a. What fraction of maintenance checks are completed in 15 minutes or less? b. What fraction of maintenance checks take longer than 30 minutes? c. What fraction take between 10 and 15 minutes?
In-class Assignment
The time to conduct a routine maintenance check on a machine has a cumulative distribution function P(t), which gives the fraction of maintenance checks completed in time less than or equal to t minutes. Values of P(t) are given in the table. t, minutes 0 P(t), fraction completed 0 5 .03 10 .08 15 .21 20 .38 25 .80 30 .98
a. What fraction of maintenance checks are completed in 15 minutes or less? 21% b. What fraction of maintenance checks take longer than 30 minutes? 2% c. What fraction take between 10 and 15 minutes? 13%
Lesson 21
The Median
The median is the halfway point: Half the population has a lower value, and half a higher value. If p(x) is a density function, then the median of the distribution is the point M such that
!"
p(x)dx = 0.5
Example
Suppose an insect life span of months, and 0 elsewhere. Whats the median life span? We need
months
Example
CDF: P(t) = t2, 0t 1. Whats the median of this distribution?
Example
CDF: P(t) = t2, 0t 1. Whats the median of this distribution?
The Mean
What most people think of as the average: Add up n values and divide by n. How should we represent this for something represented by a density function p(x)?
The Mean
We dene the mean of a distribution given by density function p(x) to be
Example
Previous insect population example: and p(x) =0 elsewhere. Whats the mean lifespan?
Example
Previous insect population example: and p(x) =0 elsewhere. Whats the mean lifespan? 8 months.
Example
Previous insect population example: and p(x) =0 elsewhere. Whats the mean lifespan? 8 months.
The mean is slightly below the median. This means more than half the insects live longer than the mean lifespan.
Example 2
From Another Example,
# #
" !"
x p(x)dx =
20 0 2
x(0.1! 0.005x)dx =
2 3 20 0
20
= 6.64 ft
Geometry
Turns out: the mean is the point where the graph of the distribution would balance if we cut it out.
Example
Find the mean and median for and zero elsewhere. Median: Solve for M
Example
Find the mean and median for and zero elsewhere. Mean: Evaluate
Example
Find the mean and median for and zero elsewhere.
mean
median
The distribution is symmetric about x= . So the mean is , and so is the median. is called the standard deviation, and describes how spread out the curve is.
Example
Suppose a density function for number of people (in millions) on the internet at one time were
2
Example
Suppose a density function for number of people (in millions) on the internet at one time were
2
What are the mean and median? Here, =10, so both the mean and median are 10million people.
Example
Suppose a density function for number of people (in millions) on the internet at one time were
2
Example
Suppose a density function for number of people (in millions) on the internet at one time were
2
What is the standard deviation? Here, we see that =2, so 2million people.
Example
Suppose a density function for number of people (in millions) on the internet at one time were
2
What is the standard deviation? Here, we see that =2, so 2million people.
Example
Suppose a density function for number of people (in millions) on the internet at one time were
2
Write an integral for the fraction of time between 8 and 12 million people are on the internet.
Example
Suppose a density function for number of people (in millions) on the internet at one time were
2
Write an integral for the fraction of time between 8 and 12 million people are on the internet.
2
In Class Assignment
Find the mean and median of the distribution with density function: (calculations should be to 2 decimal places)
1 3 p(x) = x 4