Tag Info

2

The above code for an irregular EWMA doesn't quite give a half-life - the code is missing the $e^{\ln(.5)}$ term found in the preceding formula. To get a true half-life, the code should look like this: double operator()(double x) { if (isnan(prev_ewma_)) // we don't decay the first sample { prev_ewma_ = x; prev_time_ = Time::now(); ...

1

This is a case of bivariate normal as there are two normal variables (as opposed to two variables driven by the same common random factor). The answer to your question is the conditional distribution of one of the variables given the other variable: $Y|X \sim N\left(\mu_y+\rho \sigma_y \frac{x-\mu_x}{\sigma_x}, \sigma_y^2 \left(1-\rho^2\right) \right)$ For ...

3