# Comparison: Univariate Model vs Covariance Matrix (linear transformation) data generation
### Univariate Model
Consider two correlated random variables, $X$ and $Y$. Often there is assumed to be a function, $f$ relating the two, $f : X \rightarrow Y$. For simplicity, let $f$ be:
$f(x) = x + \epsilon$
Where $\epsilon = \mathcal{N}(\mu=0, \sigma^2 = 1)$.
Now if we generate some values of $y$ via mapping $x$ via $f$:
```python
x = np.arange(-1, 1, 0.001)
epsilon = np.random.normal(scale=0.5, size=len(x))
y = x + epsilon
```
We get:

The main thing I am thinking about at this point is that $f: \mathbb{R} \rightarrow \mathbb{R}$. I intuitively am thinking about my input space being $X$ and my output space being $Y$. I can simply visualize these spaces via the 2 dimensional cartesian coordinate system.
### Linear Transformation via covariance matrix
Now, alternatively I could use a covariance matrix to generate these data points. Specifically, given a covariance matrix $C: \mathbb{R}^2 \rightarrow \mathbb{R}^2$, where it is explicitly:
$C = \begin{bmatrix} 0.3335 \;\; 0.3293 \\ 0.3293 \;\; 0.5703 \\ \end{bmatrix}$
$C$ will take 2 dimensional vectors and linearly transform them from the input space ($\mathbb{R} \times \mathbb{R} = \mathbb{R}^2$):

To the output space:


### My question
It seems that there are fundamentally two different data generating processes at play here, one that maps from $\mathbb{R}$ to $\mathbb{R}$, and the other from $\mathbb{R}^2$ to $\mathbb{R}^2$. However, they can accomplish the same thing.
> Do you view them as distinct and different processes, or the same process related some via "translation", or something else all together?
A note: I think part of what I am trying to sort out is that in the past I have tended think of correlated random variables such as this as *functions of each other*. Namely, give me an $x$ and I can predict a $y$ via some mapping, $f$. Now, this linear transformation via $C$ no longer treats these points as separate and being related via some mapping; rather, $C$ treats these points as tuples, grouped together pairs. In that sense, some pair $\begin{bmatrix} x \\ y \\ \end{bmatrix}$ will be transformed via C to $\begin{bmatrix} x' \\ y' \\ \end{bmatrix}$. Here, there is no relation between $x$ and $y$, rather the relation is between the vectors $\begin{bmatrix} x \\ y \\ \end{bmatrix}$ and $\begin{bmatrix} x' \\ y' \\ \end{bmatrix}$.
graph of function vs
* produce a tangent vector
* give you a tangent vector
* graph
* y = f(x)
* condition on vectors in R2
* r to r, can produce function function from r to r2
* x turns into pair x, f(x) (graph of f)
* can do with R
* do it with R2 first
* need to look
* thesis
* may be signing up for assumptions
* height is correlated with weight
* height is related to weight via some function
* parameterization vs. graphs
TODO:
* [parameterization vs. graphs](https://www.youtube.com/watch?v=EliQoqfT9GE)
* think about more examples...
[Parametric-Curves](Parametric-Curves.md)
---
References:
* https://photos.google.com/photo/AF1QipPPQWgCiqVWdslCM7juT5HNi1O1bOwWCVYT1WCC