Two Plus Two Poker Forums Generalized Formula for Probability of Combination of Unequal Probabilities
 Register FAQ Search Today's Posts Mark Forums Read Video Directory TwoPlusTwo.com

 Notices

 Probability Discussions of probability theory

 04-23-2017, 09:29 PM #1 DMMx69 old hand     Join Date: Jul 2006 Location: This Mortal Coil Posts: 1,677 Generalized Formula for Probability of Combination of Unequal Probabilities Thread title probably not clear, but this is what I'm looking for: I have 7 coins to flip, each weighted differently: Coin: pHeads (and pTails simply 1-pHeads) A: .54 B: .59 C: .66 D: .50 E: .49 F: .48 G: 45 What is the chance of getting 4 heads? 5 heads? etc.? I can figure this out through (a lot) of multiplication of all the possible combinations, but is there any way to simplify this and generalize the formula for any number of coins, and any set of probabilities? Thanks for any insight.
 04-23-2017, 10:46 PM #2 DMMx69 old hand     Join Date: Jul 2006 Location: This Mortal Coil Posts: 1,677 Re: Generalized Formula for Probability of Combination of Unequal Probabilities I semi-solved this using a ton of rand() functions in Excel and just counting the results. Simple enough to get a close answer after 1MM trials. Still interested in a better math-based answer, however. Thanks.
 04-23-2017, 11:22 PM #3 whosnext Pooh-Bah     Join Date: Mar 2009 Location: California Posts: 3,709 Re: Generalized Formula for Probability of Combination of Unequal Probabilities Here are two links that may be of interest. https://en.wikipedia.org/wiki/Poisso...l_distribution http://forumserver.twoplustwo.com/25...n#post48554345
 04-24-2017, 10:20 AM #4 nickthegeek centurion   Join Date: Sep 2011 Posts: 174 Re: Generalized Formula for Probability of Combination of Unequal Probabilities You asked a similar question some time ago. Actually, it's basically the same thing. You had events with multiple outcomes, while now you have just two outcomes for each event. In any case, you want the sum of them. As BruceZ showed, this is a convolution problem. Luckily, R supports convolution and your problem can be solved defining a one-liner function: Code: ```genUnProb<-function(ph) { setNames(Reduce(function(x,y) convolve(x,rev(y),type="open"),Map(c,1-ph,ph)),0:length(ph)) }``` where the argument ph is a vector with the heads probabilities. Also a one-liner for a simulation: Code: ```genUnProbSim<-function(ph,nsim=100000) { setNames(tabulate(colSums(matrix(rbinom(nsim*length(ph),1,ph),ncol=nsim))+1)/nsim,0:length(ph)) }``` Now we get the results with your values: Code: ```ph<-c(.54,.59,.66,.50,.49,.48,.45) convResult<-genUnProb(ph) simResult<-genUnProbSim(ph) cbind(convResult,simResult) # convResult simResult #0 0.004676563 0.00445 #1 0.038610441 0.03924 #2 0.134457040 0.13646 #3 0.256406970 0.25401 #4 0.289556183 0.29007 #5 0.193854783 0.19301 #6 0.071310213 0.07168 #7 0.011127806 0.01108``` As you can see, there is a good agreement between the convolution and the simulation results (if you run the code, you'll have slightly different values for simulation result of course).

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Two Plus Two     Two Plus Two Magazine Forum     The Best of Two Plus Two     The Two Plus Two Bonus Program     Two Plus Two Pokercast     Two Plus Two Videos     Marketplace         General Marketplace         Staking - Offering Stakes         Staking - Seeking Stakes         Staking - Selling Shares - Online         Staking - Selling Shares - Live         Staking Rails         Transaction Feedback & Disputes     Commercial Marketplace     Staking - Offering Stakes     About the Forums Fantasy Sports     Fantasy Sports         Sporting Events General Poker Discussion     Beginners Questions     Live Casino Poker         Poker Venues         Regional Communities     Poker Goals & Challenges     Books and Publications     Poker Theory     Poker Tells/Behavior, hosted by: Zachary Elwood     News, Views, and Gossip     Twitch - Watch and Discuss Live Online Poker     Televised Poker     Home Poker     Poker Legislation & PPA Discussion hosted by Rich Muny     That's What She Said!     Poker Beats, Brags, and Variance Coaching/Training     Coaching Advice     Cash Game Poker Coach Listings     Tournament/SNG Poker Coach Listings International Forums     Deutsch         BBV [German]     Français     Two Plus Two en Espańol No Limit Hold'em     Medium-High Stakes PL/NL     Micro-Small Stakes PL/NL     Medium-High Stakes Full Ring     Micro-Small Stakes Full Ring     Heads Up NL     Live Low-stakes NL Limit Texas Hold'em     Mid-High Stakes Limit     Micro-Small Stakes Limit Tournament Poker     STT Strategy     Heads Up SNG and Spin and Gos     Mid-High Stakes MTT     Small Stakes MTT     MTT Community     MTTc - Live         WPT.com Other Poker     High Stakes PL Omaha     Small Stakes PL Omaha     Omaha/8     Stud     Draw and Other Poker General Gambling     Backgammon Forum hosted by Bill Robertie.     Probability     Psychology     Sports Betting     Other Gambling Games Internet Poker     Internet Poker         Winning Poker Network         nj.partypoker.com         Global Poker     Commercial Software     Software         Commercial Software         Free Software     nj.partypoker.com         WPT.com 2+2 Communities     Other Other Topics         OOTV         Game of Thrones     The Lounge: Discussion+Review     EDF     Las Vegas Lifestyle     BBV4Life         omg omg omg     House of Blogs Sports and Games     Sporting Events         Single-Team Season Threads         Fantasy Sports     Wrestling     Golf     Pool, Snooker, and Billiards     Chess and Other Board Games     Video Games         League of Legends         Hearthstone     Puzzles and Other Games Other Topics     Politics         Economics     Business, Finance, and Investing     Travel     Science, Math, and Philosophy     History     Religion, God, and Theology     Health and Fitness     Student Life     The Studio     Laughs or Links!     Computer Technical Help     Programming

All times are GMT -4. The time now is 09:38 PM.

 Contact Us - Two Plus Two Publishing LLC - Privacy Statement - Top