Two-sample Kolmogorov-Smirnov discrete distributions Let's say that two Census takers interview a number of couples and ask for the number of children they have. I want to compare the two resulting samples to find out if they could have come from the same population (let's say, the same country) or if they are more likely to have been drawn from two different populations.
I have been searching for quite some time and still could not find a definitive answer. Most sources state that the two-sample Kolmogorov-Smirnov test could be used if these were continuous distributions, which is not the case.
It seems that the two-sample chi-squared test, or the Wilcoxon-Mann-Whitney rank sum test could be used for discrete distributions, but these seem to suffer in the presence of many ties, which would be the case (most couples will have 0-3 kids).
Some have suggested the Wald statistic, which seems to be applicable to Poisson distributions. However, I don't assume that my problem follows any particular distribution.
In summary, is there a most appropriate test to find out if these two discrete/count samples come from the same population?

For the Python implementation of the two-sample chi-squared test:
from scipy.stats import chi2_contingency
import numpy as np

arr1 = [359, 387, 187, 48, 12, 7]
arr2 = [599, 311, 75, 14, 1, 0]

obs = np.array([arr1, arr2])
chi2, p, dof, ex = chi2_contingency(obs)
#Returns: chi-squared value, p-value, degrees of freedom, expected counts

