script.R
1
2
3
4
5
6
7
8
9
10
# define the function ex
# compute the expected value of X
# define the function ex2
# compute the variance of X
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
R Console
1
>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX