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,678 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,678 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,895 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 https://forumserver.twoplustwo.com/25...n#post48554345
 04-24-2017, 10:20 AM #4 nickthegeek centurion   Join Date: Sep 2011 Posts: 189 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 Links to Popular Forums     News, Views, and Gossip     Beginners Questions     Marketplace & Staking     Casino & Cardroom Poker     Internet Poker     NL Strategy Forums     Poker Goals & Challenges     Las Vegas Lifestyle     Sporting Events     Politics     Other Other Topics Two Plus Two     About the Forums     Two Plus Two Magazine Forum     The Two Plus Two Bonus Program     Two Plus Two Pokercast     The Best of Two Plus Two Marketplace & Staking     Commercial Marketplace     General Marketplace     Staking - Offering Stakes     Staking         Staking - Offering Stakes         Staking - Seeking Stakes         Staking - Selling Shares - Online         Staking - Selling Shares - Live         Staking Rails         Transaction Feedback & Disputes     Transaction Feedback & Disputes Coaching & Training     Coaching Advice     Cash Game Poker Coach Listings     Tournament/SNG Poker Coach Listings Poker News & Discussion     News, Views, and Gossip     Poker Goals & Challenges     Poker Beats, Brags, and Variance     That's What She Said!     Poker Legislation & PPA Discussion hosted by Rich Muny     Twitch - Watch and Discuss Live Online Poker     Televised Poker     Two Plus Two Videos General Poker Strategy     Beginners Questions     Books and Publications     Poker Tells/Behavior, hosted by: Zachary Elwood     Poker Theory     Psychology No Limit Hold'em Strategy     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 Strategy     Mid-High Stakes Limit     Micro-Small Stakes Limit Tournament Poker Strategy     STT Strategy     Heads Up SNG and Spin and Gos     Mid-High Stakes MTT     Small Stakes MTT     MTT Community Other Poker Strategy     High Stakes PL Omaha     Small Stakes PL Omaha     Omaha/8     Stud     Draw and Other Poker Live Poker     Casino & Cardroom Poker         Venues & Communities         Regional Communities     Venues & Communities     Tournament Events         WPT.com     Home Poker     Cash Strategy     Tournament Strategy Internet Poker     Internet Poker         Winning Poker Network         nj.partypoker.com         Global Poker     Commercial Software     Software         Commercial Software         Free Software General Gambling     Backgammon Forum hosted by Bill Robertie.     Probability     Sports Betting     Other Gambling Games 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     Fantasy Sports         Sporting Events     Wrestling     Golf     Chess and Other Board Games     Video Games         League of Legends         Hearthstone     Puzzles and Other Games Other Topics     Politics     History     Business, Finance, and Investing     Science, Math, and Philosophy     Religion, God, and Theology     Travel     Health and Fitness     Laughs or Links!     Computer Technical Help     Programming International Forums     Deutsch         BBV [German]     Français     Two Plus Two en Espańol

All times are GMT -4. The time now is 01:08 AM.

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