# Average amount of money received from pulling three random coins

Let's say I have a bag of coins, which contains 1 quarter, 2 dimes, 3 nickles and 4 pennies. If I were to randomly pull out 3 coins, on average, how much money would I get?

-
Looks like homework... – Aryabhata Oct 10 '10 at 15:38
Sorry, not homework (although tangentially, I guess). I'm doing some research into cutsets in graph theory and my stats is pretty dull, but I'd like to know things like the average weight cut on certain sized cutsets. This is a toy problem I was hoping to see an answer to, to better understand the stats – coffee Oct 10 '10 at 15:40
Makes sense! Thanks for the clarification. Picking them all at once is fine, the order doesn't matter. Let's also say that coins of the same type are indistinguishable from one another. – coffee Oct 10 '10 at 16:26
@Moron: the answer to the original question doesn't depend on whether you pick them simultaneously or separately without replacement. – Qiaochu Yuan Oct 10 '10 at 17:07
@Moron: not without contradicting the implicit setup of the problem. As long as each individual coin is drawn with equal probability it does not matter whether you consider them indistinguishable or distinguishable. – Qiaochu Yuan Oct 10 '10 at 17:24

Each coin is pulled 30% of the time. So on average you will get 30% of 64 cents=19.2 cents

-
Sorry, each coin is pulled 30% of the time? But there are more pennies than quarters. Surely, you would pull pennies more often than you would pull a quarter. – coffee Oct 10 '10 at 16:01
@coffee: Ross is referring to each individual coin, without regard for its monetary value. This solution is correct. – Qiaochu Yuan Oct 10 '10 at 17:07

Ross Millikan's answer is entirely correct, but perhaps it deserves slightly more elaboration.

The expected amount of money you receive is the sum of the expected amounts of money that each coin gives you, which is the value of the coin times the probability that you draw it. (Linearity of expectation!) The probability that you draw each coin is the same: it is one minus the probability that you do not draw it, or $1 - \frac{ {9 \choose 3} }{ {10 \choose 3} } = \frac{3}{10}$. So the expected amount of money you receive is $\frac{3}{10}$ of the total value of the coins.

Note that I am basically treating coins with the same value as distinguishable (pretend they have the same value but look different; it can't affect the answer to the question). The question of distinguishability is a red herring.

-

Ross Millikan has already given a very elegant solution, but if you're still in doubt, this problem is small enough that you can easily verify it by letting a computer enumerate all the possibilities. Here's a Python program to do it:

coins = [25, 10, 10, 5, 5, 5, 1, 1, 1, 1]
total = count = 0
for k in range(10):
for l in range(10):
for m in range(10):
if k!=l and k!=m and l!=m:
total += coins[k] + coins[l] + coins[m]
count += 1
print "Got", total, "cents in", count, "draws; on average", total*1.0/count, "cents."


The answer comes instantly: "Got 13824 cents in 720 draws; on average 19.2 cents."

-
And of course you can do this computation by hand as well: the total amount of money you draw is the sum of (the total number of times you draw each coin) * (the value of each coin). This is essentially the same computation as the one I did in my answer. – Qiaochu Yuan Oct 10 '10 at 18:04
@Qiaochu Yuan: Sure, but then you have to do some thinking! Whether this requires more or less effort than writing the computer program depends on who you ask, I guess. :-) – Hans Lundmark Oct 10 '10 at 18:22
If you have SAS here's another code example:data null; cnt=0; tot=0; avg=0; seed=48743; array coins(10) c1-c10 (25, 10, 10, 5, 5, 5, 1, 1, 1, 1); do n=1 to 100000; call ranperk(seed, 3, of c1-c10); cnt+1; tot+sum(of c1-c3); end; avg=tot/cnt; put avg= 5.1; run; – cmjohns Oct 21 '10 at 14:37