<h4>正準相関分析の計算:変数群間の最大相関</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>変数群間の正準相関は以下の一般化固有値問題の解として得られます:</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} 2 & 1 \\ 1 & 2 \end{pmatrix}
lt;/li><li><strong>$\mathbf{Y}$群内分散共分散行列</strong>:$\mathbf{\Sigma}_{YY} = \begin{pmatrix} 3 & 0 \\ 0 & 3 \end{pmatrix}
lt;/li><li><strong>群間共分散行列</strong>:$\mathbf{\Sigma}_{XY} = \begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix}
lt;/li><li><strong>転置行列</strong>:$\mathbf{\Sigma}_{YX} = \mathbf{\Sigma}_{XY}^T = \begin{pmatrix} 1 & 2 \\ 2 & 1 \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}) = 2 \times 2 - 1 \times 1 = 3
lt;/div><div class='formula'>$\mathbf{\Sigma}_{XX}^{-1} = \frac{1}{3} \begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}
lt;/div><p><strong>$\mathbf{\Sigma}_{YY}^{-1}$の計算:</strong></p><div class='formula'>$\mathbf{\Sigma}_{YY}^{-1} = \begin{pmatrix} 1/3 & 0 \\ 0 & 1/3 \end{pmatrix}
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}
lt;/strong></p><div class='formula'>$\begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix} \begin{pmatrix} 1/3 & 0 \\ 0 & 1/3 \end{pmatrix} = \begin{pmatrix} 1/3 & 2/3 \\ 2/3 & 1/3 \end{pmatrix}
lt;/div><p><strong>中間計算2:上記結果と$\mathbf{\Sigma}_{YX}$の積</strong></p><div class='formula'>$\begin{pmatrix} 1/3 & 2/3 \\ 2/3 & 1/3 \end{pmatrix} \begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix} = \begin{pmatrix} 5/3 & 4/3 \\ 4/3 & 5/3 \end{pmatrix}
lt;/div><p><strong>最終計算:$\mathbf{A} = \mathbf{\Sigma}_{XX}^{-1} \times$上記結果</strong></p><div class='formula'>$\mathbf{A} = \frac{1}{3} \begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix} \begin{pmatrix} 5/3 & 4/3 \\ 4/3 & 5/3 \end{pmatrix} = \frac{1}{9} \begin{pmatrix} 6 & 3 \\ 3 & 6 \end{pmatrix} = \begin{pmatrix} 2/3 & 1/3 \\ 1/3 & 2/3 \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} 2/3 - \lambda & 1/3 \\ 1/3 & 2/3 - \lambda \end{pmatrix} = 0
lt;/div><div class='formula'>$(2/3 - \lambda)^2 - (1/3)^2 = 0
lt;/div><div class='formula'>$(2/3 - \lambda)^2 = 1/9
lt;/div><div class='formula'>$2/3 - \lambda = \pm 1/3
lt;/div><p>したがって:</p><ul><li><strong>第1固有値</strong>:$\lambda_1 = 2/3 + 1/3 = 1
lt;/li><li><strong>第2固有値</strong>:$\lambda_2 = 2/3 - 1/3 = 1/3
lt;/li></ul><p class='step'><strong>Step 6: 正準相関係数の算出</strong></p><p>正準相関係数は固有値の平方根:</p><div class='formula'>$\rho_1 = \sqrt{\lambda_1} = \sqrt{1} = 1.0
lt;/div><div class='formula'>$\rho_2 = \sqrt{\lambda_2} = \sqrt{1/3} \approx 0.577
lt;/div>