4. Roll a die twice, let $X$ denote the maximum of the two rolls, then among the following numbers, the one closest to the expectation $E(X)$ is
A. 4
B. 4.5
C. 5
D. 5.5
$X=1,2,3,4,5,6$, and $P(X=1)=\frac{1}{36}, P(X=2)=\frac{3}{36}, P(X=3)=\frac{5}{36}, P(X=4)=\frac{7}{36}$, $P(X=5)=\frac{9}{36}, P(X=6)=\frac{11}{36}$, thus $E(X)=\frac{1+6+15+28+45+66}{36}=\frac{161}{36} \approx 4.47$, so the answer is $B$.