Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
point of return
Aug 13, 2011

by exmarx

fosborb posted:

Thanks, yeah I was definitely over thinking it. At the same time, the actual request was something like "what's the distribution if I draw 4 cards? or 5? or 6?" and while the underlying math remains the same, I think I prefer the "iterate 100,000 tests" method to more quickly play with the number and value of cards.

If you want to compute it exactly for 4 or 5 or 6 cards your best bet is polynomials. If you have a set of cards, each with value mi, then the elementary symmetric polynomial ek(Xm1,Xm2,...,Xmn-1,Xmn) will be the sum of Xt for every possible choice of t, and then you can just divide by the value at X=1(which is just a binomial coefficient C(n,k)) and get probabilities.

This seems like it's just a restatement of the problem, but Newton figured out how to go between that form and the power sums, which are very straightforward to compute in the given case; you wouldn't necessarily want to do this by hand but there are computer libraries like numpy that should have polynomial multiplication algorithms, etc.

Adbot
ADBOT LOVES YOU

point of return
Aug 13, 2011

by exmarx

PresidentBeard posted:

Speaking as a fat person, the entire fat acceptance movement is terrible and not worth saving. The idea of being nicer to fat people to help them lose weight has been entirely consumed (heh) by the people who want everyone to praise them for being tubs of mobile lard.

The movement is because dieting itself has been shown to be dangerous more often than not.

  • Locked thread