15 octobre 2026

Motivating example (dataset trees) :

How does Girth depend on Volume?

\[Girth\stackrel{?}=a_0\times Volume+b_0+\epsilon\]

Problem formulation

  • Regression problem : \(Y=f(X)+\epsilon\)

    • \(Y\) response variable
    • \(X\) explanatory variable
    • \(f\) unknown link function
    • \(\epsilon\) error term
  • Does \(Y\) depend on \(X\)? What kind of link is it? How to estimate the function \(f\)?

  • Simplest case: Linear regression \[Y=a_0\times X+b_0+\epsilon\]

A. Scatter plot

  • Does \(Y\) depend on \(X\)?

  • How intense is the link?

  • Is the potential link linear?

B. Correlation coefficient

\[\rho(X,Y)=\frac{cov(X,Y)}{\sqrt{S^2_X S^2_Y}} (\approx 0.9671194 \text{ in our example})\]

Properties

  • \(-1\leq \rho(X,Y)\leq 1\)
  • \(|\rho(X,Y)|=1\ \Leftrightarrow \exists a,b\in\mathbb{R},\, \forall i\in\{1,\dots,n\},\, y_i=ax_i+b\)
  • Hence a strong linear link gives \(|\rho(X,Y)|\) close to 1.
  • The sign of \(\rho(X,Y)\) is related to the way \(Y\) and \(X\) tend to evolve jointly (positively or negatively).

Regression line estimation

\[\small{Y=\color{blue}{a_0X+b_0}+\color{red}{\epsilon_{(a_0,b_0)}}}\]

We look for \((\hat a_0,\hat b_0)\) minimizing the following least squares criterion: \(\small{MC(a,b)=\sum_{i=1}^n\left(y_i-\color{blue}{(ax_i+b)}\right)^2=\sum_{i=1}^n\left(\color{red}{\epsilon_{i,(a,b)}}\right)^2}\)

Regression line estimation

  • \(\hat a_0=\frac{cov(X,Y)}{S^2_X}=\rho(X,Y)\frac{S_Y}{S_X}(\approx 0.185\text{ in our example})\)
  • \(\hat b_0=\overline Y-\hat a_0\overline X (\approx 7.68\text{ in our example})\)
  • Modelling quality : coefficient of determination \[\small{R^2\left(X,Y\right)=\frac{\sum_{i=1}^n(\hat a_0X_i+\hat b_0-\overline{\hat a_0X+\hat b_0})^2}{\sum_{i=1}^n(Y_i-\overline{Y})^2}=\left(\rho(X,Y)\right)^2}\] In our example: \(R^2\left(X,Y\right)\approx0.9353199\)
  • Estimation of the mean value of Girth when Volume=24.2
    \[\hat{Girth}=0.1846321\times24.2+7.677857\approx 12.1459546\]

Adding a third variable?