Understanding the role of hydrodynamic interactions in fish swimming may help explain why and how fish swim in schools. In this work, we designed controlled experiments to study fish swimming in a disturbed flow. Specifically, we recorded the tail beat frequency of a fish swimming in the presence of an actively-controlled airfoil pitching at varying frequencies. We propose an information-theoretic approach to quantify the influence of the motion of the pitching airfoil on the animal swimming. The theoretical framework developed in this work may inform future investigations on the mechanisms underlying schooling in groups.