Estadísticas de Geometric numerical methods for Lie systems and their application in optimal control