0
$\begingroup$

I just started thinking when you have time series data and was curious about the following question. Suppose you have the standard deviation of one observed result. Would the standard deviation of the difference of that result from day to day be related? I just generated some random data and ran the following code

library(ggplot2)
#a function that creates a uniformly sampled column and a second column 
#that is the diffs from one to another and then returns the standard
#deviations of the two columns
test_sd<-function()
{
test<-data.frame(runif(365,0,1))
test$diff<-c(NA,diff(test[,1],lag=1))
return(sapply(test,sd,na.rm=TRUE))
}
#initalise data frame
ricky<-data.frame()
#populate with 1000 instances
for(i in 1:10000)
{
  ricky <- rbind(ricky, test_sd())
}
#plots the results
colnames(ricky) <- c("SD", "SD_of_Diffs")
ggplot() +
  geom_point(data=ricky,
             aes(x=SD,
                 y=SD_of_Diffs))

I've attached an exploratory plot which kind of shows that there is a positive relationship. Is there a more mathematically 'tighter' relationship between these two standard deviations? the ggplot

$\endgroup$
1
  • 1
    $\begingroup$ I wonder where the line $y = \sqrt{2} x$ would appear on this scatterplot. $\endgroup$
    – whuber
    Jul 17, 2015 at 22:06

1 Answer 1

1
$\begingroup$

assume you have a set of random variables, $X_1,X_2,\ldots,X_t$ and assume they follow an AR(1) process. Then, $X_t=\phi X_{t-1}+e_t$ where $e_t\sim_{iid} N(0,\sigma^2)$ and $|\phi|<1$. Then, $$ Var(X_t)=\frac{\sigma^2}{1-\phi^2} $$ on the other hand, for differences we have \begin{align} & X_t =\phi X_{t-1}+e_t\\ & X_{t-1} =\phi X_{t-2}+e_{t-1} \end{align} and $$ \Delta X_t =(X_t-X_{t-1})=\phi \Delta_{t-1}+(e_t-e_{t-1}) $$ then $$ Var(\Delta X_t)=\frac{2\sigma^2}{1-\phi^2} $$

note that your example is not a time series and then $\phi=0$ then the result is similar but $\phi=0$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.