For each \(g \in \mathcal {G}\) , we count the number of times it was mistakenly classified as a Bach chorale \(N^{\text{miss}}_g\) , and the number of times it was correctly identified as computer generated \(N^{\text{corr}}_g\) . The raw count data can be found in the Appendix. We take the relative frequency of miss-classifications \(T_g = N^{\text{miss}}_g / (N^{\text{miss}}_g + N^{\text{corr}}_g)\)  as an indication of how similar \(g\)  is to the style of Bach's Chorales \((\mathcal {C})\) . This results in \({36 \atopwithdelims ()2} = 630\)  pairwise comparisons for which we have a ground truth ranking. Using a chi-square contingency test [1]} we can measure the degree to which we are certain that there is a difference between two samples. We measure accuracy using Eq. (), where \(p_{ij}\)  is the \(p\) -value for the chi-square contingency test comparing the counts for the \(i^{th}\)  and \(j^{th}\)  examples, \(\phi (\cdot )\)  is a function returning 1 if the predicate \(\cdot \)  is true and 0 otherwise, and \(\alpha \)  denotes the threshold for significance.
\(f(x,y) ={\left\lbrace \begin{array}{ll}1, & \text{if}\ \phi \big (S^{\mathcal {G},\mathcal {C},\mathcal {F}}_x < S^{\mathcal {G},\mathcal {C},\mathcal {F}}_y\big ) = \phi \big (T_x < T_y\big )\\0, & \text{otherwise}\end{array}\right.} \\\texttt {acc}(\mathcal {G},\mathcal {C},\alpha ) = \dfrac{\sum _{i=1}^{||\mathcal {G}||} \sum _{j=i+1}^{||\mathcal {G}||} f(\mathcal {G}_i, \mathcal {G}_j) \phi (p_{ij} < \alpha )}{\sum _{i=1}^{||\mathcal {G}||} \sum _{j=i+1}^{||\mathcal {G}||} \phi (p_{ij} < \alpha )}\) 
