Lab 02

Linear regression

January 24, 2025

Welcome

Goals

  • LaTex in this course
  • Lab 02: Linear regression

LaTex in this class

For this class you will need to be able to…

  • Properly write mathematical symbols, e.g., β1 not B1, R2 not R2

  • Write basic regression equations, e.g., y^=β0+β1x1+β2x2

  • Write matrix equations: y=Xβ+ϵ

  • Write hypotheses (we’ll start this next week), e.g., H0:β=0

You are welcome to but not required to write math proofs using LaTex.

Writing LaTex

Inline: Your mathematics will display within the line of text.

  • Use $ to start and end your LaTex syntax. You can also use the menu: Insert -> LaTex Math -> Inline Math.

  • Example: The text The linear regression model is $\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon}$ produces

    The linear regression model is y=Xβ+ϵ

Writing LaTex

Display: Your mathematics will display outside the line of text

  • Use a $$ to start and end your LaTex syntax. You can also use the menu: Insert -> LaTex Math -> Display Math.

  • Example: The text The estimated regression equation is $$\hat{\mathbf{y}} = \mathbf{X}\hat{\boldsymbol{\beta}}$$ produces

    The estimated regression equation is

y^=Xβ^

Tip

Click here for a quick reference of LaTex code.

Describing bivariate relationships

Describe the relationship between the price and width of Ikea sofas, armchairs, and bookcases/shelving.

Lab 02: Linear regression

Today’s lab focuses on using simple and multiple linear regression to understand variability in coffee quality ratings.


🔗 sta221-sp25.netlify.app/labs/lab-02.html

🔗 STA 221 - Spring 2025

1 / 8
Lab 02 Linear regression January 24, 2025

  1. Slides

  2. Tools

  3. Close
  • Lab 02
  • Welcome
  • Goals
  • LaTex in this class
  • Writing LaTex
  • Writing LaTex
  • Describing bivariate relationships
  • Lab 02: Linear regression
  • f Fullscreen
  • s Speaker View
  • o Slide Overview
  • e PDF Export Mode
  • r Scroll View Mode
  • b Toggle Chalkboard
  • c Toggle Notes Canvas
  • d Download Drawings
  • ? Keyboard Help