Is calculating a percentile the same as evaluating a cumulative density function? I'm trying to make the jump from the idea of a percentile, say, over the real number line (where the nth percentile is simply the position in which n% of data points are below it, and 100-n% are above it), to the idea of the area under a probability density function.  
If I want to know the 50% percentile from a set of numbers, I'll find the point in which half the numbers are below, half the numbers are above. That's the 50% percentile, and I'm done.  
If I want to know the 50% percentile from a distribution, say, a Z-score, I'll evaluate the cdf from 0 - 50, and I'm done. Am I saying this correct?  
This feel right intuitively, but I need some discussion to hammer it home. Or, I could be completely off...
 A: You are close but not exactly right. Remember that the area under a probability distribution has to sum to 1. The cumulative density function (CDF) is a function with values in [0,1] since CDF is defined as
$$
F(a) = \int_{-\infty}^{a} f(x) dx
$$
 where f(x) is the probability density function. Then 50th percentile is the total probability of 50% of the samples which means the point where CDF reaches 0.5. Or in more general terms, the p'th percentile is the point where the CDF reaches p/100.
A: No. Essentially, calculating a percentile (or a p-quantile) is equivalent to finding the inverse of a CDF. 
Note that the inverse, in the usual sense, of a CDF may not exist
and the notion of generalized inverse should be introduced. To make
discussion precise, we clarify all definitions.
Definition: A CDF is a function $F:[-\infty,\infty]\rightarrow[0,1]$
that satisfies the following conditions:


*

*(Increasing) For any $x,y\in[-\infty,\infty]$, if $x<y$, then
$F(x)\leq F(y)$,

*(Right-continuity) For any $a\in\mathbb{R}$, we have that $F(a)=\lim_{x\rightarrow a+}F(x)$,

*$F(-\infty)=\lim_{x\rightarrow-\infty}F(x)=0$, and

*$F(\infty)=\lim_{x\rightarrow\infty}F(x)=1$.
We have at least two versions of generalized inverse of $F$, denoted
by $Inv_{1}F$ and $Inv_{2}F$, which are defined as follows.
$Inv_{1}F:[0,1]\rightarrow[-\infty,\infty]$, defined by $Inv_{1}F(x)=\inf\{y\mid F(y)\geq x\},$
$Inv_{2}F:[0,1]\rightarrow[-\infty,\infty]$, defined by $Inv_{2}F(x)=\inf\{y\mid F(y)>x\}$.
Here, we adopt the convention that $\inf(\emptyset)=\infty$.
If I remember correctly, given $p\in[0,1]$, the $p$-quantile is
simply defined as $Inv_{1}F(p)$.
Of course, if $F$ is strictly increasing and continuous, both versions
of generalized inverse are the same and reduce to the usual inverse
of function$F^{-1}:[0,1]\rightarrow[-\infty,\infty].$
For more information: https://people.math.ethz.ch/~embrecht/ftp/generalized_inverse.pdf
