A statistical approach to electrical storage sizing with application to the recovery of braking energy