<h4>正準相関分析の計算:2次元と1次元の変数群間の関係</h4><div class='key-point'><div class='key-point-title'>正準相関分析の基本原理</div><p>正準相関分析は、2つの変数群間の関係を最大化する線形結合を求める手法です。片方の変数群が1次元の場合、問題は回帰分析に類似しますが、両方向の線形結合を考慮する点で異なります。</p></div><h4>正準相関係数の計算手順</h4><p class='step'><strong>Step 1: 正準相関分析の数学的定式化</strong></p><p>変数群$\mathbf{X}$(2次元)と$\mathbf{Y}$(1次元)の正準相関は以下の一般化固有値問題として定式化されます:</p><div class='formula'>$\mathbf{\Sigma}_{XX}^{-1} \mathbf{\Sigma}_{XY} \mathbf{\Sigma}_{YY}^{-1} \mathbf{\Sigma}_{YX} \mathbf{a} = \rho^2 \mathbf{a}
lt;/div><p>ここで、$\rho^2$が固有値、$\rho$が正準相関係数です。</p><p class='step'><strong>Step 2: 与えられた分散共分散行列の確認</strong></p><ul><li><strong>$\mathbf{X}$群内分散共分散行列</strong>:$\mathbf{\Sigma}_{XX} = \begin{pmatrix} 4 & 2 \\ 2 & 4 \end{pmatrix}
lt;/li><li><strong>$\mathbf{Y}$群内分散共分散行列</strong>:$\mathbf{\Sigma}_{YY} = (9)$(スカラー)</li><li><strong>群間共分散行列</strong>:$\mathbf{\Sigma}_{XY} = \begin{pmatrix} 2 \\ 3 \end{pmatrix}
lt;/li><li><strong>転置行列</strong>:$\mathbf{\Sigma}_{YX} = \mathbf{\Sigma}_{XY}^T = \begin{pmatrix} 2 & 3 \end{pmatrix}
lt;/li></ul><p class='step'><strong>Step 3: 各分散共分散行列の逆行列計算</strong></p><p><strong>$\mathbf{\Sigma}_{XX}^{-1}$の計算:</strong></p><div class='formula'>$\det(\mathbf{\Sigma}_{XX}) = 4 \times 4 - 2 \times 2 = 16 - 4 = 12
lt;/div><div class='formula'>$\mathbf{\Sigma}_{XX}^{-1} = \frac{1}{12} \begin{pmatrix} 4 & -2 \\ -2 & 4 \end{pmatrix} = \begin{pmatrix} 1/3 & -1/6 \\ -1/6 & 1/3 \end{pmatrix}
lt;/div><p><strong>$\mathbf{\Sigma}_{YY}^{-1}$の計算:</strong></p><div class='formula'>$\mathbf{\Sigma}_{YY}^{-1} = 1/9
lt;/div><p class='step'><strong>Step 4: 合成行列の計算</strong></p><p>$\mathbf{A} = \mathbf{\Sigma}_{XX}^{-1} \mathbf{\Sigma}_{XY} \mathbf{\Sigma}_{YY}^{-1} \mathbf{\Sigma}_{YX}$を計算:</p><p><strong>中間計算1:$\mathbf{\Sigma}_{XY} \mathbf{\Sigma}_{YY}^{-1} \mathbf{\Sigma}_{YX}
lt;/strong></p><div class='formula'>$\begin{pmatrix} 2 \\ 3 \end{pmatrix} \times \frac{1}{9} \times \begin{pmatrix} 2 & 3 \end{pmatrix} = \frac{1}{9} \begin{pmatrix} 4 & 6 \\ 6 & 9 \end{pmatrix}
lt;/div><p><strong>最終計算:$\mathbf{A} = \mathbf{\Sigma}_{XX}^{-1} \times$上記結果</strong></p><div class='formula'>$\mathbf{A} = \begin{pmatrix} 1/3 & -1/6 \\ -1/6 & 1/3 \end{pmatrix} \times \frac{1}{9} \begin{pmatrix} 4 & 6 \\ 6 & 9 \end{pmatrix}
lt;/div><div class='formula'>$= \frac{1}{9} \begin{pmatrix} 4/3 - 1 & 2 - 3/2 \\ -2/3 + 2 & -1 + 3 \end{pmatrix} = \frac{1}{9} \begin{pmatrix} 1/3 & 1/2 \\ 4/3 & 2 \end{pmatrix}
lt;/div><div class='formula'>$= \begin{pmatrix} 1/27 & 1/18 \\ 4/27 & 2/9 \end{pmatrix}
lt;/div><p class='step'><strong>Step 5: 固有値問題の解</strong></p><p>$\mathbf{A}$の固有値を求めるため、特性方程式を立てます:</p><div class='formula'>$\det(\mathbf{A} - \lambda \mathbf{I}) = \det\begin{pmatrix} 1/27 - \lambda & 1/18 \\ 4/27 & 2/9 - \lambda \end{pmatrix} = 0
lt;/div><div class='formula'>$(1/27 - \lambda)(2/9 - \lambda) - (1/18)(4/27) = 0
lt;/div><div class='formula'>$(1/27)(2/9) - \lambda(1/27 + 2/9) + \lambda^2 - 4/486 = 0
lt;/div><div class='formula'>$2/243 - \lambda(1/27 + 6/27) + \lambda^2 - 2/243 = 0
lt;/div><div class='formula'>$\lambda^2 - \frac{7}{27}\lambda = 0
lt;/div><div class='formula'>$\lambda(\lambda - \frac{7}{27}) = 0
lt;/div><p>したがって:</p><ul><li><strong>第1固有値</strong>:$\lambda_1 = \frac{7}{27} \approx 0.259
lt;/li><li><strong>第2固有値</strong>:$\lambda_2 = 0
lt;/li></ul><p class='step'><strong>Step 6: 正準相関係数の算出</strong></p><p>正準相関係数は固有値の平方根:</p><div class='formula'>$\rho_1 = \sqrt{\lambda_1} = \sqrt{\frac{7}{27}} = \frac{\sqrt{7}}{\sqrt{27}} = \frac{\sqrt{7}}{3\sqrt{3}} = \frac{\sqrt{21}}{9} \approx 0.51
lt;/div><div class='key-point'><h4>結果の解釈</h4><table class='table table-bordered'><tr><th>項目</th><th>値</th><th>解釈</th></tr><tr><td><strong>第1正準相関</strong></td><td>$\rho_1 = 0.51
lt;/td><td>中程度の正の相関関係</td></tr><tr><td><strong>決定係数</strong></td><td>$\rho_1^2 = 0.29
lt;/td><td>分散の29%を説明</td></tr><tr><td><strong>第2正準相関</strong></td><td>$\rho_2 = 0
lt;/td><td>追加の関係なし</td></tr></table></div><p class='step'><strong>Step 7: 正準ベクトルの意味</strong></p><p>第1正準ベクトル$\mathbf{a}_1$は、$\mathbf{X}$群の最適な線形結合の係数を表します。この線形結合$U_1 = \mathbf{a}_1^T \mathbf{X}$と$Y$の間の相関が最大(0.51)になります。</p><div class='key-point'><h4>1次元変数群の特徴</h4><ul><li><strong>自由度の制限</strong>:$\mathbf{Y}$が1次元のため、正準相関は1つだけ</li><li><strong>回帰との関係</strong>:$\mathbf{X}$から$Y$への重回帰の決定係数に関連</li><li><strong>解釈の容易さ</strong>:$Y$が単一変数なので結果が理解しやすい</li></ul></div>