Normally, a Pearson $\chi^2$ test can be used to help determine if an observed set of results came from a particular discrete distribution by comparing the expected and observed quantities of each outcome. Specifically, we can test the hypothesis that the observed list came from the prescribed discrete distribution.
What can be done if the underlying distribution is not known? Instead, suppose we are just given two lists of observation frequencies (from different sources; possibly of different observation counts) and we want to determine if they came from the same underlying distribution. Is there a way to test the hypothesis that the two observed samples came from the same underlying distribution, without specifying what that underlying distribution is? If so, what test should be done?