概念の直交性

ソフトウェアエンジニアをしていると概念に対する直交性の概念にでくわすことが割とよくある。 ミニマルな例だと、1つのクラスに2つのboolフィールドがあって、それらに関係がない(= 状態が4通りある)ときに、 これらのフラグは直交するという(自分もそういうコメントを書く)。

自分の感想です

とはいえなんかやっぱり気になるので、どこから出てきたのかちょっと調べた。

Weblioで引く

orthogonalの意味・使い方・読み方 | Weblio英和辞書

1〔数学〕直交の《a直角の, 垂直の b内積の定義された関数空間に属する2つの関数で , 互いの内積が0となる》

2〔結晶〕直交の《結晶軸が直角で交わる》

3〔統計〕直交の a〈変数が〉統計的に独立した b(実験計画法において)〈配置が〉直交している

なるほど統計!ということでWikipediaを見る

Orthogonality - Wikipedia

When performing statistical analysis, independent variables that affect a particular dependent variable are said to be orthogonal if they are uncorrelated, since the covariance forms an inner product. In this case the same results are obtained for the effect of any of the independent variables upon the dependent variable, regardless of whether one models the effects of the variables individually with simple regression or simultaneously with multiple regression. If correlation is present, the factors are not orthogonal and different results are obtained by the two methods. This usage arises from the fact that if centered by subtracting the expected value (the mean), uncorrelated variables are orthogonal in the geometric sense discussed above, both as observed data (i.e., vectors) and as random variables (i.e., density functions).

統計では相関がない変数に対して直交してると呼ぶらしい。 XとYの相関がないというのは、E[(X-E[X])(Y-E[Y])] = 0ということで、つまり偏差が直交してるということでした。なるほど~。

まとめ

統計用語だった。独立なら偏差が直交するのはその通りなので、別に「直交する」でもそんなに違和感はない。 (E(XY)=0とConv[X,Y]=0で混乱しそうなので、数学をする上ではあんまりいい用語だとは思わないですが・・・)