Confusion about indicators 

*

*Let $X$ be the number of spades in $7$ cards dealt from a well-shuffled deck of $52$ cards containing $13$ spades. Find $E(X)$.


*Let $X$ be the number of aces in a $5$-card poker hand. Find $E(X)$.

From the solution manual, I got
$$ 7\times \frac{1}{13} = \frac{7}{13} $$
for the first problem. But for the second, it is calculated as the following:
$$ 5 \times \frac{4}{52} = \frac{5}{13} .$$
I am confused about how to use indicators in problems like these.
 A: Denote $X_i$ by $1$ if the "color" of the $i^{th}$ card is spades and $0$ if not. (In the sense that "spades" is a color.) Then you can compute the expectation of $X$ by computing
$$
E(X) = E(X_1 + X_2 + \dots + X_7) = E(X_1) + E(X_2) + \dots + E(X_7).
$$
Now, since the 7 cards are dealt at the same time, each of the expectations up there are easily computed, since it doesn't matter that the $i^{th}$ card is picked amongst $7$ cards, it only matters to know what is the probability that this particular card is spades or not. Since you can see that this chance is $1/4$, the expectation you are looking for is $7/4$. ($7/13$ is just WRONG, you cannot expect to have less than one card being spades when $1/4$ of the deck is...)
Another way to see this is that 7 is the number of cards in your hand, but it is also the number of hearts + the number of spades + ... , etc., and those have equal probability to show up, so it makes sense that 1/4 of those 7 cards pop up by being hearts, 1/4 are spades, etc, which justify my $7 \times 1/4$ answer being again more rightful than your manual's $1/13$. 
In the same manner you can compute in the second problem
$$
E(X) = E(X_1 + X_2 +... + X_5) = E(X_1) + E(X_2) + ... + E(X_5)
$$
by letting $X_i$ be $1$ if the $i^{th}$ card is $1$ and $0$ if not. Since there are $4$ cards out of $52$ that are aces, the probability that $X_i$ is $1$ is $4/52$, which allows you to compute $E(X) = 5 \times 4/52$. 
Hope that helps,
