\begin{Schunk}
\begin{Sinput}
 ## Do the sample statistics match the data generator (population) parameters?
 ## Several convenient ways to retrieve the answers
 m1 <- lm(IQ ~ first, data = dat)
 summary(m1)
\end{Sinput}
\begin{Soutput}
Call:
lm(formula = IQ ~ first, data = dat)

Residuals:
    Min      1Q  Median      3Q     Max 
-33.425  -8.969  -0.817   8.727  33.183 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   97.817      1.884  51.920   <2e-16 ***
first          3.608      2.979   1.211    0.229    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 14.59 on 98 degrees of freedom
Multiple R-squared:  0.01475,	Adjusted R-squared:  0.004698 
F-statistic: 1.467 on 1 and 98 DF,  p-value: 0.2287
\end{Soutput}
\begin{Sinput}
 ## Or
 
 t.test(IQ ~ first, data = dat)
\end{Sinput}
\begin{Soutput}
	Welch Two Sample t-test

data:  IQ by first
t = -1.2193, df = 85.601, p-value = 0.2261
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -9.491625  2.274959
sample estimates:
mean in group 0 mean in group 1 
       97.81667       101.42500 
\end{Soutput}
\begin{Sinput}
 ## Or
 aggregate(IQ ~ first, data = dat,
            FUN = function(x) c(M = mean(x), SD = sd(x)))
\end{Sinput}
\begin{Soutput}
  first      IQ.M     IQ.SD
1     0  97.81667  14.78030
2     1 101.42500  14.30597
\end{Soutput}
\begin{Sinput}
 ## I'm sure we could find a more tedious way to get group differences, but this is near the maximum
 diff(aggregate(IQ ~ first, data = dat, mean)$IQ)
\end{Sinput}
\begin{Soutput}
[1] 3.608333
\end{Soutput}
\end{Schunk}
