2
$\begingroup$

How to compute $$\int_{-k}^{k}F(x)dx$$ where $F(x)$ is the cumulative distribution function of continuous random variable $X$ which has symmetric pdf about $x=0$ and $k>0$.

$\endgroup$
5
  • 2
    $\begingroup$ What is the question? $\endgroup$
    – Firebug
    Mar 7, 2023 at 16:05
  • $\begingroup$ @Firebug what is the answer of the integral? $\endgroup$
    – Sina
    Mar 7, 2023 at 16:14
  • $\begingroup$ @ChristophHanck This question is from a reference book. So, there is nothing wrong with this question. $\endgroup$
    – Sina
    Mar 7, 2023 at 16:16
  • 6
    $\begingroup$ One would be permitted to doubt that it's from a reference book, because such books provide answers, not questions. This reads like a textbook or quiz question and it has a simple answer (depending on $k$ but not on $F$) you can literally see by plotting the graph of $F.$ $\endgroup$
    – whuber
    Mar 7, 2023 at 16:34
  • 1
    $\begingroup$ As whuber suggests, it's obvious by inspection. If $F$ is a continuous cdf that's symmetric about 0, the answer is immediate. If it's not obvious, draw a picture and (if you do it correctly) the answer should then be obvious. $\endgroup$
    – Glen_b
    Mar 7, 2023 at 23:15

2 Answers 2

5
$\begingroup$

Essentially translating whuber's comment into analysis and using point symmetry of the cdf around $(0,1/2)$, $F(k)=1-F(-k)$ or $F(-k)=1-F(k)$, $$ \begin{align*} \int_{-k}^{k}F(x)dx&=\int_{-k}^{0}F(x)dx+\int_{0}^{k}F(x)dx\\ &=\int_{0}^{k}[1-F(x)]dx+\int_{0}^{k}F(x)dx\\ &=\int_{0}^{k}1dx\\ &=k \end{align*} $$ Two examples:

k <- 1

> integrate(pnorm, -k, k)$value
[1] 1

> integrate(punif, -k, k, min=-4,max=4)$value
[1] 1

My initial, more clumsy solution:

Also by symmetry a, say, convex part of the cdf between $-k$ and 0 will be offset by a concave part between 0 and $k$ (the areas between the red and lightblue line in the plot below are equal), such that the integral is equal to a trapezoid on $-k$ and $k$ with rectangle height $1-F(k)$ and a triangle with height $F(k)-(1-F(k))=2F(k)-1$. All in all, the area is $$ 2k(1-F(k))+2k\frac{2F(k)-1}{2}=k $$

Schematically: enter image description here

stddev <- .75
x <- seq(-2, 2,by=0.01)
plot(x, pnorm(x, sd=stddev), type="l", lwd=2, col="lightblue")

segments(k, 0, k, pnorm(k, sd=stddev),lty=2)
segments(-k, 0, -k, 1-pnorm(k, sd=stddev),lty=2)
segments(-k, 1-pnorm(k, sd=stddev), k, pnorm(k, sd=stddev), lty=1, lwd=2, col="red")
abline(v=0, lty=2)
segments(-k, 1-pnorm(k, sd=stddev), k, 1-pnorm(k, sd=stddev),lty=2)
segments(0, pnorm(k, sd=stddev), k, pnorm(k, sd=stddev),lty=2)
text(-0.1, pnorm(k, sd=stddev), "F(k)")
text(-k-.25, 1-pnorm(k, sd=stddev), "1-F(k)")
$\endgroup$
1
  • 2
    $\begingroup$ +1. But everything goes from clear to obvious when you cut the picture into two pieces along the graph of $F$ bordered at right and left by $\pm k:$ rotate and shift one piece and place it on top of the other to obtain a rectangle of width $k$ and height $1.$ $\endgroup$
    – whuber
    Mar 7, 2023 at 19:00
5
$\begingroup$

Words are superfluous:

Well, unless you're visually impaired or can't see the image for some other reason... in which case, this is a drawing of a symmetric F with the area corresponding to the integral marked in one colour - light purple, and the remainder of the box (-k<x<k) times (0<y<1)  in another colour - sort of buff. The upper shape is simply a rotation of the lower purple shape; they're the same area, each making up half that box

... but sadly I need more than 22 characters.

$\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.