\documentclass[12pt]{article}
\usepackage{amsmath, amssymb, graphicx, array, fancyhdr, unicode-math, multirow}

\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\sd}{SD}
\DeclareMathOperator{\Pois}{Pois}
\DeclareMathOperator{\Bin}{Bin}
\DeclareMathOperator{\NegBin}{NegBin}
\DeclareMathOperator{\sech}{sech}


% Text: Calibri, all bold
\setmainfont{Calibri}
\renewcommand{\seriesdefault}{b}

% Math: choose a math font and visually embolden it
\setmathfont{TeX Gyre Termes Math}                  % base math font
\setmathfont[FakeBold=1.9]{TeX Gyre Termes Math}    % embolden; adjust 1.6–2.4

% header
\pagestyle{fancy}
\fancyhf{}
\lhead{\resizebox{!}{2cm}{K}}
\chead{\raisebox{0.5cm}{\Huge Uniform Variable}} % (add title text if you want)
\rhead{\resizebox{!}{2cm}{K}}
\setlength{\headheight}{2.5cm}
\setlength{\headsep}{12pt} % space between header and body

\begin{document}
\thispagestyle{fancy}

% -------- PAGE 1 --------
\begin{table}[h!]
  \renewcommand{\arraystretch}{1.2}

% -------- Single -------------------
\begin{tabular}{m{1.2in} m{4in}}
\multirow{5}{*}{\fbox{\includegraphics[width=1in]{images/single.png}}} 
&$X =\{2,4,6,8\}$\\
&\\
&\\
&\\
&\\
&\\
\end{tabular}

% -------- Abstract -------------------
\begin{tabular}{m{1.2in} m{4in}}
\multirow{5}{*}{\fbox{\includegraphics[width=1in]{images/abstract.png}}} 
&$P(X=x) = \frac{1}{4}$\\
&$E(X)= \sum_x x P(X=x) = \frac14(2+4+6+8) = \frac{20}{4} = 5$\\
&$E(X^2) = \sum_x x^2 P(X=x) = \frac14(2^2+4^2+6^2+8^2) = \frac14(4+16+36+64) = \frac{120}{4} = 30$\\
&$\operatorname{Var}(X) = E(X^2) - [E(X)]^2 = 30 - 25 = 5$\\
&$E(3X - 1) = 3E(X) - 1 = 3(5) - 1 = 14$\\
&\\
\end{tabular}


% -------- Question -------------------
\begin{tabular}{m{1.2in} m{4in}}
\multirow{5}{*}{\fbox{\includegraphics[width=1in]{images/question.png}}} 
&$X=\{-3,-1,1,3\}$\\
&$P(X=x)=1/4$\\
&$E(X^2)=?$\\
\end{tabular}
\end{table}


% second page
\newpage
\thispagestyle{fancy}
\begin{table}[h!]
% -------- Answer -------------------
\begin{tabular}{m{1.2in} m{4in}}
\multirow{5}{*}{\fbox{\includegraphics[width=1in]{images/key.png}}} 
&$X=\{-3,-1,1,3\}$\\
&$P(X=x)=1/4$\\
&$E(X^2)=?$\\
&\hrule\\
&\\
&$E(X^2) = \sum_{x\in\{-3,-1,1,3\}} x^2\,P(X=x)$\\
&$E(X^2) = \frac{(-3)^2 + (-1)^2 + 1^2 + 3^2}{4}$\\
&$E(X^2) = \frac{9 + 1 + 1 + 9}{4}$\\
&$E(X^2) = \frac{20}{4}$\\
&$E(X^2) = 5$\\
\end{tabular}
\end{table}
\end{document}



