https://123dok.net/document/qo5o65mj-estimating-joint-distribution-independent-categorical-variables-model-selection.html