1
$\begingroup$

Consider the continuous distribution with density function $$ p(x) = \frac{1}{2}\cos(x) \;, \quad -\frac{\pi}{2} < x < \frac{\pi}{2}. $$

I want to derive the cumulative distribution function for this density function. In other examples I've seen, this is usually done by taking the anti-derivate of the density function which (in the examples that I've seen) leads to a valid CDF.

However, it seems that following the same approach for this example yields an invalid CDF, $$ \begin{cases} \: -0.5 , \quad \quad x \leq \frac{-\pi}{2} \\ \frac{1}{2}\sin(x), \: \: -\frac{\pi}{2} < x < \frac{\pi}{2} \\ \: \: \: 0.5, \quad \quad x \geq \frac{\pi}{2} \end{cases} $$ and that it somehow needs rescaling. What am I doing wrong here, and how does one go about finding the CDF for this density function?

enter image description here

$\endgroup$
1
  • $\begingroup$ The integral for the CDF of a density $f$ is, generically, $F(x) =\int_{-\infty}^x f(t)\,\mathrm dt.$ Notice the lower limit. You started with a lower limit of $0.$ $\endgroup$
    – whuber
    Commented Jun 5, 2023 at 13:22

1 Answer 1

1
$\begingroup$

You forgot about the constant of integration: https://en.wikipedia.org/wiki/Constant_of_integration

Just add $C = 0.5$ and your anti derivative becomes a valid CDF with corresponding density $p(x)$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.