Author Topic: Bridge Points Count Probabilities (original error found)  (Read 6311 times)

0 Members and 1 Guest are viewing this topic.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Bridge Points Count Probabilities (original error found)
« Reply #15 on: March 17, 2019, 06:02:59 pm »
Hi guys
in what manner do you combine the combination https://en.wikipedia.org/wiki/Combination#Example_of_counting_combinations (that has its mathematical weight) with the empiric simulation and probabilities on this limited set of hands?

as you can see at Example of counting combinations paragraph of the above  wikipage the question of probabilities of a score in 13 cards in single hand is the same for each score because each card is a single indipendent event with no duplication (you cannot have the same card twice in the same hand of the game of bridge)....

52!/ 13!*39!  = 52*51*50*.....41*40* 39!/13! * 39! =  52*51*50*.....41*40 / 13!

and here the code starts to configure a probability calculator of statistical combination  of indipendent events (13 cards of an hand) of a set of events (52 cards to 4 players)

Code: QB64: [Select]
  1. _TITLE "calcolo di eventi indipendenti autoesclusivi"
  2. CLS , 3
  3. COLOR 4, 3
  4. PRINT "We must know how much is the chance of an indipendent event in combining with other indipendent events of the same nature"
  5. INPUT "Please enter the total number of cases (52 cards?) ", NumTotalPossible%
  6. INPUT "Please enter the total number of cases to be to get goal (how cards need to have event?)", NumCasesUseful%
  7. chance = 1
  8. chance2 = 1
  9. FOR i% = 0 TO NumCasesUseful% - 1 STEP 1
  10.     chance = chance * (NumTotalPossible% - i%)
  11.     chance2 = chance2 * (i% + 1)
  12.     LOCATE , 2
  13.     PRINT i%, chance, chance2
  14.     _DELAY .1
  15. LOCATE , 2
  16. PRINT "press a key to continue"
  17. LOCATE 16, 1
  18. PRINT " For total events "; NumTotalPossible%; " and Useful events "; NumCasesUseful%
  19. PRINT " you have number of events:", chance
  20. PRINT "chance to get this combination:", chance / chance2
  21. chance = chance / chance2
  22. FOR i% = 1 TO NumCasesUseful% + 1 STEP 1
  23.     IF chance < 0 THEN chance = chance * 10
  24. PRINT "this means that you must put "; STR$(i%); "zero after 0. to write this number"
  25. PRINT "like here..."
  26. PRINT "0."; STRING$(i%, "0"); "1"
  27.  

In the statistical world the events are infinite and each single event is equal in amount of presence as we talk about indipendent events.
 In what manner can your probabilities, got on a large (at our eyes) but little champion of events,  be useful in the choice of strategy of the game?
Thanks for feedback
Programming isn't difficult, only it's  consuming time and coffee