Before Sampling vs After Sampling
There is a famous sentence in statistics.
Before sampling, X is a random variable.
After sampling, X is a number.
These are not useless sentence.
Before sample, $X, E(X), Var(X), Cov(X,Y), r(X,Y)$ are random variables or random vectors.
After sample, $X$ is a number or a vector and $E(X), Var(X), Cov(X,Y), r(X,Y)$ are numbers.
An Example of After Sampling
X | Y | |
---|---|---|
trial 1 | 1 | 2 |
trial 2 | 2 | 4 |
trial 3 | 4 | 8 |
trial 4 | 3 | 6 |
trial 5 | 2 | 4 |
We can easily get
$$
E(X) = \frac{12}{5} = 2.4
$$
$$
E(Y) = \frac{24}{5} = 4.8
$$
$$
Cov(X,Y) = \frac{242}{125} = 1.936
$$
An Example of Before Sampling
So, based on the data, the simplest model (completely over-fitting) is
Probability | X |
---|---|
$\frac{1}{5}$ | 1 |
$\frac{2}{5}$ | 2 |
$\frac{1}{5}$ | 3 |
$\frac{1}{5}$ | 4 |
Probability | Y |
---|---|
$\frac{1}{5}$ | 2 |
$\frac{2}{5}$ | 4 |
$\frac{1}{5}$ | 6 |
$\frac{1}{5}$ | 8 |
Probability | (X,Y) |
---|---|
$\frac{1}{5}$ | (1,2) |
$\frac{2}{5}$ | (2,4) |
$\frac{1}{5}$ | (3,6) |
$\frac{1}{5}$ | (4,8) |
We can easily get
$$
E(X) = E_{w}(X(w)) = \frac{12}{5} = 2.4
$$
$$
E(Y) = E_{w}(Y(w)) = \frac{24}{5} = 4.8
$$
$$
Cov(X,Y) = Cov_{w}(X(w),Y(w)) = E_{w}((X-E(X))(Y-E(Y))) =
E(XY) - E(X)E(Y) = \frac{242}{125} = 1.936
$$
THINK
w vs t
For stochastic process $X(w,t)$ and $Y(w,t)$,
We can calculate $F(t) = Cov_{w}(X(w,t),Y(w,t))$
We can also calculate $F(w) = Cov_{t}(X(w,t),Y(w,t))$
Connection with Calculus
Random variable is the same as independent variable or dependent variable.
Number is a variable which only has 1 value.