Teaching statistics in the context of social foresight. An applied approach based on the use of an open-source software