expectation of unbounded functions Let $(\Omega, A, \mathbb{P} )$ be a probability space. Let $f: \Omega  \rightarrow [-\infty, \infty]$ an $A$-measurable function. 
If $f$ is bounded on the positive side and unbounded on the negative side. Is it possible that $\mathbb{E}[f]$ (the expectation with probability measure $\mathbb{P}$ ) is finite?
and what if $f$ is unbounded on the 2 sides ?
 A: Here is a strong example. Let $\Omega = [0,1]$, and $\mathcal{A}$ is the Borel sigma algebra. Consider $P$ to be Lebesgue measure on $\Omega$. Define
$f(\omega)=
  \begin{cases}
   q & \text{if } \omega = \frac{p}{q} \text{ in reduced form and $q$ is odd} \\
   -q &\text{if } \omega = \frac{p}{q} \text{ in reduced form and $q$ is even}\\
   0 & \text{if } \omega \text{ is irrational}
  \end{cases}$
Then $f$ has finite expectation $0$, but $f$ is unbounded from above and below on every interval.
(Note: The reason why $f$ is measurable is that the pre-image of $(a, \infty)$ is countable or co-countable for any $a \in \mathbb{R}$, and such sets are clearly Borel)
A: For your first question, possibly. As for your second question. Yes, it can be finite, most symetric distributions are examples of this. The measure is bounded, but the space can be infinite.
A: The function $f$ can be unbounded and still be integrable. For example, $f\left(x\right)=\exp\left(-x^{2}\right)\mathtt{1}_{\mathbb{R}_{+}}\left(x\right)
 +\delta_{-1}\left(x\right)$ defines an unbounded function, but $\mathbb{E}\left[f\right]=\frac{\sqrt{\pi}}{2}$ for the Lebesgue's measure (with $\Omega=\mathbb{R}$). Here, you notice that $f$ is actually bounded Lebesgue-almost everywhere.
