Further attempts with full information
My fourth attempt:
Customizing arrows style.
There are many ways to costumize the arrow style with tikz
, see the documentation, Chapter 16 (p.186). In this case, by editing the double arrow/.style
in the preamble and/or the options of the last two draw
commands of the code you can display "more elegant" arrows:
custom-based double-headed arrow
:

Code:
% 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
and <->
:

Code:
\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);
double
and Latex-Latex
:

Code:
\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);
My third attempt:
The desired output is yet known:
Here is my approach:

Code:
\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}
First attempts with partial information
I have tried to figure out what it could be your desired output. For this purpose:
To your questions:
I have placed the equation F
between the matrices and commented %\displaystyle
so that it passes between the uppermost two arrows:
\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}
$};
There are two $\xq_{\bullet \bullet}$
(I mean $\bar{x}_{\bullet \bullet}$
). Which one do you mean? The matrix (red arrow) or the equation (orange arrow) one?
Could you please specify or better include an image of your desired output?
My second attempt:
1st improvements:
- Direct referencing the matrix cells with
matname-rownumber-columnnumber
instead of \tikznode
, which is the approach/solution of Andrew (with your permission of course)
- Added
round corners
and the arrows go around the matrices for better readability
Output:

Code:
\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}
My first attempt:
Output:
Code:
\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}