Average ranks and Selmer parity