|
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.
|
# ¿ Mar 2, 2015 11:05 |
|
|
# ¿ May 12, 2024 18:43 |
|
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.
|
# ¿ Mar 24, 2015 20:35 |