  Suppose that a binary operation $\circ$ on a finite set $X$ is injective in
each variable separately and also associative. It is easy to prove that
$(X,\circ)$ must be a group. In this paper we examine what happens if one knows
only that a positive proportion of the triples $(x,y,z)\in X^3$ satisfy the
equation $x\circ(y\circ z)=(x\circ y)\circ z$. Other results in additive
combinatorics would lead one to expect that there must be an underlying
"group-like" structure that is responsible for the large number of associative
triples. We prove that this is indeed the case: there must be a
proportional-sized subset of the multiplication table that approximately agrees
with part of the multiplication table of a metric group. We also present an
example that suggests that our result cannot be strengthened to yield a dense
subset that agrees with part of the multiplication table of a group.
