The expected length of code for one encoded symbol is

where
is the probability of picking the letter
, and
is the length of code needed to encode
.
is given to us, and we have

so that we expect a contribution of

bits to the code per encoded letter. For a string of length
, we would then expect
.
By definition of variance, we have
![\mathrm{Var}[L]=E\left[(L-E[L])^2\right]=E[L^2]-E[L]^2](https://tex.z-dn.net/?f=%5Cmathrm%7BVar%7D%5BL%5D%3DE%5Cleft%5B%28L-E%5BL%5D%29%5E2%5Cright%5D%3DE%5BL%5E2%5D-E%5BL%5D%5E2)
For a string consisting of one letter, we have

so that the variance for the length such a string is

"squared" bits per encoded letter. For a string of length
, we would get
.
8x+6? Are you asking us to write out the equation?
(A)
we are given
(-1.15) x 3.2
Since, sign of 1.15 is negative
and sign of 3.2 is positive
so, we put negative sign in front

now, we can multiply them
and we get
.............Answer
(B)
Suppose, we are given product of two numbers 'a' and 'b'
so, we use this property
case-1: When both positive , then we put positive in front

case-2: When both negative , then we put positive in front

case-3: When first is negative and second is positive , then we put negative in front

case-4: When first is positive and second is negative , then we put negative in front
