{
"cells": [
{
"cell_type": "markdown",
"id": "20fce00f",
"metadata": {},
"source": [
"# ML, Data Analysis\n",
"### Probability: variance \n",
"\n",
"The **variance** measures the spread of the given random variable, which is defined by the following formula:\n",
"
$\\large var(X)=E[(X-E[X])^2]$\n",
"
where $E[X]$ denotes the *expected value* of random variable $X$. We have talked before about the **expected value**.\n",
"
**Hint:** We also call $E[X]$ the **mean** of $X$.\n",
"
\n",
"
Some properties of variance:\n",
"1. **Non-negativity:** For any random varibale $X$: $var(X)>=0$\n",
"2. **Linear transformation:** For constants $a$ and $b$, we have: $var(aX+b)=a^2var(X)$\n",
"3. **Sum of variances:** Having *uncorrelated* random variables $X$ and $Y$ ($E[XY]=E[X]E[Y]$): we have: $var(X+Y)=var(X)+var(Y)$\n",
"