Roll two dice and find $E[X]$ if $X$ is (a) the smallest number, (b) the difference between the largest and the smallest numbers.
For the expected value I use the formula
$$E(X)=\sum_{k=1}^{\infty}k\cdot p(k), \tag{1}$$
where $p(k)$ is the probability mass function (pmf) of $X$.
(a): Counting the possible outcomes for $X$ we get that they are $36$. We have several instances of a particular outcome, for example: the number 1 can occur in 11 of those outcomes, the number 2 can occur in 9 and so on so the probabilities of each outcome are
$P(X=1) =11/36$
$P(X=2) =9/36$
$P(X=3) =7/36$
$P(X=4) =5/36$
$P(X=5)=3/36$
$P(X=6) =1/36$
which can be written as $p(k)= P(X=k)=(2k-1)/36, \ k=1,2,...,6$. Now (1) would give me
$$E(X)=\sum_{k=1}^{6}k\cdot \frac{2k-1}{36}=\frac{161}{36}\approx 4.47.$$
I don't understand why this is incorrect-the answer is $91/36\approx2.53.$
Your numerical probabilities are correct but you sum calculation has gone wrong because you accidentally reversed your probabilities and came out with the wrong P(X = k) equation.
You have said the P(X = k) = (2k-1)/36 but this isn't the case. P(X = k) = (2*(7-k) - 1)/36 = (13 - 2k) / 36.