In order to generate and study random algebraic objects formally, one should define a statistical model for such objects. A model captures the random generating process of the objects. It consists of a name, a set of parameters, and a generating function, stored under the corresponding keys in the hash table.

Combined with the type Sample, the type Model defined here stores such information and allows for a streamlined way to sample random objects, store the data as a proper statistical sample, and study their algebraic properties under the probabilistic regime.