If $X$ follows the distribution with p.d.f $f(x)$, for example, pareto distribution, what will the p.d.f of the following expression be,
$$(X-A) ^{+} - (X-B)^{+}$$
Further, if $X_{k}, k = 1, \cdots, N$ follows the distribution with p.d.f $f(x)$ i,i,d, what will the p.d.f of the following expression be,
$\sum_{i=1}^{N} [(X_{k}-A)^{+}-(X_{k}-B)^{+}]$
Thank you for your time.
Suppose $A < B$, and $Y = (X-A)\mathbb{I}(X>A) -(X-B)\mathbb{I}(X>B)$
$$Y = \left\{ \begin{matrix} 0 & X\leq A \\ X-A & A < X \leq B \\ B-A & X > B\end{matrix} \right.$$
$$P(Y\leq y) = \left\{ \begin{matrix} P(X\leq A) & y = 0 \\ P(X \leq A) + \int_{0}^{y}f_{X}(y+a)dy & y \in (0, B-A) \\ P(X \leq A) + \int_{0}^{B-A}f_{X}(y+a)dy+P(X>B) = 1 & y=B-A\end{matrix} \right.$$
Let $S_n = \sum_{k=1}^{n}Y_k = \sum_{k=1}^{n}(X_k-A)\mathbb{I}(X>A) -(X_k-B)\mathbb{I}(X>B)$
Explicit expression of pdf of $S_n$ will be difficult to write (many cases) but its characterisitic function is as follows.
$$E(e^{itY}) = e^{it0}\cdot P(X\leq A) + \int_{0}^{B-A}e^{ity}f_{X}(y+a)dy + e^{it(B-A)}P(X>B)$$
$$E(e^{itS_n}) = E(e^{itY})^n$$