# Trouble with table borders

I want my table to look like the one below:

But this is what is turning out:

Here’s an MWE:

\documentclass{article}

\usepackage{multirow}

\begin{document}

\begin{tabular}{|c|c|c|}
\cline{1-3}
& All Respondents & Prejudiced Respondents\\ \hline
Culturally Foreign &    25.6 & 44.4\\
Culturally Familiar & 20.0 & 19.0\\
Difference & 5.6 & 25.4*\\
(95\% Confidence Interval) & (-1.1 to 12.4) & (6.6 to 44.1)\\
p-value & 0.101  & 0.009\\ \hline
\end{tabular}

\end{document}

-

You're forgetting a | in the argument to \multicolumn and have a useless \multicolumn{1}{c}{}; when a cell is empty, just place nothing in it.

The first column should be left aligned. I also propose a different way to format the table, without any vertical rule (this second way requires booktabs). Also I wouldn't use \doublespace, you just lose in readability.

\documentclass{article}
\usepackage{booktabs}

\begin{document}
\begin{tabular}{|l|c|c|}
\hline
\cline{2-3}
& All Respondents & Prejudiced Respondents\\
\hline
Culturally Foreign  & $25.6$ & $44.4$\\
Culturally Familiar & $20.0$ & $19.0$\\
Difference          &  $5.6$ & $25.4$\makebox[0pt][l]{*}\\
($95$\% Confidence Interval) & ($-1.1$ to $12.4$) & ($6.6$ to $44.1$)\\
$p$-value           & $0.101$  & $0.009$\\
\hline
\end{tabular}

\bigskip

\begin{tabular}{lcc}
\toprule
\cmidrule{2-3}
& All Respondents & Prejudiced Respondents\\
\midrule
Culturally Foreign  & $25.6$ & $44.4$\\
Culturally Familiar & $20.0$ & $19.0$\\
Difference          &  $5.6$ & $25.4$\makebox[0pt][l]{*}\\
($95$\% Confidence Interval) & ($-1.1$ to $12.4$) & ($6.6$ to $44.1$)\\
$p$-value           & $0.101$  & $0.009$\\
\bottomrule
\end{tabular}

\end{document}


Note also how I typed the asterisk, so that it doesn't participate in the alignment. Also, numbers should be typed in math mode, particularly if they are negative.

-
+1 for using booktabs –  alexwlchan Mar 21 '14 at 16:56
@alexwlchan I always use it and never use \multirow. ;-) –  egreg Mar 21 '14 at 16:57
Well well, enjoy...! :) –  Werner Mar 21 '14 at 16:58

When you define the alignment for the uses of \multicolumn (this is the {c}), you need to tell it what vertical borders you want around them (just like when you write {|c|c|c|} at the begin of the table).

So replace the line

\multicolumn{1}{c}{} & \multicolumn{2}{c}{Treatment Received}\\ \cline{2-3}


with

\multicolumn{1}{|c}{} & \multicolumn{2}{c|}{Treatment Received}\\ \cline{2-3}


Notice that {c} has become {|c} and {c|}.

This is what the result looks like:

-