I'm studying the Kolmogorov-Smirnov and Chi-squared tests.
From this answer,
On the other hand the chi-squared statistic does give useful shortcuts if you are trying to model the parameters that describe a set of data and the uncertainties on those parameters. The K-S test should not really be used if there are adjustable parameters which are being optimised to fit the data.
From this article,
K-S test probabilities are wrong if the model was derived from the dataset.
In this answer, the author uses the parameter estimated from the dataset itself to do the Chi-squared test on the same dataset.
As such, I got that it's problematic to use K-S test with parameters optimized to fit the data.
My questions: Is it fine to use Chi-squared test with parameters estimated from the data itself?