Statistical causality in the EEG for the study of cognitive functions in healthy and pathological brains