How to compute probability density fuction of a continuous function and then expected value of it?

41 Views Asked by At

I have this discontinuous function:

$$f(r_i) = \begin{cases} 1, & \text{if}~ |r_i| < 1.5 \\ 0, & \text{if}~ |r_i| >1.5 \end{cases}$$ where $r_i = z_i - a^2_i\hat{x}~$, with $z_i$ being the $i$th column of matrix $z = Hx + e$, which error component $e\sim \mathcal{N}(0, \mathcal{I})$ has a covariance $\mathcal{I}$ being the identity matrix, and $a_i$ is the $i$th column vector of a given matrix $H$.

I want to compute probability density function of it and then expectation value. How can I do that (calculating pdf function of these functions)?

What about this slightly different function below with the same $r_i$ ? $$f(r_i) = \begin{cases} r_i^2, & \text{if}~ |r_i| < 1.5 \\ (1.5)^2 sgn^2(r_i), & \text{if}~ |r_i| > 1.5 \end{cases}$$