What's wrong with my Expected Value?

As the definition says, E(A) = ∑×A×f(A), which means that E(A) is the sum of individual probability of event A times individual value that you get when each of A happens.

But if I see something like these example questions below, I get confused.

Q1: There's a box that has full of 1,000 marbles. Almost all of the marbles are transparent. But there is a probability, 1/100, that some of the marbles are red, and another one, 1/200, that some of the marbles are blue. What is the expected value of the number of colored marbles?

Q2: Now, there're chances that you get prized with 500 dollars when you pick a red marble out of the box, and 10,000 dollars when you get a blue one. What is your expected value of the money you would get?

Here I solved them like;

A1: 1000×1/100 + 1000×1/200 = 15. And there's nothing wrong with it.

A2: 500×1/100 + 10000×1/200 = 55. Also, there's nothing wrong with it.

I'm not questioning those are wrong expected values, but if I think about it like this way I get confused. In A2, I solved it just like the definition said; the sum of individual probability times individual value. But in A1, that answer is the sum of individual probability times something that is not an individual value(1000). I know how to calculate them instinctively, but when I do the E(X) for the counting, it seems like the definition doesn't match with it. What am I missing here?

• Note that $1000$ here is shorthand for $1+1+\ldots+1$.
– WimC
Nov 27 '20 at 6:06
• For Q1, there's no random variable defined. What you've computed is the total number of coloured marbles, namely $10$ red an $5$ blue ones ... So the question should be: "What is the expected value of the number of colored marbles if you do what?" Nov 27 '20 at 11:27