2

Let $f(x) = e^x$ on the interval $[0,2]$ and $0$ everywhere else. Calculate the 75th percentile of $f(x)$.

Attempt

So normally I would take the integral from $\int_{- \infty }^{x} f(x)dx$, equal it to $0.75$ and solve for $x$. But $f(x)$ only exists between $0$ and $2$, so I take the integral from $0$ to $x$ and equal it to $0.75$. Solve for $x$ gives $$e^x - e^0 = 0.75$$ or $$x = \ln(1.75) = 0.560 ~ .$$ However my book says it's $4.48$, I did some calculations and found that's equal to $e^{1.75}$. So am I wrong? How could the percentile lie outside the interval?

G. Chiusole
  • 5,486
Nicco
  • 81
  • 1
    Your method would be the correct way to find the 75th percentile of a random variable if the given $f(x)$ was its PDF. However, it’s not a PDF, since the area under the curve isn’t 1. – Joe Aug 28 '19 at 10:20
  • 1
    Although, I think it’d be better to use different symbols for the variable of integration and the bounds of integration, like $\int_{-\infty}^{x}f(t)dt =0.75$ – Joe Aug 28 '19 at 10:30

1 Answers1

3

If we are in $[0,1]$ then the 75th percentile of $f$ is $f(0.75)$. More generally, the $p$-th percentile of $f$ in $[a,b]$ (assuming uniform distribution) is $f(a+p(b-a))$. In this case you have to calculate $f(1.5)=e^{1.5}=4.48\ldots$

Your mistake is this: $f(x)$ is not the density of the distribution!

dcolazin
  • 2,242
  • 1
    I think the “assuming uniform distribution” was the point of confusion. I haven’t seen questions like this, so I also wouldn’t have realized that “on the interval $[0,2]$” meant that $x$ was uniformly distributed. I would have thought that $f(x)$ was supposed to be a PDF, but the author forgot to normalize. – Joe Aug 28 '19 at 10:25
  • Well, that wasn't mentioned anywhere in my book or powerpoints. I wonder why. Good to know, thanks! – Nicco Aug 28 '19 at 11:59
  • Is there a way to find the pdf from f(x) ? – Nicco Aug 28 '19 at 12:19
  • @Nicco in this case $f$ and the (uniform) pdf have no relations between each other: the distribution is on the "$x$" – dcolazin Aug 28 '19 at 14:39