$$ \newcommand{\mybold}[1]{\boldsymbol{#1}} \newcommand{\trans}{\intercal} \newcommand{\norm}[1]{\left\Vert#1\right\Vert} \newcommand{\abs}[1]{\left|#1\right|} \newcommand{\bbr}{\mathbb{R}} \newcommand{\bbz}{\mathbb{Z}} \newcommand{\bbc}{\mathbb{C}} \newcommand{\gauss}[1]{\mathcal{N}\left(#1\right)} \newcommand{\chisq}[1]{\mathcal{\chi}^2_{#1}} \newcommand{\studentt}[1]{\mathrm{StudentT}_{#1}} \newcommand{\fdist}[2]{\mathrm{FDist}_{#1,#2}} \newcommand{\iid}{\overset{\mathrm{IID}}{\sim}} \newcommand{\argmin}[1]{\underset{#1}{\mathrm{argmin}}\,} \newcommand{\projop}[1]{\underset{#1}{\mathrm{Proj}}\,} \newcommand{\proj}[1]{\underset{#1}{\mybold{P}}} \newcommand{\expect}[1]{\mathbb{E}\left[#1\right]} \newcommand{\prob}[1]{\mathbb{P}\left(#1\right)} \newcommand{\dens}[1]{\mathit{p}\left(#1\right)} \newcommand{\var}[1]{\mathrm{Var}\left(#1\right)} \newcommand{\cov}[1]{\mathrm{Cov}\left(#1\right)} \newcommand{\sumn}{\sum_{n=1}^N} \newcommand{\meann}{\frac{1}{N} \sumn} \newcommand{\cltn}{\frac{1}{\sqrt{N}} \sumn} \newcommand{\trace}[1]{\mathrm{trace}\left(#1\right)} \newcommand{\diag}[1]{\mathrm{Diag}\left(#1\right)} \newcommand{\grad}[2]{\nabla_{#1} \left. #2 \right.} \newcommand{\gradat}[3]{\nabla_{#1} \left. #2 \right|_{#3}} \newcommand{\fracat}[3]{\left. \frac{#1}{#2} \right|_{#3}} \newcommand{\W}{\mybold{W}} \newcommand{\w}{w} \newcommand{\wbar}{\bar{w}} \newcommand{\wv}{\mybold{w}} \newcommand{\X}{\mybold{X}} \newcommand{\x}{x} \newcommand{\xbar}{\bar{x}} \newcommand{\xv}{\mybold{x}} \newcommand{\Xcov}{\mybold{M}_{\X}} \newcommand{\Xcovhat}{\hat{\mybold{M}}_{\X}} \newcommand{\Covsand}{\Sigmam_{\mathrm{sand}}} \newcommand{\Covsandhat}{\hat{\Sigmam}_{\mathrm{sand}}} \newcommand{\Z}{\mybold{Z}} \newcommand{\z}{z} \newcommand{\zv}{\mybold{z}} \newcommand{\zbar}{\bar{z}} \newcommand{\Y}{\mybold{Y}} \newcommand{\Yhat}{\hat{\Y}} \newcommand{\y}{y} \newcommand{\yv}{\mybold{y}} \newcommand{\yhat}{\hat{\y}} \newcommand{\ybar}{\bar{y}} \newcommand{\res}{\varepsilon} \newcommand{\resv}{\mybold{\res}} \newcommand{\resvhat}{\hat{\mybold{\res}}} \newcommand{\reshat}{\hat{\res}} \newcommand{\betav}{\mybold{\beta}} \newcommand{\betavhat}{\hat{\betav}} \newcommand{\betahat}{\hat{\beta}} \newcommand{\betastar}{{\beta^{*}}} \newcommand{\betavstar}{{\betav^{*}}} \newcommand{\loss}{\mathscr{L}} \newcommand{\losshat}{\hat{\loss}} \newcommand{\f}{f} \newcommand{\fhat}{\hat{f}} \newcommand{\bv}{\mybold{\b}} \newcommand{\bvhat}{\hat{\bv}} \newcommand{\alphav}{\mybold{\alpha}} \newcommand{\alphavhat}{\hat{\av}} \newcommand{\alphahat}{\hat{\alpha}} \newcommand{\omegav}{\mybold{\omega}} \newcommand{\gv}{\mybold{\gamma}} \newcommand{\gvhat}{\hat{\gv}} \newcommand{\ghat}{\hat{\gamma}} \newcommand{\hv}{\mybold{\h}} \newcommand{\hvhat}{\hat{\hv}} \newcommand{\hhat}{\hat{\h}} \newcommand{\gammav}{\mybold{\gamma}} \newcommand{\gammavhat}{\hat{\gammav}} \newcommand{\gammahat}{\hat{\gamma}} \newcommand{\new}{\mathrm{new}} \newcommand{\zerov}{\mybold{0}} \newcommand{\onev}{\mybold{1}} \newcommand{\id}{\mybold{I}} \newcommand{\sigmahat}{\hat{\sigma}} \newcommand{\etav}{\mybold{\eta}} \newcommand{\muv}{\mybold{\mu}} \newcommand{\Sigmam}{\mybold{\Sigma}} \newcommand{\rdom}[1]{\mathbb{R}^{#1}} \newcommand{\RV}[1]{{#1}} \def\A{\mybold{A}} \def\A{\mybold{A}} \def\av{\mybold{a}} \def\a{a} \def\B{\mybold{B}} \def\b{b} \def\S{\mybold{S}} \def\sv{\mybold{s}} \def\s{s} \def\R{\mybold{R}} \def\rv{\mybold{r}} \def\r{r} \def\V{\mybold{V}} \def\vv{\mybold{v}} \def\v{v} \def\vhat{\hat{v}} \def\U{\mybold{U}} \def\uv{\mybold{u}} \def\u{u} \def\W{\mybold{W}} \def\wv{\mybold{w}} \def\w{w} \def\tv{\mybold{t}} \def\t{t} \def\Sc{\mathcal{S}} \def\ev{\mybold{e}} \def\Lammat{\mybold{\Lambda}} \def\Q{\mybold{Q}} \def\eps{\varepsilon} $$

STAT151A Quiz 1

Please write your full name and email address here:

\[\\[2in]\]

Also, please put your intials on each page in case the pages get separated.

\[\\[1in]\]

You have 30 minutes for this quiz.

There are three questions, (1), (2), and (3), each weighted equally..

There are extra pages at the end if you need more space for solutions.

Question 1

Let \(\beta_1\) and \(\beta_2\) denote two unknowns, and consider the following system of equations.

\[ \begin{aligned} \beta_1 + 3 \beta_2 ={}& 4 \\ \beta_1 + 3 \beta_2 ={}& 5 \\ \beta_1 + 2 \beta_2 ={}& 7 \\ \beta_1 + 1 \beta_2 ={}& 1 \\ \beta_1 + 9 \beta_2 ={}& 9 \\ \end{aligned} \]

(a) Write the system of equations in matrix form \(\X \betav = \Y\), where \(\betav = \begin{pmatrix}\beta_1 \\ \beta_2\end{pmatrix}\) is the \(2\)–vector of unknowns, \(\X\) is a \(5 \times 2\) matrix, and \(\Y\) is a \(5\)–vector.

(b) How many solutions does this sytem of equations have? Briefly justify your answer.

Question 2

For this problem, I will use the following definitions.

  • \(\X\) denotes an \(N \times P\) matrix
  • \(\Y\) denotes an \(N\)–vector (i.e. an \(N \times 1\) matrix)
  • \(\betav\) denotes a \(P\)–vector

Take \(N > P > 1\). You may assume that \(\X\) is full column rank.

For each expression, write the dimension of the result, or write “badly formed” if the expression is not a valid matrix expression.

  1. \(\X^\trans \X\)
  2. \(\X \beta\)
  3. \(\Y^\trans \Y\)
  4. \(\Y \Y^\trans\)
  5. \(\trace{\Y \Y^\trans}\)
  6. \(\Y - \X \beta\)
  7. \((\X^\trans \X)^{-1}\)
  8. \(\X^\trans \left( \Y - \X \beta \right)\)
  9. \(\X^\trans \Y - \X^\trans \X \beta\)
  10. \((\X^\trans \X)^{-1} \X^\trans \Y - \beta\)

Question 3

Suppose I have a dataset in which each row is a student, and the columns contain the following variables for a given year:

  • Their final score in a linear models class
  • The self-reported total number of hours spent studying per week
  • Their grade in a prerequesite theoretical statistics course (like STAT135)
  • Whether or not they are a foreign exchange student

Consider two ways I might consider using this dataset:

(Use 1) How much can a student expect to increase their linear models grade by spending more hours studying?

(Use 2) How can I identify students who may need extra assistance at the beginning of the next semseter of linear models?

(a) Which of these two uses is a prediction problem, and which is an inference problem?
(b) Which question do you expect to be easier to answer with this dataset?

Briefly justify your answers.

Extra space for answers (indicate clearly which problem you are working on)

Extra space for answers (indicate clearly which problem you are working on)