The average analytic rank of elliptic curves