The activation of neural ensembles in the cortex is correlated with behavioral states and a change in neuronal functional connectivity patterns is expected. In this paper, we investigate this dynamic nature of functional connectivity in the cortex. Because of the time scale of behavior, a robust method with limited sample size is desirable. In light of this, we utilize mean square contingency (MSC) to measure the pairwise neural dependency to quantify the cortical functional connectivity. Simulation results show that MSC is more robust than cross correlation when the sample size is small. In monkey neural data test, our approach is more effective in detecting the dynamics of functional connectivity associated with the transitions between rest and movement states.