I'm working through a derivation of the joint likelihood for a dataset $(\mathbf{X}_i, \mathbf{y}_i)$ under the assumption of conditional independence of $\mathbf{y}_i$ given $\mathbf{X}_i$, without assuming marginal independence of the features $\mathbf{X}_i$. I’m trying to confirm whether my understanding of the joint likelihood expression is correct.
Here’s the setup:
- I have $N$ observations where $\mathbf{y}_i$ is the target variable and $\mathbf{X}_i$ is the feature vector of observation $i$.
- I assume conditional independence of $\mathbf{y}_i$ given $\mathbf{X}_i$. This means:
$$ p(y_1, y_2, \ldots, y_N \mid \mathbf{X}_1, \mathbf{X}_2, \ldots, \mathbf{X}_N) = \prod_{i=1}^N p(y_i \mid \mathbf{X}_i). $$
- I do not assume any marginal independence among $\mathbf{X}_i$ values, so the joint distribution $p(\mathbf{X}_1, \mathbf{X}_2, \ldots, \mathbf{X}_N)$ could be arbitrary.
Given this, I derive the joint likelihood of observing both the target values and the features as follows:
Derivation Attempt:
Using the chain rule, I write the joint probability as:
$$ p(y_1, y_2, \ldots, y_N, \mathbf{X}_1, \mathbf{X}_2, \ldots, \mathbf{X}_N;\theta) = p(y_1, y_2, \ldots, y_N \mid \mathbf{X}_1, \mathbf{X}_2, \ldots, \mathbf{X}_N;\theta) \cdot p(\mathbf{X}_1, \mathbf{X}_2, \ldots, \mathbf{X}_N). $$
Applying conditional independence of $\mathbf{y}_i$'s given $\mathbf{X}_i$'s, I replace the conditional joint probability with:
$$ p(y_1, y_2, \ldots, y_N \mid \mathbf{X}_1, \mathbf{X}_2, \ldots, \mathbf{X}_N;\theta) = \prod_{i=1}^N p(y_i \mid \mathbf{X}_i;\theta). $$
Thus, the joint likelihood becomes:
$$ L(\theta) = p(y_1, y_2, \ldots, y_N, \mathbf{X}_1, \mathbf{X}_2, \ldots, \mathbf{X}_N) = \left( \prod_{i=1}^N p(y_i \mid \mathbf{X}_i; \theta) \right) \cdot p(\mathbf{X}_1, \mathbf{X}_2, \ldots, \mathbf{X}_N). $$
Questions:
- Is this derivation correct for the joint likelihood under the assumptions given?
- When maximizing the likelihood for $\theta$, am I correct to focus only on the conditional part $\prod_{i=1}^N p(y_i \mid \mathbf{X}_i; \theta)$ since $p(\mathbf{X}_1, \mathbf{X}_2, \ldots, \mathbf{X}_N)$ does not depend on $\theta$?
Any feedback on this derivation or references to similar derivations in statistical literature would be greatly appreciated!