Shiny dashboard "Statistical foundations of machine learning"

Monte Carlo illustration of r.v. properties

Transformation of a single r.v.

This tab shows that by applying a functional transformation on a random variable we obtain other random variables. Since it is not possible to derive the analytical form of the transformed distributions, we use a Monte Carlo strategy to sample the original r.v. and show the histograms of different nonlinear transformations of the original r.v.

Central limit theorem

This tab visualizes the Central Limit theorem by Monte Carlo simulation. It shows that the sum of several random variables (with a uniform, then non Gaussian, distribution) converge to a Gaussian distribution.

Suggested manipulations:

Operations on two r.v.s

This tab shows the results of simple operations on two independent r.v.s by Monte Carlo simulation. This is to make evident for the student that the sum of two r.v.s. is still a random variable.

Linear combination of independent variables

This tab visualizes the theoretical results in the hanbdbook about the expectation and variance of the linear combination of two independent random variables (null covariance), denoted by green and red.

Suggested manipulations:

Linear combination of dependent variables

This tab visualizes the theoretical results in the hanbdbook about the expectation and variance of the linear combination of two dependent (non null covariance) random variables ${\bf x}$ and ${\bf y}$. The dependence is established by defining an appropriate bivariate Normal joint distribution.

A generic bivariate covariance matrix may be written as $$ \Sigma= R S R^T $$ where $S$ and $R$ denote the scaling and rotation of a diagonal covariance matrix. The scaling matrix $$ S=\begin{bmatrix} s_x & 0 \ 0 & s_y \end{bmatrix}$$ streches the x-axis and the y-axis by the factors $s_x>0$ and $s_y>0$ respectively.

The matrix $$ R=\begin{bmatrix} \cos(\theta) & -\sin(\theta) \ sin(\theta) &\cos(\theta) \end{bmatrix}$$ performs a rotation of angle $\theta$.

Suggested manipulations:



gbonte/gbcode documentation built on Feb. 27, 2024, 7:38 a.m.