Showing posts with label Gambling. Show all posts
Showing posts with label Gambling. Show all posts

Sunday, October 27, 2024

Book Review: On the Edge, The Art of Risking Everything

(Image: https://www.penguinrandomhouse.com/books/529280/on-the-edge-by-nate-silver/)


I just finished Nate Silver's latest book and asked Gemini to summarize the mathematical, sports gambling and poker elements of the book.

Nate Silver's On the Edge is a fascinating exploration of risk-taking, particularly through the lens of mathematics, sports gambling, and poker. Silver, renowned for his statistical analysis and predictive modeling, delves into the world of high-stakes decision-making, examining how individuals and institutions can gain an edge.

A significant portion of the book is dedicated to the world of poker, a game where skill and probability intersect. Silver dissects the intricacies of poker strategy, highlighting the importance of understanding pot odds, implied odds, and the concept of expected value. He also explores the psychological factors that influence decision-making under pressure, drawing parallels to other high-stakes endeavors.

While the book touches on various aspects of risk-taking, its focus on mathematics and probability provides a rigorous framework for understanding uncertainty. Silver's ability to translate complex statistical concepts into accessible language makes the book engaging for both seasoned data enthusiasts and casual readers.

Ultimately, On the Edge is a thought-provoking exploration of the human capacity for risk and reward. By examining the strategies and mindsets of successful risk-takers, Silver offers valuable insights for anyone seeking to make better decisions in a world full of uncertainty.

In summary, I recommend the book. As I read it, I thought that readers not familiar with poker or sports gambling might get lost in some of the analogies that Silver outlines. However, he included an expansive glossary in the book to explain the terms he uses throughout the book.

Friday, February 11, 2022

Different Types of Odds When Placing a Bet

 



At the time of this post, we are entering the weekend of Superbowl LVI with the Cincinnati Bengals will be playing the Los Angeles Rams at the new Los Angeles stadium (SoFi stadium).  I looked up the odds for wagering on the game and found the following breakdown (at of 2/11/2022 – game to be played 2/13/22).


The first column listing the Spread, has LA at -4 and Cincinnati at +4 (to win an even money bet on LA, they have to win by more than 4 points). The second column listing To Win, has LA at -200 and Cincinnati at +170. The third column lists the over/under as 48.5 (an even-money bet based on the total score).

For those readers who have not made a sports bet but have only gambled in a casino, one might wonder how to translate the odds posted above to those you might see on casino table games such as 2 to 1, 3 to 1, etc.

If one has only been to a US horse racetrack where the odds are posted on a tote board, the amount posted is the total amount returned to a winning bettor based on a $2.00 bet. This is a different system than the football and casino examples above.

There are even more systems of expressing odds when gambling. There is a system called European odds, where the odds offered for your bet is the total value paid to you including your original bet. So, if you won on 1.80 odds, and you bet $10, you would be given a total of $18.00. This would be example of betting on the favorite, while odds higher than 2.0 would be those offered for the underdog.

Going back to our example of the US Superbowl LVI, the middle column is referred to the Money Line (Ram -200, Bengals +170). For the Rams’ bet one has to wager $200 to profit $100 if the Rams win or wager $100 to profit $170 if the Bengals win.

Consider converting these to the other odds-expression methods.

On the website Bet New Jersey, there is an informative site that explains the difference in the various odds expressions. It had an “odds converter” for expressing the equivalent odds statements in different methods. Entering “-200” for the Rams, the odds converter gives us the following conversions:

US Money Line: -200

Decimal (European): 1.50

Fractional (British): ½

Probability: 66.67%

The other two columns from the table at the top of the post, Spread and Over/Under, can't be directly converted to the various odds above. However, generally, the more a team is favored, the higher the Spread will be. Independent of that, the Over/Under line will be made by the oddsmakers based on balance of the combined offenses and defenses of both teams.

Since we were discussing American horseracing tote boards earlier, based on a $2 wager, if one enters a $2 bet, the payoff would be $3 (the original $2 bet plus the $1 profit).

Fraction to Decimal Odds Conversion (racing-index.com)

How to Read Odds | Understanding Odds Types, Conversions & Chances (bet-nj.com)

Update 2/13/2022 - Today the Los Angeles Rams won the Superbowl 23-20. In sports betting terms, the Rams didn't cover (the spread of -4) so even-money bettors wagering on the Rams loss while money-line (Rams -200) bettors on the Rams won 100 for every 200 wagered.

 

 

Sunday, February 6, 2022

The Kelly Betting Criterion

 


Imagine you are gambling and find out that you have an edge on the game. For instance, say you are betting on the outcome of a coin flip which is usually a 50% heads / 50% tails proposition, but in this case, you have knowledge that the coin being flip will show heads 60% of the time, and tails just 40%. If given these facts, one might want to put everything that have on heads. The downside of such a strategy, is there is still a 40% chance you might go bankrupt on the first flip.

Given the known advantage you have, if you take the opposite extreme where you wager just a small portion of your bankroll to be safe, you’ll avoid bankruptcy, but you’ll also fall short of the optimal profit you might make over the long run.

This problem of optimizing profit was recognized going back to beginning of probability theory in the 18th century when Daniel Bernoulli suggested that when one has a choice of a series of bets or investments, one should choose that with the highest geometric mean of outcomes.

Move forward to the 20th century, Bell Labs researcher, J. L. Kelly, Jr., formalize this strategy in establishing the Kelly Criterion (also known as the Kelly Bet or Kelly Strategy).

The strategy to optimize the long-term outcome, is with each bet to a certain fraction of your total bankroll. This fraction (f) is given by the formula:

f = p – q/b,

Where f is the fraction of the current bankroll to wager,
p is the probability of winning
q is probability of losing, and
b is proportion of the bet gained with a win (the odds being offered)

In our example with the dishonest coin flipping, p=0.6, q=0.4, b=1

f = 0.6 – (0.4/1) = 0.2

So, our first bet would be wagering 20% of our bankroll. If we won the first bet, our next wager would be adjusted higher to reflect the new, higher bankroll. Or, if we lose the first bet, our next wager would be lowered because our lower bankroll.

If you enter a casino, where with very few exceptions, you don't have an advantage, the fraction, f, is zero or negative - meaning you shouldn't wager anything. 

Interestingly, there are applications beyond gambling where this strategy is used. Warren Buffett and other well-known investors used this strategy in allocating their investments.

There is a good video by Adam Kucharski that also explains some applications of the Kelly Bet: (1584) How Science is Taking the Luck out of Gambling - with Adam Kucharski - YouTube

The website, Wizard of Odds, has a page on the Kelly Criterion and has the results of some simulations based on the criterion. https://wizardofodds.com/gambling/kelly-criterion/


Uncle Billy Magic Card Trick

 

Give your guest(s) for whom you are demonstrating the magic a standard deck of 52 cards. Instruct them to shuffle the cards.

Construction of piles

Ask your guest to deal the first card face up. If the card is a 10 or face card, return the card to the bottom of the deck. For any other card, Ace to 9, have them deal additional cards face up on the first card. The number of cards added equals 10 minus the value of the first card. So, if the first card is 8, 2 additional cards should be added to that pile. If the first card is an Ace, count it as a one and add nine cards face up to its pile.


An 8 was dealt, so 2 more cards were added (10 - 8 = 2)


A king was dealt so it was returned to the deck.


Once you see your guest understands the construction of the piles, you can turn your back and allow them to continue the process until they have used all the cards in the deck. Your guest should be able to construct about eight piles (could be more or less depending on the starting cards). Note, your guest might be left with a few unused cards as they reach the end of the deck. Ask them to return these cards to you.

Nine piles were constructed in this example.

Two cards were left over unused. Returned to magician.

All the piles are turned over face down. Their original starting cards should now be on top.


Selection of three piles

The next step, while you are still facing away from your guest, ask them to turn over all the piles so each is face down and each pile’s first card should now be on top, also face down. Ask your guest to select any three of the piles and to collect all the cards from the unselected piles and return these cards to you.

The three selected piles on top and all the other cards returned to the magician.

From the stub of cards (the few unused cards from the pile construction and the unselected piles) you have, count off 19 cards and hand these cards to your guest. Instruct your guest to distribute the 19 cards to the bottom of the three selected piles. They can be distributed in any method. Explain that the purpose of this step is so one cannot view a pile and guessing what the top card is by estimating the size of the pile.

19 cards returned to the guest.

The 19 cards are split between the 3 piles and placed on the bottom of the piles.

The 3 piles straightened up.


Completing the trick

You can now face your guest (but you could also continue the trick with your back turned). Ask your guest to pick one pile. Your job will be to determine the value of that pile’s top card. Ask your guest to reveal the other top card of the other top piles. From you remain stub of cards, count off a number of cards equal to the sum of the two exposed cards. Now count the number of cards remaining in the stub and that will be the value of the unexposed card. Have your guest turn it over to confirm the answer.

Two top cards exposed, and a matching number of cards dealt off (five cards for the 5, two for the 2)

Three cards remain with the magician, and so it is announced the unexposed card is a 3.

Confirmation of the trick.


How does it work

We need to complete a reconciliation of the deck’s 52 cards, to show that number of cards remaining in the stub, X, will equal the value of the unexposed top card of the final pile.

52         Starting Deck

-3          The three top cards of the three selected piles

-19        The 19 cards you counted off the stub

-20        For the two exposed piles, let the top card values be A and B. For each pile's construction, (10 - A) and (10 – B) cards were first added to those piles. Then, at the end of the trick you summed A and B and counted off those cards. So (10 – A) + (10 – B) + A + B = 20.

52 – 3 – 19 – 20 = 10 cards remaining to reconcile. As we did above, let X be the number of cards remaining in your stub. Therefore, the number of cards originally under the hidden card is (10 – X). This number plus the value of the unexposed card is also 10 as that is how the original pile was constructed. So, we have (10 – Value of top card) = (10 – X), therefore X = Value of the top card.

I learned this trick from my uncle Billy, William Young. He was a great sports handicapper and worked with Jimmy (The Greek) Synder for many years - Jimmy Snyder (sports commentator) - Wikipedia. Sports bettors and other gamblers have to be mindful of the Kelly Bet Criterion discussed in this other post - Math Vacation: The Kelly Betting Criterion (jamesmacmath.blogspot.com).

 

 

Friday, July 23, 2021

Magic Trick with Dice



Set-up:

Give your friend three dice. Turn your back and ask your friend to roll the dice. Without seeing the result, ask your friend to sum the total of the three dice. 

Next - again, you are not looking - ask that one of the three dice are turned upside down. Ask that your friend add that result to the prior sum. For example, if the outcome of the first roll was one, two, three, the sum would be six. Your friend chooses the die showing one and flips it over to expose a six and adds this to the sum so now the sum is twelve.

Next, ask your friend to roll the chosen die again and add that result to the sum. For example, if the re-rolled die results in a three, the new sum is fifteen. 

Now, have your friend show you the three dice in their present condition (three dice showing two, three, and three). You don't know which die was re-rolled but you quickly announce the final sum is fifteen.

Your instructions:

When your friend shows you the final outcome of the three dice, add those three dice results together and simply add seven. In the example given, the final result was two-three-three which totals eight; add seven, the total is fifteen. 

How does this work?

Opposite sides of a six-faced die always add up to seven. The one and six are on opposite sides, as are the two and five, and the three and four.

While you don't know which die was re-rolled, you know that the die had two sides added to the running sum that add up to seven. The other two dice were not changed so their numbers are shown to you at the end. The re-rolled die, even though you don't know which one it was, is shown to you in the final result. The only result missing is the original result of the chosen die and the it's opposite side. But since these two numbers always add up to seven, you can assume that seven has to be added to the result of the sum of the three dice shown to you to know your friend's final running total.

A visual demonstration of this trick is presented by Numberphile: Three Dice Trick - Numberphile - Bing video



Saturday, May 30, 2020

Counting Prime Numbers


(Design vector created by freepik - www.freepik.com)
Imagine challenging a fellow mathematics fan to a friendly bar bet in which the person who best estimates the number of prime numbers found between a range of two given numbers wins a drink. Let your friend pick the first number and you will pick the second number. A list of prime numbers up to 10,000,000 is available here for you to check your answers. 

What do you have to know?
You won't have to remember lengthy lists of prime numbers to win your bet. You just have to remember two numbers: 165 and 72.

After your friend suggests the first number, add 165 to get the second number of the range. To get your estimate, round the top number of the range to the nearest power of ten. Divide 72 by the number of zeros in the rounded number and this will be your estimate. So if your friend suggests 1000 for the first number, you'll state the second number will be 1165. Rounding 1165 to the nearest power of ten is 1000. Dividing 72 by 3 - the number of zeros in 1000 - yields an estimate of 72/3 = 24.

Going to the above link, if we count the number of primes between 1000 and 1165, we find the following primes: 
1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093, 1097,1103,1109,1117,1123,1129,1151,1153,1163. The count of actual primes is 24, matching your estimate.

Here's another example. Your friend picks 1 as the starting number; you add 165 so the final number is 166. Rounding 166 to the nearest power of 10 is 100. Divide 72 by 2 (the number of zeros in 100) and your estimate is 36.

Referring to the link above the the primes between 1 and 166 are: 
2, 3, 5, 7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101, 103,107,109,113,127,131,137,139,149,151,157,163. The actual count is 38. Your estimate is still very close and probably closer than what your friend could estimate or count in a quick period of time.

How does this quick estimation work?

The key to this trick is the prime number theorem which states the number of primes less than a given number, n, is approximately: n/ln(n). Alternately, we can say the relative frequency of primes near n is 1/ln(n). Note: the prime-counting function is also discussed in another post: Math Vacation: The Frequency of Prime Numbers – The Prime Number Theorem (jamesmacmath.blogspot.com).

Our estimate used the nearest power of 10 as a starting point. Counting zeros in a number that is a power of ten is the same as taking the log(base 10) of that number. Log(100) = 2, Log(1000) = 3, Log(10000) = 4 etc. The prime number theorem uses ln(n). Converting from log(n) to ln(n) is a factor of 2.3.

The prime number theorem stated the relative frequency of primes near n is 1/ln(n), so our estimate for a range of 165 should be 165/ln(n). Converting from log(n) to ln(n), our estimate becomes 165/(2.3 log(n)) or approximately 72/log(n). The range of 165 was chosen so we would end up with 72 in the numerator. Since 72 is easily divisible by many numbers, your estimation task is a little easier. 

A prior post wrote about the "Rule of 72" for quick approximations of compound interest. Now you have 2 uses of the number 72 to make quick estimations.

Credit is given to Grant Sanderson's site, 3b1b, for inspiring this trick. More on the natural logarithm is given here by Grant: 

https://www.3blue1brown.com/videos-blog/what-makes-the-natural-log-natural-lockdown-math-ep-7.

1679 - One important message sent from Earth 31 years ago

In 1974 an interstellar radio transmission was broadcast to the  globular cluster   Messier 13   from the Arecibo radio telescope in Puerto ...

Popular in last 30 days