For the first part of your math, YC has spent at least 1.5 million (~300 founders * 5000). Team sizes vary, but if we hold them at 3 members, we get another half mil. So by my very back of the envelope calculations they've invested about $2 million.
We need to add another 100 ghost founders to account for the extra $5,000, so that makes it: ~350 founders x $5,000/founder = ~$1.75 million invested, so far.
Y Combinator has (I personally believe, but do not necessarily know to be true) additionally sunk capital investment into:
* Beans and rice
* A building and associated land in Boston
* A building and associated land in Mountain View
* Utility bills
* Travel expenses
* Legal fees (including 102 incorporation-fee packages)
* Accounting fees
* Misc.