Mai AlSwayan
January 2017
\[ x_t=x_{t-1}+\epsilon_{x,t} \] \[ y_t=y_{t-1}+\epsilon_{y,t} \] where \[ \epsilon_{x,t}~N(0,\sigma^2_x) \] \[ \epsilon_{y,t}~N(0,\sigma^2_y) \] , following two independent random walks, \(\{x_t\}\) and \(\{y_t\}\) are thus unrelated.
library(zoo)
set.seed(42)
n <- 500
x <- as.ts( cumsum( rnorm(n, mean=0, sd=1) ) )
y <- as.ts( cumsum( rnorm(n, mean=0, sd=1) ) )\[ XX=\rho_{x,y} \]
consider linear regression model \[ y = \beta_0 + \beta_1 x + \varepsilon \]
\(\hat \beta_1=1.5954\) is highly signifficant with \(p\)-value \(1.1643\times 10^{-67}\)
m1 <- lm(y~x)
summary(m1)##
## Call:
## lm(formula = y ~ x)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.170 -7.887 -0.464 7.566 18.375
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.2330 0.5857 -5.52 5.5e-08 ***
## x 1.5954 0.0782 20.39 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 9.4 on 498 degrees of freedom
## Multiple R-squared: 0.455, Adjusted R-squared: 0.454
## F-statistic: 416 on 1 and 498 DF, p-value: <2e-16