# Resting-State Functional Connectivity in Mathematical Expertise
## 2 Materials and Methods
### Resting-State fMRI Data Analysis  
Resting-state fMRI data were preprocessed using FSL v5.0, Matlab R2017b and AFNI Version 17.2.17 ([[https://afni.nimh.nih.gov/](https://afni.nimh.nih.gov/)]([https://afni.nimh.nih.gov/](https://afni.nimh.nih.gov/)) 27/03/2021). After removal of the first four volumes of each scan, the data were slice time-corrected. Head motion was quantified by frame-wise displacement (the sum of rotational and translational rigid body realignment parameters from one volume to the next) [42]. We first evaluated the number of volumes with a frame-wise displacement >0.5 mm for each participant individually. Then, the dataset that required the most elimination served as a standard for determining the number of volumes to be discarded for all the participants' datasets, resulting in removing 37 volumes. Therefore, each participant had 379 volumes. Through this way, we were able to keep the amount of information added by each person identical, avoiding potential confounding effects from different degree of movement. Subsequently, the individual T1-weighted magnetization-prepared rapid gradient-echo (MP-RAGE) images were used to generate partial volume maps for grey matter (GM), white matter (WM), and cerebrospinal fluid (CSF). To this end, the T1 data images were skull-stripped, aligned to Montreal Neurological Institute (MNI) standard space, and segmented using FSL's fast [43]. Next, WM and CSF segmentations were thresholded at 80% tissue probability, and affinely aligned to individual space. To control for motion, as well as scanner-related and physiological noise, five principal components from WM and CSF were extracted from the functional data and regressed out together with the six linearly detrended motion parameters previously determined [44]. Finally, residual data were bandpass-filtered at 0.01-0.1 Hz, spatially smoothed with a 6 mm FWHM kernel, and affinely aligned to a T1-weighted MRI template derived from a normative adult population [45], as provided in SPM12 (Wellcome Imaging Department, University College, London, U.K., [[http://www.fil.ion.ucl.ac.uk/spm/](http://www.fil.ion.ucl.ac.uk/spm/)]([http://www.fil.ion.ucl.ac.uk/spm/](http://www.fil.ion.ucl.ac.uk/spm/))). Next, the resting-state fMRI time series samples were extracted using SPM12 (SPM12, [[http://www.fil.ion.ucl.ac.uk/spm/](http://www.fil.ion.ucl.ac.uk/spm/)]([http://www.fil.ion.ucl.ac.uk/spm/](http://www.fil.ion.ucl.ac.uk/spm/)), Wellcome Trust Centre for Neuroimaging, London, U.K.) [46]. GM was segmented into 112 ROIs based on the Anatomical Automated Labeling (AAL) atlas [47] implemented in SPM12. The representative BOLD signals of each ROI were extracted using principal component analysis (PCA), where the first component only was used [48]. The functional connectivity between all possible pairs of ROIs was evaluated using Pearson correlation coefficient. A Fisher r-to-z transform was computed to normalize r values for group comparison (mathematicians vs. non-mathematicians) [49; 50]. The difference of functional connectivity between the mathematician and non-mathematician groups was estimated using the independent permutation \(t\)-test (10,000 replicates, \(p<0.01\)) to avoid type I error [51; 52]. Moreover, we computed the correlation coefficients between functional connectivity and the mathematics scores in each group using [PERSON]'s correlation to investigate if there is a region-to-region connectivity depending on the knowledge of mathematics (i.e., mathematics scores). In order to further investigate different neural substrates between the two groups from a machine learning point of view, we performed the classification using 46 pairs of normalized r values as feature candidates, which showed statistically significant differences between the groups from the independent permutation \(t\)-test. In spite of the statistical significance in these pairs of features, they do not always guarantee the best classification performance [53].