Derivative of a random variable Hi,
If I have two i.i.d random variables $X,Y$ and a parameter $a$. If I define a new random variable $Z(a)=aX+(1-a)Y$. 
Does it makes sense to talk about first, second derivative of the random variable $Z(a)$ respect to $a$. Then $Z^{\prime}(a)=(X-Y)$ and so on.
Thanks
 A: There is nothing mathematically wrong with your notation.  However, I don't like it, because $Z'$ suggests that you are taking a derivative with respect to the background randomness.  I would rather write $$f(a) = aX + (1-a)Y$$ in order to highlight the fact that you considering a function of $a$, and taking a derivative with respect to $a.$
Let me expand on my comment about "background randomness."  Remember that random variables are measurable real-valued functions from a probability space $\Omega$:$$X : \Omega \to \mathbb R \qquad \mathrm{and} \qquad Y : \Omega \to \mathbb R.$$  We usually write $X$ instead of $X(\omega)$.  Thus your function $Z(a)$ is really a function $Z(a,\omega)$ of two inputs.  To me, the notation $Z'$ suggests that you are taking a derivative with respect to the source of randomness $\omega$ rather than the parameter $a$.
A: Yes, it makes sense if for example your random variables are in $L^1$. 
Your map $Z(a)=aX+(1-a)Y$ is a well-defined map from an open set in a Banach space to a Banach space, $Z: R \mapsto L^1$.
In such situation, you can talk about the Frechet derivative of Z, and it satisfies the usual properties you can expect from a derivative. 
If you are dealing with random variables living in non-locally convex topological vector spaces (e.g. in $L^p$, $0\leq p < 1$), then I think you run quickly into several problems. 
The standard procedure to prove results from calculus for a vector-valued function Z is to go back to a real-valued function just by replacing Z with $\lambda(Z)$, where $\lambda$ is a continuous linear functional on the vector space. That is, we are just looking at the "coordinates" of Z. But if there are no non-zero linear functionals on the vector space (e.g. $L^p$, $0\leq p<1$), then there is not much that can be done.
