Suppose a random variable between and is described by its cumulative distribution function, for , and no density is given. The CDF says how much probability has accumulated up to each threshold. How densely is probability packed near the threshold ? That is a question about how fast the accumulated probability grows there, and rates of change are measured by derivatives. This lesson defines the derivative as a limit of difference quotients, links it to integration through the fundamental theorem of calculus, and shows when differentiating a CDF recovers a density and when it cannot.
Key terms
Difference quotient
Definition Let be a function defined at and at , where . The difference quotient of at with step is
It is the slope of the secant line through the points and on the graph of . When is the CDF of a random variable and , the numerator is , so the quotient is the average probability per unit of over the interval .
In plain words Move the threshold by a small step, see how much the function changes, and divide that change by the step, counting a step to the left as negative. For a CDF, the result is the probability of the short interval between the two thresholds per unit of width.
Example Let have the CDF
When and both lie in , the squared terms cancel,
At the quotient is . For the numerator is , and dividing by the width gives .
| Step | Difference quotient at |
|---|---|
Derivative
Definition Let be defined on an open interval containing . If the difference quotients approach a limit as through nonzero values of both signs, then is differentiable at , and the limit
is the derivative of at . The line through with slope is the tangent line, and is the tangent slope. If the limit does not exist, has no derivative and no tangent slope at . The derivative is measured in units of per unit of .
In plain words The derivative is the slope that the secant lines settle on as the second point slides toward the first from either side. It measures how fast changes at the point itself, not over a stretch.
Example For the CDF above, the quotients at equal , which tends to from both sides, so . The tangent line at has slope , and if is measured in hours the derivative is per hour. The same computation gives for every with . At there is no derivative. For the quotient is , which tends to , while for it is . The graph has a corner there, with slope on the left and slope on the right.
Power rule for derivatives
Definition For every positive integer , the function is differentiable at every real , and
where means , so the derivative of is . A constant function has derivative everywhere. Derivatives respect constant multiples and sums, so and at every where and are differentiable. Together these rules differentiate every polynomial.
In plain words Bring the exponent down as a factor and lower the exponent by one. A constant does not change, so its rate of change is zero.
Example For , expanding gives
which tends to as . So the derivative of is , and adding a constant does not change it, since also has derivative . With the multiple and sum rules, the polynomial has derivative .
Fundamental theorem of calculus
Definition Let be continuous on with . The theorem has two parts.
The first part says that the accumulated area , defined for , is differentiable at every with , and . If is only integrable on , for example bounded with finitely many jumps, the conclusion still holds at each with where is continuous.
The second part says that if is continuous on and for every with , then
In plain words Differentiating accumulated area gives back the height of the curve wherever the curve is continuous. In the other direction, to integrate a continuous function over an interval it is enough to know any function whose rate of change equals the integrand throughout that interval, and to subtract its values at the two limits.
Example For on , the accumulated area is , and its derivative is the height , as the first part says. For the second part, take the continuous integrand on . The power rule shows that has derivative , so
Antiderivative
Definition Let be a function on an open interval . A function is an antiderivative of on if for every in . If is one antiderivative of on , then the antiderivatives of on are exactly the functions with a constant. In the second part of the fundamental theorem the constant cancels, because
In plain words An antiderivative undoes differentiation. Functions with the same rate of change on an interval differ only by a vertical shift, and the shift drops out when you subtract values at two limits.
Example On the whole real line, and are both antiderivatives of . Either one gives
since . They are not equally good as CDFs, though. For a density that is continuous on and outside it, the CDF on is , the antiderivative that starts at at . For the density on that is , while starts at and is no CDF at all.
Density as the derivative of the CDF
Definition Let have density and CDF , so that for every real . By the fundamental theorem, at every where is continuous. In the other direction, suppose the CDF of a random variable is continuous everywhere, and that outside a finite set of points is differentiable with a continuous derivative. Then setting outside that set, and choosing any nonnegative values at its points, gives a density of . Changing a density at finitely many points changes no integral, so all such choices give the same probabilities. If jumps at , then , and has no density at all, because a density gives every single value probability . Continuity alone is not enough either. The Cantor function is a continuous CDF that rises from to on , yet it is constant on intervals of total length . Its derivative is on all of those intervals, the remaining points have total length , and no density produces this CDF.
In plain words When a variable has a density, the slope of its CDF at each point where the CDF is smooth is the density there, the local rate at which probability accumulates. A density value is not the probability of a point. Near a point where is continuous, a short interval of width has probability close to . Differentiation cannot see probability that sits on a single value, because that probability shows up as a jump, not as a slope.
Example For the CDF on , the derivative is for and for and . At both one-sided slopes are , so , and at the corner there is no derivative. So for and otherwise is a density of , and setting instead would change no probability. The value is not , which is . It says that
is close to .
Check yourself
- A random variable has CDF for , for and for . Find a density of . Where does fail to have a derivative, and does that matter?
Show the answer
By the power rule, for , and for and for , where is constant. At both one-sided slopes are , so . At the quotients from the left are , which tend to , while those from the right are , so has a corner and no derivative there. A density is
and its total area is . The missing derivative at the single point does not matter, because any nonnegative value of gives the same integrals and so the same probabilities.
- For the same , find in two ways, from the CDF and by integrating the density.
Show the answer
From the CDF, . Leaving out the right endpoint changes nothing, since a single point has probability . By integration, is an antiderivative of , so
The two routes agree, as the fundamental theorem says they must.
- A random variable has CDF for , for and for . A classmate differentiates and proposes the density for and otherwise. What goes wrong?
Show the answer
The total area under is , not , so is not a density. The CDF jumps at , from just to the left to , so . Differentiating sees only the slope on and misses the probability that sits on the single value . Since every density gives each single value probability , the variable has no density at all. Its distribution combines a point mass at with probability spread over .