# Derivative of a random variable w.r.t. a deterministic variable

I'm reading about time series and I thought of this procedure: can you differentiate a function containing a random variable.

For example:

$f(t) = a t + b + \epsilon$

where $\epsilon \sim N(0,1)$. Then:

$df/dt = \lim\limits_{\delta t \to 0} {(f(t + \delta t) - f(t))/ \delta t} = (a \delta t + \epsilon_2 - \epsilon_1)/\delta t = a + (\epsilon_2 - \epsilon_1)/\delta t$

But:

$\epsilon_2 - \epsilon_1 = \xi$

where $\xi \sim N(0,2)$.

But this means that we have a random variable over an infinitesimally small value. so $\xi/\delta t$ will be infinite except for the cases when $\xi$ happens to be 0. Am I doing something wrong?

-
Different values ("realizations") of the random variable $\epsilon$ gives different functions. But when you derive with respect to $t$, you are deriving one of those functions (for some $\epsilon$). Hence, it does not make sense to assume that $f(t+\delta t)$ and $f(t)$ have different $\epsilon_1$ and $\epsilon_2$ –  leonbloy May 9 '12 at 20:07
I think what is meant is that $f(t) = at + b + \epsilon(t)$ where $\epsilon(t)$ is a stochastic process. In that case, depending on the nature of $\epsilon(t)$ this may or may not be differentiable. –  Robert Israel May 9 '12 at 20:50
Robert, no I didn't mean that $\epsilon$ is a function of t. –  s5s May 9 '12 at 23:50
A random variable is a function from sample space to the real line. Hence $f(t)$ really stands for $f(t,\omega) = a t + b + \epsilon(\omega)$. This function can be differentiated with respect to $t$, for fixed $\omega$, of course. The resulting derivative, being a function of $\omega$, is a random variable. In this case:
$$\frac{\partial f}{\partial t}(t, \omega) = a$$ Since it does not depend on $\omega$, the derivative is deterministic, in this example.