Let be some variety of groups, and F-n(m) a free group in M with a basis {x(1),...,x(n)}. Two elements u(x(1),...,x(n)) and v(x(1),...,x(n)) of this group induce the same distributions on m if for any finite group G is an element of m and any element g is an element of G the equations u(x(1),...,x(n)) = g and v(x(1),..., x(n)) = g have the same number of solutions in G(n). It is proved that two elements of the derived subgroup of a free group of the variety of nilpotent groups of class at most 2 induce the same distributions on this variety if and only if these elements can be transformed into each other by automorphisms, but this is not true for elements that do not belong to the derived subgroup.