![提供完整信息进行进一步尝试](https://linux22.com/image/397444/%E6%8F%90%E4%BE%9B%E5%AE%8C%E6%95%B4%E4%BF%A1%E6%81%AF%E8%BF%9B%E8%A1%8C%E8%BF%9B%E4%B8%80%E6%AD%A5%E5%B0%9D%E8%AF%95.png)
亲爱的 TeX 社区成员们,大家好!
我希望您能对我使用 TIKZ 包绘制的一些矩阵(当然是在社区的帮助下)提供一些帮助。
我认为我需要发布几乎整个代码,以便您能够正确了解问题,对此深感抱歉。
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,matrix}
\newcommand{\mb}[1]{{\bullet #1}} % mean with bullet; dbl brackets to maintain subscript
\newcommand{\xq}{\bar{x}}
\begin{document}
\begin{tikzpicture}
\matrix [matrix of math nodes,left delimiter=(, right delimiter=)] (mat1) {
x_{11} & x_{22} & \ldots & x_{1j} & \ldots & x_{1k} \\
x_{22} & x_{22} & \ldots & x_{2j} & \ldots & x_{2k} \\
\vdots & \vdots & & \vdots & & \vdots \\
x_{i1} & x_{i2} & \ldots & x_{ij} & \ldots & x_{ik} \\
\vdots & \vdots & & \vdots & & \vdots \\
x_{n1} & x_{n2} & \ldots & x_{nj} & \ldots & x_{nk} \\
};
\matrix[matrix of math nodes, left delimiter=(, right delimiter= ), below=7em of
mat1, xshift=-8em] (mat2) {
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\vdots & \vdots & & \vdots & & \vdots \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\vdots & \vdots & & \vdots & & \vdots \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
};
\node[anchor=west] at (mat2.south east){$\overline{x}_{\bullet \bullet} $};
\matrix[matrix of math nodes, right=4em of mat2, left delimiter=(, right delimiter=)] (mat3) {
r_{11} & r_{12} & \ldots & r_{1j} & \ldots & r_{1k} \\
r_{21} & r_{22} & \ldots & r_{2j} & \ldots & r_{2k} \\
\vdots & \vdots & & \vdots & & \vdots \\
r_{i1} & r_{i2} & \ldots & r_{ij} & \ldots & r_{ik} \\
\vdots & \vdots & & \vdots & & \vdots \\
r_{n1} & r_{n2} & \ldots & r_{nj} & \ldots & r_{nk} \\
};
\foreach \X/\Y in {2/{\mathrm{IN}},3/{\mathrm{ZW}}}
{\draw[-latex] (mat1) -- (mat\X);
\draw[-latex] (mat\X.south) -- ++ (0,-4em) node[below] (G\X)
{$\widehat{\sigma}^2_{\Y}$};}
\path (mat2) -- (mat3) node[midway]{$+$} (G2) -- (G3) node[midway,below=3.5em]
(F)
{$ \displaystyle
F = \frac{\hat{\sigma}^2_{\mathrm{ZW}}}
{\hat{\sigma}^2_{\mathrm{IN}}}
= \frac{\frac{1}{k-1} \sum_{j=1}^{k} \sum_{i=1}^{n} (\xq_\mb{j} - \xq_{\bullet
\bullet})^2}
{\frac{1}{N-k} \sum_{j=1}^{k} \sum_{i=1}^{n} ( x_{ij} - \xq_{\bullet
j} )^2}
$};
\foreach \X/\Y in {2,3}
{\draw[-latex] (G\X) -- (F);}
\end{tikzpicture}
\end{document}
我的问题是
1.) 是否可以以中心位置插入此方程介于最上面的两个箭头?
和
2.)画一个红色的“双箭头”来自$\bar{x}_{\bullet 1}$ to $\bar{x}_{\bullet \bullet}$
并且一个来自$r_{11}$ to \bar{x}_{\bullet 1}
?
非常感谢你们!
答案1
提供完整信息进行进一步尝试
我的第四次尝试:
自定义箭头样式。
有很多方法可以定制箭头样式tikz
,请参阅文档,第 16 章(第 186 页)。在这种情况下,通过编辑序言中的和/或代码double arrow/.style
最后两个命令的选项,您可以显示“更优雅”的箭头:draw
基于定制
double-headed arrow
:代码:
% From https://tex.stackexchange.com/a/72793/89320, customize for double-headed arrows \tikzset{ double arrow/.style args={#1 colored by #2 and #3}{ stealth-stealth,line width=#1,#2, % first arrow postaction={draw,stealth-stealth,#3,line width=(#1)/3, shorten <=2*(#1)/3,shorten >=2*(#1)/3}, % second arrow } }
\draw[double arrow=2pt colored by red and white!80!, opacity=0.75,] (mat2-1-1.north) to [in=80,out=30] (xpp.north); \draw[double arrow=2pt colored by red and white!80!, opacity=0.75,] ([yshift=2pt]mat3-1-1.north) to [in=20,out=160] (mat2-1-1.north);
double
和<->
:代码:
\draw[red, double,<->] (mat2-1-1.north) to [in=80,out=30] (xpp.north); \draw[red, double,<->] ([yshift=2pt]mat3-1-1.north) to [in=20,out=160] (mat2-1-1.north);
代码:
\draw[red, {Latex[length=2mm, width=2mm]}-{Latex[length=2mm, width=2mm]} ,double, double distance=.5pt] (mat2-1-1.north) to [in=80,out=30] (xpp.north); \draw[red, {Latex[length=2mm, width=2mm]}-{Latex[length=2mm, width=2mm]} ,double, double distance=.5pt] ([yshift=2pt]mat3-1-1.north) to [in=20,out=160] (mat2-1-1.north);
我的第三次尝试:
期望的输出尚不清楚:
- 不需要
tikznode
,细胞矩阵参考解决方案给出安德鲁以及来自车牌 double arrow/.style
取自使用 TikZ 的两种颜色的箭头
以下是我的方法:
代码:
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,matrix}
\usetikzlibrary{arrows, arrows.meta, calc,fadings}
\newcommand{\mb}[1]{{\bullet #1}} % mean with bullet; dbl brackets to maintain subscript
\newcommand{\xq}{\bar{x}}
% From https://tex.stackexchange.com/a/72793/89320
\tikzset{
double arrow/.style args={#1 colored by #2 and #3}{
-stealth,line width=#1,#2, % first arrow
postaction={draw,-stealth,#3,line width=(#1)/3,
shorten <=(#1)/3,shorten >=2*(#1)/3}, % second arrow
}
}
%---------------------------------------------------
\begin{document}
\begin{tikzpicture}
\matrix [anchor=center,matrix of math nodes,left delimiter=(, right delimiter=)] (mat1) {
x_{11} & x_{22} & \ldots & x_{1j} & \ldots & x_{1k} \\
x_{22} & x_{22} & \ldots & x_{2j} & \ldots & x_{2k} \\
\vdots & \vdots & & \vdots & & \vdots \\
x_{i1} & x_{i2} & \ldots & x_{ij} & \ldots & x_{ik} \\
\vdots & \vdots & & \vdots & & \vdots \\
x_{n1} & x_{n2} & \ldots & x_{nj} & \ldots & x_{nk} \\
};
\matrix[anchor=center,matrix of math nodes, left delimiter=(, right delimiter= ), below=7em of mat1, xshift=-8em] (mat2) {
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\vdots & \vdots & & \vdots & & \vdots \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\vdots & \vdots & & \vdots & & \vdots \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
};
\node[anchor=west] (xpp) at (mat2.south east){$\overline{x}_{\bullet \bullet} $};
\matrix[anchor=center,matrix of math nodes, right=4em of mat2, left delimiter=(, right delimiter=)] (mat3) {
r_{11} & r_{12} & \ldots & r_{1j} & \ldots & r_{1k} \\
r_{21} & r_{22} & \ldots & r_{2j} & \ldots & r_{2k} \\
\vdots & \vdots & & \vdots & & \vdots \\
r_{i1} & r_{i2} & \ldots & r_{ij} & \ldots & r_{ik} \\
\vdots & \vdots & & \vdots & & \vdots \\
r_{n1} & r_{n2} & \ldots & r_{nj} & \ldots & r_{nk} \\
};
\coordinate (aux) at ($ (mat1) !.5! (mat2) $);
\node[anchor=center,](xij) at (mat1 |- aux) {$ \displaystyle
x_{ij}=\xq_\mb{j}+r_{ij}$};
\node[anchor=center, below =-2pt of xij] (rij) {$ \displaystyle
r_{ij}=\xq_\mb{j}-x_{ij}$};
%
\foreach \X/\Y in {2/{\mathrm{IN}},3/{\mathrm{ZW}}}
{\draw[-latex] (mat1) -- (mat\X);
\draw[-latex] (mat\X.south) -- ++ (0,-4em) node[below] (G\X) {$\widehat{\sigma}^2_{\Y}$};}
\path (mat2) -- (mat3) node[midway]{$+$} (G2) -- (G3) node[midway,below=3.5em] (F)
{$ \displaystyle
F = \frac{\hat{\sigma}^2_{\mathrm{ZW}}}
{\hat{\sigma}^2_{\mathrm{IN}}}
= \frac{\frac{1}{k-1} \sum_{j=1}^{k} \sum_{i=1}^{n} (\xq_\mb{j} - \xq_{\bullet\bullet})^2}
{\frac{1}{N-k} \sum_{j=1}^{k} \sum_{i=1}^{n} (x_{ij}-\xq_{\bullet j})^2}
$};
\foreach \X/\Y in {2,3} {\draw[-latex] (G\X) -- (F);}
\draw[double arrow=10pt colored by blue!50!white and red!50!white,opacity=0.75] (mat2-1-1.north) to[in=80,out=30] (xpp.north);
\draw[double arrow=10pt colored by blue!50!white and red!50!white,opacity=0.75] ([yshift=2pt]mat3-1-1.north) to[in=20,out=160] (mat2-1-1.north);
\end{tikzpicture}
\end{document}
使用部分信息的首次尝试
我试图弄清楚你想要的输出是什么。为此目的:
\tikznode[..options..]{..label..}{..contents..}
我在序言中定义了命令,它是解决方案经过格诺特到如何在方程式和矩阵中添加箭头?用箭头标记要连接的内容。主要原因是tikzmark
就我而言,该库不起作用:\newcommand\tikznode[3][]% {\tikz[remember picture,baseline=(#2.base)] \node[minimum size=0pt,inner sep=0pt,#1](#2){#3};% }
我还添加了以下 tikzlibraries
arrows, arrows.meta, calc
。
对于您的问题:
我把方程放在
F
矩阵之间,并进行注释,%\displaystyle
以便它穿过最上方的两个箭头之间:\coordinate (aux) at ($ (mat1) !.5! (mat2) $); \node[anchor=center,](F) at (mat1 |- aux) {$ %\displaystyle F = \frac{\hat{\sigma}^2_{\mathrm{ZW}}} {\hat{\sigma}^2_{\mathrm{IN}}} = \frac{\frac{1}{k-1} \sum_{j=1}^{k} \sum_{i=1}^{n} (\xq_\mb{j} - \tikznode{xpp2}{$\xq_{\bullet\bullet}$})^2} {\frac{1}{N-k} \sum_{j=1}^{k} \sum_{i=1}^{n} (x_{ij}-\xq_{\bullet j})^2} $};
有两个
$\xq_{\bullet \bullet}$
(我的意思是$\bar{x}_{\bullet \bullet}$
)。你指的是哪一个?矩阵(红色箭头)还是方程(橙色箭头)?
您能否指定或更好地包含您想要的输出的图像?
我的第二次尝试:
第 1 个改进:
- 直接引用矩阵单元
matname-rownumber-columnnumber
而不是\tikznode
,这是方法/解决方案安德鲁(当然要经过您的允许) - 为了提高可读性,添加了
round corners
围绕矩阵的箭头
输出:
代码:
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,matrix}
\usetikzlibrary{arrows, arrows.meta, calc, tikzmark}
\newcommand{\mb}[1]{{\bullet #1}} % mean with bullet; dbl brackets to maintain subscript
\newcommand{\xq}{\bar{x}}
%Tikznode -> https://tex.stackexchange.com/a/361392/89320
\newcommand\tikznode[3][]%
{\tikz[remember picture,baseline=(#2.base)]
\node[minimum size=0pt,inner sep=0pt,#1](#2){#3};%
}
%-----
\begin{document}
\begin{tikzpicture}[remember picture]
\matrix [anchor=center,matrix of math nodes,left delimiter=(, right delimiter=)] (mat1) {
x_{11} & x_{22} & \ldots & x_{1j} & \ldots & x_{1k} \\
x_{22} & x_{22} & \ldots & x_{2j} & \ldots & x_{2k} \\
\vdots & \vdots & & \vdots & & \vdots \\
x_{i1} & x_{i2} & \ldots & x_{ij} & \ldots & x_{ik} \\
\vdots & \vdots & & \vdots & & \vdots \\
x_{n1} & x_{n2} & \ldots & x_{nj} & \ldots & x_{nk} \\
};
\matrix[anchor=center,matrix of math nodes, left delimiter=(, right delimiter= ), below=7em of mat1, xshift=-8em] (mat2) {
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\vdots & \vdots & & \vdots & & \vdots \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\vdots & \vdots & & \vdots & & \vdots \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
};
\node[anchor=west] (xpp) at (mat2.south east){$\overline{x}_{\bullet \bullet} $};
\matrix[anchor=center,matrix of math nodes, right=4em of mat2, left delimiter=(, right delimiter=)] (mat3) {
r_{11} & r_{12} & \ldots & r_{1j} & \ldots & r_{1k} \\
r_{21} & r_{22} & \ldots & r_{2j} & \ldots & r_{2k} \\
\vdots & \vdots & & \vdots & & \vdots \\
r_{i1} & r_{i2} & \ldots & r_{ij} & \ldots & r_{ik} \\
\vdots & \vdots & & \vdots & & \vdots \\
r_{n1} & r_{n2} & \ldots & r_{nj} & \ldots & r_{nk} \\
};
\coordinate (aux) at ($ (mat1) !.5! (mat2) $);
\node[anchor=center,](F) at (mat1 |- aux) {$ %\displaystyle
F = \frac{\hat{\sigma}^2_{\mathrm{ZW}}}
{\hat{\sigma}^2_{\mathrm{IN}}}
= \frac{\frac{1}{k-1} \sum_{j=1}^{k} \sum_{i=1}^{n} (\xq_\mb{j} - \tikznode{xpp2}{$\xq_{\bullet\bullet}$})^2}
{\frac{1}{N-k} \sum_{j=1}^{k} \sum_{i=1}^{n} (x_{ij}-\xq_{\bullet j})^2}
$};
%
\foreach \X/\Y in {2/{\mathrm{IN}},3/{\mathrm{ZW}}}
{\draw[-latex] (mat1.south) -- ++(0,-1.5em) -| ([yshift=0.1em]mat\X.north);
\draw[-latex] (mat\X.south) -- ++ (0,-4em) node[below] (G\X) {$\widehat{\sigma}^2_{\Y}$};}
\path (mat2) -- (mat3) node[midway]{$+$} (G2) -- (G3) node[midway,below=3.5em] {}; %(F)
\draw[latex'-latex',red,rounded corners=2mm] (mat2-1-1.north) -- +(0,0.4) -|(xpp.north);
\draw[latex'-latex',red,rounded corners=2mm] (mat2-1-1.north) -- +(0,0.4) -|(mat3-1-1.north);
\draw[latex'-latex',orange,rounded corners=2mm] (mat2-1-1.north)-- +(0,2.25) -| (xpp2.north);
\end{tikzpicture}
\end{document}
我的第一次尝试:
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,matrix}
\usetikzlibrary{arrows, arrows.meta, calc}
\newcommand{\mb}[1]{{\bullet #1}} % mean with bullet; dbl brackets to maintain subscript
\newcommand{\xq}{\bar{x}}
%Tikznode -> https://tex.stackexchange.com/a/361392/89320
\newcommand\tikznode[3][]%
{\tikz[remember picture,baseline=(#2.base)]
\node[minimum size=0pt,inner sep=0pt,#1](#2){#3};%
}
%-----
\begin{document}
\begin{tikzpicture}
\matrix [anchor=center,matrix of math nodes,left delimiter=(, right delimiter=)] (mat1) {
x_{11} & x_{22} & \ldots & x_{1j} & \ldots & x_{1k} \\
x_{22} & x_{22} & \ldots & x_{2j} & \ldots & x_{2k} \\
\vdots & \vdots & & \vdots & & \vdots \\
x_{i1} & x_{i2} & \ldots & x_{ij} & \ldots & x_{ik} \\
\vdots & \vdots & & \vdots & & \vdots \\
x_{n1} & x_{n2} & \ldots & x_{nj} & \ldots & x_{nk} \\
};
\matrix[anchor=center,matrix of math nodes, left delimiter=(, right delimiter= ), below=7em of mat1, xshift=-8em] (mat2) {
\tikznode{xp1}{$\xq_\mb{1}$} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\vdots & \vdots & & \vdots & & \vdots \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\vdots & \vdots & & \vdots & & \vdots \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
};
\node[anchor=west] at (mat2.south east){\tikznode{xpp}{$\overline{x}_{\bullet \bullet} $}};
\matrix[anchor=center,matrix of math nodes, right=4em of mat2, left delimiter=(, right delimiter=)] (mat3) {
\tikznode{r11}{$r_{11}$} & r_{12} & \ldots & r_{1j} & \ldots & r_{1k} \\
r_{21} & r_{22} & \ldots & r_{2j} & \ldots & r_{2k} \\
\vdots & \vdots & & \vdots & & \vdots \\
r_{i1} & r_{i2} & \ldots & r_{ij} & \ldots & r_{ik} \\
\vdots & \vdots & & \vdots & & \vdots \\
r_{n1} & r_{n2} & \ldots & r_{nj} & \ldots & r_{nk} \\
};
\coordinate (aux) at ($ (mat1) !.5! (mat2) $);
\node[anchor=center,](F) at (mat1 |- aux) {$ %\displaystyle
F = \frac{\hat{\sigma}^2_{\mathrm{ZW}}}
{\hat{\sigma}^2_{\mathrm{IN}}}
= \frac{\frac{1}{k-1} \sum_{j=1}^{k} \sum_{i=1}^{n} (\xq_\mb{j} - \tikznode{xpp2}{$\xq_{\bullet\bullet})^2$}}
{\frac{1}{N-k} \sum_{j=1}^{k} \sum_{i=1}^{n} (x_{ij}-\xq_{\bullet j})^2}
$};
\foreach \X/\Y in {2/{\mathrm{IN}},3/{\mathrm{ZW}}}
{\draw[-latex] (mat1.south) -- ++(0,-1.5em) -| ([yshift=0.4em]mat\X.north);
\draw[-latex] (mat\X.south) -- ++ (0,-4em) node[below] (G\X) {$\widehat{\sigma}^2_{\Y}$};}
\path (mat2) -- (mat3) node[midway]{$+$} (G2) -- (G3) node[midway,below=3.5em] {}; %(F)
\end{tikzpicture}
\begin{tikzpicture}[remember picture,overlay]
\draw[latex'-latex',red] (xp1)--(xpp);
\draw[latex'-latex',red] (xp1.north) |- +(0,0.4) -|(r11.north);
\draw[latex'-latex',orange] (xp1)--(xpp2);
\end{tikzpicture}
\end{document}
答案2
我不确定您在 (1) 中“插入方程”是什么意思,但您可以使用矩阵的节点坐标绘制箭头。例如,条目\bar{x}_{\bullet 1}
是节点(mat2-1-1)
,r_{11}
条目是(mat3-1-1)
。下面我已命名\bar{x}_{\bullet \bullet}
条目,因此您可以使用从到BB
绘制一条双红线r_{11}
\bar{x}_{\bullet \bullet}
\draw[red, double,->](mat2-1-1)--(BB);
我不确定这是否真的是你想要的,因为箭头将穿过其他矩阵条目。相反,如果你使用
\draw[red, double,->](mat3-1-1) to[out=150,in=30] (mat2-1-1);
箭头将绕着矩阵旋转。下面的代码给出了红色和蓝色箭头,为您提供不同的选择:
如果你能更详细地解释你想要 (1) 做什么,我也会尝试回答。以下是代码:
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,matrix}
\newcommand{\mb}[1]{{\bullet #1}} % mean with bullet; dbl brackets to maintain subscript
\newcommand{\xq}{\bar{x}}
\begin{document}
\begin{tikzpicture}
\matrix[matrix of math nodes,left delimiter=(, right delimiter=)] (mat1) {
x_{11} & x_{22} & \ldots & x_{1j} & \ldots & x_{1k} \\
x_{22} & x_{22} & \ldots & x_{2j} & \ldots & x_{2k} \\
\vdots & \vdots & & \vdots & & \vdots \\
x_{i1} & x_{i2} & \ldots & x_{ij} & \ldots & x_{ik} \\
\vdots & \vdots & & \vdots & & \vdots \\
x_{n1} & x_{n2} & \ldots & x_{nj} & \ldots & x_{nk} \\
};
\matrix[matrix of math nodes, left delimiter=(, right delimiter= ),
below=7em of mat1, xshift=-8em] (mat2) {
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\vdots & \vdots & & \vdots & & \vdots \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
\vdots & \vdots & & \vdots & & \vdots \\
\xq_\mb{1} & \xq_\mb{2} & \ldots & \xq_\mb{2} & \ldots & \xq_\mb{j} \\
};
\node[anchor=west] (BB) at (mat2.south east){$\overline{x}_{\bullet \bullet} $};
\matrix[matrix of math nodes, right=4em of mat2, left delimiter=(, right delimiter=)] (mat3) {
r_{11} & r_{12} & \ldots & r_{1j} & \ldots & r_{1k} \\
r_{21} & r_{22} & \ldots & r_{2j} & \ldots & r_{2k} \\
\vdots & \vdots & & \vdots & & \vdots \\
r_{i1} & r_{i2} & \ldots & r_{ij} & \ldots & r_{ik} \\
\vdots & \vdots & & \vdots & & \vdots \\
r_{n1} & r_{n2} & \ldots & r_{nj} & \ldots & r_{nk} \\
};
\foreach \X/\Y in {2/{\mathrm{IN}},3/{\mathrm{ZW}}} {
\draw[-latex] (mat1) -- (mat\X);
\draw[-latex] (mat\X.south) -- ++ (0,-4em) node[below] (G\X)
{$\widehat{\sigma}^2_{\Y}$};
}
\path (mat2) -- (mat3) node[midway]{$+$} (G2) -- (G3) node[midway,below=3.5em] (F)
{$ \displaystyle
F = \frac{\hat{\sigma}^2_{\mathrm{ZW}}}
{\hat{\sigma}^2_{\mathrm{IN}}}
= \frac{\frac{1}{k-1} \sum_{j=1}^{k} \sum_{i=1}^{n} (\xq_\mb{j} - \xq_{\bullet\bullet})^2}
{\frac{1}{N-k} \sum_{j=1}^{k} \sum_{i=1}^{n} ( x_{ij} - \xq_{\bullet j})^2}
$};
\foreach \X/\Y in {2,3}
{\draw[-latex] (G\X) -- (F);}
\draw[red, double,->](mat2-1-1)--(BB);
\draw[red, double,->](mat3-1-1)--(mat2-1-1);
\draw[blue, double,->](mat2-1-1) to[out=210, in=150] (mat2-6-1.south west) to[out=330, in=190] (BB);
\draw[blue, double,->](mat3-1-1) to[out=150,in=30] (mat2-1-1);
\end{tikzpicture}
\end{document}