The variance of a data set is given by the formula:
[tex]s^2=\sum ^{}_i(x_i-\mu)^2P(x_i)[/tex]Where μ is the mean given by the formula:
[tex]\mu=\sum ^{}_ix_iP(x_i)[/tex]Therefore, in our problem:
[tex]\begin{gathered} \mu=3\cdot0.3+4\cdot0.1+5\cdot0.2+6\cdot0.2+7\cdot0.2=4.9 \\ \Rightarrow\mu=4.9 \end{gathered}[/tex]Then, the variance is:
[tex]\begin{gathered} s^2=0.3(3-4.9)^2+0.1(4-4.9)^2+0.2((5-4.9)^2+(6-4.9)^2+(7-4.9)^2) \\ \Rightarrow s^2=2.29 \end{gathered}[/tex]Thus, the variance is 2.29