# How to draw a T-frame?

How can I re-produce the following figure using LaTeX? (Drawn in excel, using borders).

-
...the fonts look more like TeX's Computer Modern than what Excel would provide. –  Werner Oct 30 '11 at 18:52

You can either use an array in math mode:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
$\begin{array}{r|l} \text{Independent Variable} & \text{Dependent Variable} \\ \hline x_1 & y_1 \\ x_2 & y_2 \\ \vdots & \vdots \\ x_n & y_n \end{array}$
\end{document}


or you could do something similar using a text mode tabular. amsmath provides \text{<stuff>} that typesets <stuff> in text mode within math mode. If you're interested in centering the \vdots with respect to the other elements in the column, you could use the calc package which provides \widthof{<stuff>}. Here's a brief example:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\usepackage{calc}% http://ctan.org/pkg/calc
\begin{document}
$\begin{array}{r|l} \text{Independent Variable} & \text{Dependent Variable} \\ \hline x_1 & y_1 \\ x_2 & y_2 \\ \makebox[\widthof{x_2}][c]{\vdots} & \makebox[\widthof{y_2}][c]{\vdots} \\ x_n & y_n \end{array}$
\end{document}


The use of \vdots provides a slightly different view to yours. However, if may be accomplished using three identical rows of \cdot & \cdot \\ replacing the \vdots & \vdots \\:

-
IMHO the compact version with vdots is to be preferred. Also to center them a bit $\,\vdots\,\,$, what do you think? –  Yiannis Lazarides Oct 30 '11 at 3:18
@YiannisLazarides: Thanks, I included something to this effect in my revised answer. I agree on the use of \vdots as opposed to three \cdots. –  Werner Oct 30 '11 at 3:27