# Difference between revisions of "Glossary"

A glossary of general terms

## $r^2$ (Coefficient of Determination)

The coefficient of determination, or $r^2$ value, is a statistical measure computed over a pair of sample distributions, giving a measure of how strongly the means of the two distributions differ in relation to variance. In a BCI context, the coefficient of determination is computed over signals that have been measured under two different task conditions, and represents the fraction of the total signal variance that is accounted for ("determined by") by the task condition.

### Computation

The coefficient of determination is in fact the squared correlation coefficient for a single bivariate distribution constructed from two sets of univariate data as follows:

• There are $n_1$ values $x^{(1)}_i$ measured under condition 1, and $n_2$ values $x^{(2)}_i$ measured under condition 2.
• From these two data sets, a single, two-dimensional data set is constructed, consisting of points $(x,y)$ by assigning the measured value to $x$, and setting $y=+1$ if the value has been measured under condition 1, and $y=-1$ for condition 2. The actual label values assigned to $y$ do not matter, as long as they are distinct, but choosing +1 and -1 simplifies further computation.
• For any two-dimensional data set of points $(x,y)$, the squared correlation coefficient is:

$r^2=\frac{\textrm{cov}(x,y)^2}{\textrm{var}(x) \textrm{var}(y)}$.

In the special case of the distribution defined above, defining

$s_k:=\sum_i x^{(k)}_i,\ q_k:=\sum_i {x^{(k)}_i}^2$,

we have

$\textrm{cov}(x,y) = \frac{s_1-s_2}{n_1+n_2}-\frac{(s_1+s_2)(n_1-n_2)}{(n_1+n_2)^2}=2\frac{s_1n_2-s_2n_1}{(n_1+n_2)^2}$,

$\textrm{var}(x) = \frac{q_1 +q_2}{n_1+n_2}-\frac{(s_1 + s_2)^2}{(n_1+n_2)^2}$,

$\textrm{var}(y) = 1-\frac{\left(n_1-n_2\right)^2}{(n_1+n_2)^2} = \frac{4n_1n_2}{(n_1+n_2)^2}$,

$r^2 = \frac{1}{n_1n_2} \frac{(s_1n_2-s_2n_1)^2}{(n_1+n_2)(q_1+q_2)-(s_1+s_2)^2} = \frac{{s_1^2}/{n_1}+{s_2^2}/{n_2}-G}{q_1+q_2-G}$

where we have introduced $G:=\frac{(s_1+s_2)^2}{n_1+n_2}$ to arrive at the last expression, which is useful for efficient computation of $r^2$.

### Significance Test

For small numbers of trials (<30 per label), determination coefficients can become rather large even if there is no significant effect. To assess significance under the (robust) assumption of Gaussianity, determination coefficients may be converted into t-values according to

$t^2=(n_1 + n_2 -2) \frac{r^2}{1-r^2}$.

Such a t-value may be used in a one-tailed t-test against the "no correlation" null hypothesis.

## Sensorimotor Rhythm (SMR)

A general term referring to idling activity from the sensory and motor cortices. The mu rhythm is the most prominent SMR activity.