Is using integration by parts on the integral of the product of the conditional pmf and density function appropriate?

19 Views Asked by At

Suppose we have the following integral: \begin{equation} \int_{\mathbb{R}}P[K_t=k_t\mid w_{t-1}{ }]f(w_{t-1}\mid k_{t-1}{ }) dw_{t-1} \end{equation} where $K_t$ for $t=1,\cdots,T$ are Bernoulli RVs, with realizations $k_t$, while $W_t \in \mathbb{R}$ is a continuous random variable with realizations $w_t$, $f(.\mid .)$ is a conditional density function, and $P[.\mid.]$ a conditional probability mass function. For reasons specific to my problem, I want to get $P[K_t=k_t\mid w_{t-1}{ }]$ out of the integral. To do so, I decided to use integral by parts - i.e., \begin{equation} \int u dv = uv- \int vdu \end{equation} where I assume: \begin{equation} \int_{\mathbb{R}}\underbrace{P[K_t=k_t\mid w_{t-1}{ }]}_{u}\underbrace{f(w_{t-1}\mid k_{t-1}{ }) dw_{t-1}}_{dv} \end{equation} thus obtaining, \begin{align} \int_{\mathbb{R}}P[K_t=k_t\mid w_{t-1}{ }]f(w_{t-1}\mid k_{t-1}{ }) dw_{t-1}=\\ P[K_t=k_t\mid w_{t-1}{ }]\int_{\mathbb{R}}f(w_{t-1}\mid k_{t-1})dw_{t-1}-\int_{\mathbb{R}}\left(\int_{\mathbb{R}}f(w_{t-1}\mid k_{t-1})dw_{t-1}\right)\frac{d P[K_t=k_t\mid w_{t-1}]}{dw_{t-1}}dw_{t-1} \end{align} Moreover, since $\int_{\mathbb{R}}f(w_{t-1}\mid k_{t-1})dw_{t-1}=1$, assuming the above is correct, it can be simplified to:

\begin{align} \int_{\mathbb{R}}P[K_t=k_t\mid w_{t-1}{ }]f(w_{t-1}\mid k_{t-1}{ }) dw_{t-1}=\\ P[K_t=k_t\mid w_{t-1}{ }]-\int_{\mathbb{R}}\frac{d P[K_t=k_t\mid w_{t-1}]}{dw_{t-1}}dw_{t-1} \end{align}

Questions:

  1. Is this reasoning correct?
  2. Assuming above is correct, should $\frac{d P[K_t=k_t\mid w_{t-1}]}{dw_{t-1}}$ inside the integral term, instead be expressed as $\frac{\partial P[K_t=k_t\mid w_{t-1}]}{\partial w_{t-1}}$?
  3. If the above derivations are abhorrently incorrect, is there any other way to get $P[K_t=k_t\mid w_{t-1}]$ out of the integral?