2

I made two payoff tables like below: Here is the code I am using:

\begin{frame}
\begin{center}
\textbf{Payoffs:}
\end{center}
\vspace{-2em}
\begin{tabular}{cc}
\hspace{-2em}
\begin{minipage}{.5\linewidth}
\setlength{\extrarowheight}{5pt}
\begin{tabular}{cc|c|c|}
& \multicolumn{1}{c}{} & \multicolumn{2}{c}{$s=0$}\\
& \multicolumn{1}{c}{} & \multicolumn{1}{c}{$a=0$}  & \multicolumn{1}{c}{$a=1$} \\\cline{3-4}
\multirow{2}*{}  & $r=0$ & $B$ & $B-c$ \\\cline{3-4}
& $r=1$ & $B$ & $B-c-k$ \\\cline{3-4}
\end{tabular}
\end{minipage}
\begin{minipage}{.5\linewidth}
\setlength{\extrarowheight}{5pt}
\begin{tabular}{cc|c|c|}
  & \multicolumn{1}{c}{} & \multicolumn{2}{c}{$ s=1 $}\\
  & \multicolumn{1}{c}{} & \multicolumn{1}{c}{$a=0$}  & \multicolumn{1}{c}{$a=1$} \\\cline{3-4}
  \multirow{2}*{}  & $r=0$ & $-B$ & $B-c$ \\\cline{3-4}
  & $r=1$ & $-B$ & $B-c-k$ \\\cline{3-4}
\end{tabular}
\end{minipage}
\end{tabular} 

I would like to add "(1-p)" and "p" to the right-most column of the table on the right like below:

enter image description here

I tried to add it but could not figure out how to do so. Can anyone please help me with this? Any help is appreciated.

1

Some suggestions and comments:

  • You could use \rotatebox[origin=c]{-90}{...} directives to rotate (1-p) and (p) by -90 degrees each.

  • There appears to be a lot of needless overhead. I would get rid of the outer tabular environment and both minipage wrappers. The inner tabular environments appear to have an unneeded first column. Since the contents of the inner tabular environments are all typeset in math mode, consider switching to array environments and save a lot of keystrokes spent on typing various $ symbols.

Note that the array environment on the right has an additional column when compared with the one on the left:

enter image description here

\documentclass{beamer}
\usepackage{array}
\newcommand\mc[1]{\multicolumn{1}{c}{#1}} % handy shortcut macro
\newcommand\blank{\mc{}}

\begin{document}
\begin{frame}
\begin{center}
\textbf{Payoffs}
\end{center}

\renewcommand\arraystretch{2}
$
\begin{array}{r|c|c|}
  \blank & \multicolumn{2}{c}{\mathbf{s=0}}\\[-1ex]
  \blank & \mc{a=0} & \mc{a=1} \\\cline{2-3}
  r=0 & B & B-c   \\\cline{2-3}
  r=1 & B & B-c-k \\\cline{2-3}
\end{array}%
\hfill % maximize the horizontal separation
\begin{array}{r|c|c|l}
  \blank & \multicolumn{2}{c}{\mathbf{s=1}}\\[-1ex]
  \blank & \mc{a=0} & \mc{a=1} \\\cline{2-3}
  r=0 & -B & B-c   & \rotatebox[origin=c]{-90}{$\scriptstyle(1-p)$} \\\cline{2-3}
  r=1 & -B & B-c-k & \rotatebox[origin=c]{-90}{$\scriptstyle(p)$}   \\\cline{2-3}
\end{array}
$
\end{frame}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.