提供完整信息进行进一步尝试

提供完整信息进行进一步尝试

亲爱的 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);
    
    • doubleLatex-Latex

      在此处输入图片描述

    代码:

    \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);
    

我的第三次尝试:

期望的输出尚不清楚:

以下是我的方法:

在此处输入图片描述

代码:

\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} 

使用部分信息的首次尝试

我试图弄清楚你想要的输出是什么。为此目的:

对于您的问题:

  1. 我把方程放在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}
        $};
    
  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}

相关内容