  We prove that a positive proportion of integers are expressible as the sum of
two rational cubes, and a positive proportion are not so expressible. More
generally, we prove that a positive proportion (in fact, at least one sixth) of
elliptic curves in any cubic twist family have rank $0$, and a positive
proportion (in fact, at least one sixth) of elliptic curves with good reduction
at $2$ in any cubic twist family have rank $1$.
  Our method involves proving that the average size of the $2$-Selmer group of
elliptic curves in any cubic twist family, having any given root number, is
$3$. We accomplish this by generalizing a parametrization, due to the second
author and Ho, of elliptic curves with extra structure by pairs of binary cubic
forms. We then count integer points satisfying suitable congruence conditions
on a quadric hypersurface in the space of real pairs of binary cubic forms in a
fundamental domain for the action of $\mathrm{SL}_2(\mathbb{Z})\times
\mathrm{SL}_2(\mathbb{Z})$, using a combination of geometry-of-numbers methods
and the circle method, building on earlier work of Ruth and the first author.
We give a new interpretation of the singular integral and singular series
arising in the circle method in terms of real and $p$-adic integrals with
respect to Haar measure on the relevant group $\mathrm{SL}_2\times
\mathrm{SL}_2$. A uniformity estimate and sieve then shows that the average
size of the $2$-Selmer group over the full cubic twist family is $3$. After
suitably partitioning the subset of curves in the family with given root
number, we execute a further sieve to show that the root number is
equidistributed and that the same average, now taken over only those curves of
given root number, is also $3$. Finally, we apply the $p$-parity theorem of
Dokchitser--Dokchitser and a $p$-converse theorem of Burungale--Skinner to
conclude.
