[Math] IQR of continuous random variable

probability

If the continuous random variable $X$ has probability density
$$
f(x) = \begin{cases} \sec^2 x, & 0<x<\dfrac\pi4, \\[8pt] 0, & \text{otherwise,} \end{cases}
$$
find the interquartile range of $X$

So the integral is $\tan(x)$. I'm not sure how to work out the IQR though – I tried $3/4 \times \pi/4$ and $1/4\times\pi/4$ as bounds and got $0.469$ after evaluating the integral. The answer is $0.399$.

How do I work out the IQR from CRVs?

Best Answer

You have $\Pr(X\le x) = \tan x$ for $0\le x\le\pi/4$.

You want $\Pr(X\le x_1)= 1/4$. So $\tan x_1= 1/4$ and $x_1=\arctan\dfrac14$. Do a similar thing with $3/4$ and the range you seek is $$ \arctan\frac34-\arctan\frac14. $$ I don't know if you can do anything better than using numerical methods after that.

(Using R, I get $0.3985224$. That is of course rounded.)