convert ceil to floor Mathematically, why is this true?
$$\left\lceil\frac{a}{b}\right\rceil= \left\lfloor\frac{a+b-1}{b}\right\rfloor$$
Assume $a$ and $b$ are positive integers.
Is this also true if $a$ and $b$ are real numbers?

This is not true in general, e.g. take $b = 1/2$ and $a = 2,$ so the LHS is $4$ while the RHS is $3.$ 
Suppose $b\nmid a,$ since that case is trivial. Use the division algorithm to write $a = qb + r,$ where $q \in \mathbb{N}\cup \{0\}$ and $0 < r < b.$ Then the LHS is $q+1$ while the RHS is $\lfloor (q+1) + \frac{r-1}{b} \rfloor.$ Since $r$ is in fact an integer, $b > r \ge 1$ yields $\frac{b-1}{b} > \frac{r-1}{b} \ge 0,$ whence $\lfloor (q+1) + \frac{r-1}{b} \rfloor = q+1,$ as desired.
Edit: I was a bit hasty in giving the general condition. Here it is corrected.
If $b \mid a,$ then the LHS is $q$ and $r = 0,$ so you need $b \ge 1$ for the RHS to also be $q.$ If $b\nmid a,$ we write $a = qb + r,$ where $q \in \mathbb{Z}$ and $0 < r < |b|.$ 
So we need $0 \le \frac{r-1}{b} < 1.$ If $b > 0,$ this occurs so long as $r \ge 1$ (which in particular means that $b > 1$). 
If $b < 0,$ then we need $r > 1 + b.$ Now, we also have $r < |b| = -b,$ which gives $-b > 1 + b,$ or $b < -1/2.$ For $b \le -1,$ $r > 1+b$ holds trivially, and for $-1 < b < -1/2,$ one has to actually check that $r > 1 +b.$
