Integral versus a sum for an expression that sums to one

I have an expression $f(x)$, outputting strictly real numbered values $\geq 0$ corresponding to the probability of some event, where $\sum_{i=0}^{N} f(i) = 1$. When is it true that $\int_{i=0}^{N} f(i) d(i) = 1$? If this isn't true, how do I find the average value of $f$, or points where $\sum_{i=0}^{r}f(i)=y$ for $0 \leq y \leq 1$?

-
you wanna talk about $\int_{i=0}^{N} f(i)~di = 1$ ? – Argha Dec 22 '12 at 11:51
@Argha Yes, that's right. – Steph Dec 22 '12 at 11:54
Since your sum is 1 you can use $\int$ instead of $\sum$ for moderate large n. – Argha Dec 22 '12 at 12:43
@Argha My example fails regardless of $N$, you can set it to be infinite. I'd like to understand when this happens...? – Steph Dec 22 '12 at 13:05

Mathematically $\sum$ and $\int$ are notation. We use $\sum$ for discrete(discontinuous) case and $\int$ for continuous case. Conceptually sometimes we use $\int$ instead of $\sum$ .
Let we find the sum $\sum_{k=1}^{n}k^{3/2}$ $$\sum_{k=1}^{n}k^{3/2}=\int_{0}^{n}x^{3/2}~dx=\frac{2}{5}n^{5/2}$$ Note that $$\lim_{n \to \infty}\frac{1}{n}\sum_{r=1}^{n}f(\frac{r}{n})=\int_{0}^{1}f(x)~dx$$ For large n, $$\lim_{n \to \infty}\frac{1}{n}\sum_{r=1}^{n}(\frac{k}{n})^{3/2}=\int_{0}^{1}x^{3/2}~dx=\frac{2}{5}$$ Then $$\lim_{n \to \infty}\sum_{r=1}^{n}k^{3/2}=\frac{2}{5}n^{5/2}$$
$\sum$ is not equivalent with $\int$. It only can be conceptually approximated by $\int$. For large $N$ the result given by $\sum$ is very near to the result given by $\int$ though they are not same. $\int$ value is always greater than $\sum$. – Argha Dec 23 '12 at 5:25