script.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# set seed for reproducibility
set.seed
(
1
)
# sample the observations
# estimate the mean and assign the estimate to `mu_hat`
# compute the 95% confidence interval using the formula
above
CI
<-
c
(
"lower"
=
NA
,
"upper"
=
NA
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
R Console
1
>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX