\begin{Schunk}
\begin{Sinput}
 x<- rnorm(300, m=50, s=10)
 y <- 5+ 5*x + 18*rnorm(300, m=0, s=1)
 x[301:320] <- 30 + rnorm(20, m=0, s=4)
 y[301:320] <- 400 + rnorm(20, m=0, s=6)
 plot(y~x, xlab="X", ylab="Y", main="")
 mod1 <- lm(y~x)
 summary(mod1)
\end{Sinput}
\begin{Soutput}
Call:
lm(formula = y ~ x)

Residuals:
    Min      1Q  Median      3Q     Max 
-94.462 -31.875  -9.085  14.731 205.167 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) 144.2778    14.2197  10.146   <2e-16 ***
x             2.5263     0.2803   9.012   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 56.3 on 318 degrees of freedom
Multiple R-squared:  0.2034,	Adjusted R-squared:  0.2009 
F-statistic: 81.22 on 1 and 318 DF,  p-value: < 2.2e-16
\end{Soutput}
\end{Schunk}
