Say I have a sequence $S$ that is a exponentially random variable with mean $\mu$. Now say I create another other sequences from this: $T$ which is $T(n) = 2(S(n+1)-S(n))$.
I know that theoretically, $T$ is also suppose to be a exponential random variable. But when I run an example with MATLAB using the following code:
N = 1e5;
mu = 3;
seq = exprnd(mu, 1, N);
T = 2*diff(seq);
mean(seq)
std(seq)
mean(T)
std(T)
I get the following four values: 3.0053 2.9976 -3.9002e-5 8.4962. As you can see, the mean and std of seq is what I expect, but the mean and std of T is completely different.
What am I missing?
We interpret your question as follows. Let $S_1,S_2,S_3,\dots$ be a sequence of independent identically distributed random variables, each exponentially distributed with mean $\mu$. Let $T_n=2(S_{n+1}-S_n)$. Find the mean and standard deviation of $T_n$.
The mean is straightforward. For by the linearity of expectation, we have $$E(T_n)=2(E(S_{n+1})-E(S_n))=2(\mu-\mu)=0.$$
For the variance of $T_n$, note that since $S_{n+1}$ and $S_n$ are independent, the variance of $2S_{n+1}-2S_n$ is $4\sigma^2+4\sigma^2$, where $\sigma^2$ is the variance of the $S_i$.
Recall that an exponential with mean $\mu$ has variance $\mu^2$. It follows that $T_n$ has variance $8\mu^2$, and therefore standard deviation $\sqrt{8}\mu$.
Remarks: $1.$ Note that if $\mu=3$, then $T_n$ has standard deviation $3\sqrt{8}$. This is about $8.58528$, quite close to the result obtained in your simulation.
$2.$ The random variables $T_n$ do not have exponential distribution. This can be seen without calculation, since $\Pr(T_n\le 0)=\frac{1}{2}$, while an exponential has probability $0$ of being $\le 0$. What is true is that $\frac{1}{2}|T_n|$ has exponential distribution.
The $T_n$ have Laplace Distribution. For details, please look, for example, at Wikipedia.