1 Random variables

Experiments and random variables

  • Random experiment: result unknown in advance (roll a die).
  • Random variable \(X\): a number for each outcome, “the number shown”.
  • Capital \(X\) before the roll; its realisation \(x\) after. Data are realisations.

Discrete distribution, two equivalent descriptions:

  • pmf \(p(x)=P(X=x)\), \(\sum_x p(x)=1\)
  • cdf \(F(x)=P(X\le x)\), a staircase

2 Random vectors

Two dice: first die and sum

\(X_1\) = first die, \(X_2\) = sum: a random vector \(X=(X_1,X_2)'\).

  • Joint: \(P(X_1=x_1,X_2=x_2)\), \(1/36\) per point
  • Marginal: add over the other variable (grey bars)
  • Conditional: one column, rescaled: given \(X_1=3\), the sum is \(4,\dots,9\)

Independence

Independent: knowing \(X_1\) tells nothing about \(X_2\):

\[P(X_1=x_1,X_2=x_2)=P(X_1=x_1)\,P(X_2=x_2)\quad\text{for all pairs.}\]

  • The two dice are independent: \(\frac16\cdot\frac16=\frac1{36}\).
  • The first die and the sum are dependent: \(P(X_1=1,X_2=12)=0\), but \(P(X_1=1)P(X_2=12)>0\).

Dependence between variables is what multivariate analysis is about.

3 From random vectors to a data matrix

Repeating the experiment

Repetition \(t\): random vector \(\mathbf X_t\), realisation \(\mathbf x_t\) = row \(t\) of \(\mathbf X\).

\[\mathbf X_1,\dots,\mathbf X_n\;\longrightarrow\;\mathbf X=\begin{pmatrix}\mathbf x_1'\\ \vdots\\ \mathbf x_n'\end{pmatrix}\]

Bold \(\mathbf X_t\): the whole repetition (a vector). Plain subscript: a variable. \(X_1\) is the first die, \(\mathbf X_1\) the first roll.

Random sample: rows iid, independent and identically distributed.

Then every \(\mathbf X_t\) has the distribution of one \(X\):

\(\mathbf X\) is \(n\) independent draws of the same \(X\), not one draw each of \(n\) different random vectors.

The data come to look like the distribution

  • Blue: share of the \(n\) rows at each pair. Circles: the probability \(1/36\).
  • More rows, closer match: the data tell us about the unknown distribution.

4 Continuous random vectors

Densities: probabilities are areas

  • \(P(a\le X\le b)=\int_a^b f(x)\,dx\), and \(F(x)=P(X\le x)\) is the area to the left of \(x\).
  • \(f(x)\) is not a probability: it is high where values are crowded.

The multivariate normal

Flight time \(X_1\), fuel \(X_2\). Drag to rotate.

\[f(x)\propto\exp\!\Big(-\tfrac12(x-\mu)'\Sigma^{-1}(x-\mu)\Big)\]

One hill, fully described by \(\mu\) and \(\Sigma\).

From 3D to 2D: the contour plot