Linear discriminant analysis-Do we maximize posterior or joint distribution? My understanding is that in LDA, we maximize the joint density $ P(X,y) $ using $P(X|y)$ rather than posterior density $P(y|X)$ using $P(X|y)$. In the book "Introduction to Statistical learning with R", the authors say otherwise. Though they do not provide a derivation, they say the expressions for $P(y|X)$ are to be maximised.
https://hastie.su.domains/ISLR2/ISLRv2_website.pdf
See equation 4.15 and 4.17 and paragraphs around them.

Maximizing the joint density is equivalent to maximizing the posterior because the denominator is the common term across classes, i.e. $P(X)$. In addition to  $P(X|y)$, $P(y)$ is also used in the process as class prior.
