Chula! Using all sorts of SAS to simulate and handicap jai-alai games for fun (and profit ???) Steve Grilli Life Office Management Association.

Slides:



Advertisements
Similar presentations
Volleyball.
Advertisements

¡Hola! Vamos a hablar sobre la pelota... Hi, were going to talk about pelota... By 3H Spanish.
Presentation about Jai Alai by guy spriggs. The Serve Each point is started by serving the pelota (ball). The server must bounce the ball behind the serving.
EGR 141 Computer Problem Solving in Engineering and Computer Science
Pelota The Basque game Pelota has 24 versions, one of which is Cesta Punta. The term "cesta punta" is the name of both the game and the lacrosse-like.
GATORBALL.
Overview Reference parameters Documenting functions A game of craps. Design, code, test and document.
Craps (!!) Casino Craps: Strategies for Reducing the Odds Against You - by Robert Roto. June 2014 Get this deck at: tinyurl.com/ovnjy7d.
Standard 12.1 Gambling The Costs and Benefits of Gambling.
Company confidential NCLGS ADDICTION, GAME DESIGN & GAME REVENUE June 7, 2014.
Acevedo Team Sports Unit 3
Jai alai What is it?.
Introduction to Probability and Risk in Financial Investment
Andrew DePriest 4/12/2011 CSCE 390 – 001 Professional Issues in Computer Science and Engineering (Article found in the March 14, 2011 edition of ACM TechNews,
Chapter 7 Estimation Procedures. Chapter Outline  A Summary of the Computation of Confidence Intervals  Controlling the Width of Interval Estimates.
Rating Systems Vs Machine Learning on the context of sports George Kyriakides, Kyriacos Talattinis, George Stefanides Department of Applied Informatics,
Monté Carlo Simulation MGS 3100 – Chapter 9. Simulation Defined A computer-based model used to run experiments on a real system.  Typically done on a.
Black Market Study Sports betting, poker & casino
Basketball  Team Activity  Competitive (both teams are trying to win)  Directly competitive (your performance can affect your opponents performance.
Probabilities of common Games How do I avoid bad bets?
1 TRAINING SESSION ACCEPTANCE SAMPLING CONFIDENCE INTERVALS.
Blackjack: A Beatable Game
Blackjack: Myths vs. Reality Group K Andrew KerrAndrew Phillips Sven SkoogWoj Wrona.
TABLE TENNIS BY NICOLE GALEA. HISTORY OF TABLE TENNIS Table tennis, also known as Ping-Pong is the second most popular game in the world as well as the.
April 2009 BEATING BLACKJACK CARD COUNTING FEASIBILITY ANALYSIS THROUGH SIMULATION.
PING PONG (Table Tennis)
Review of Econ424 Fall –open book –understand the concepts –use them in real examples –Dec. 14, 8am-12pm, Plant Sciences 1129 –Vote Option 1(2)
Line Bias: exploiting gambling line data Mike
Casinos There’s a reason they are big and extravagant!
Sonny Thomas Macdonald SONNY THOMAS MACDONALD 2010 Internet Computing Bsc.
The Game of Tennis The game of tennis can be played as either singles or doubles. The singles game has two participants, two individuals teaming up to.
The Game of TENNIS. Tennis The Game: Tennis is an individual racket sport played on a court divided by a 3’ net. A person can play singles or with a partner.
Miss Acevedo Individual Sports Unit 2- Semester 1
History Of Basketball. Inventor Of Basketball  Dr. James Naismith was born in 1861 in Ramsay township.  The concept of basketball was born from Naismith’s.
Blackjack: A Beatable Game Amber Guo Adapted from: David Parker Advisor: Dr. Wyels California Lutheran University ‘05.
Role of Hubs in Modern Commingling IFHA Monday, 5 October 2009 Paris, France.
Slide 1 of 15 Gambling Next. Slide 2 of 15 How much do you know about gambling? Take the quiz – write your answers in your books.
Copyright © 2011 Pearson Education, Inc. Probability: Living with the Odds Discussion Paragraph 7B 1 web 59. Lottery Chances 60. HIV Probabilities 1 world.
The Elements. The Cards 地 : Earth 水 : Water 火 : Fire 風 : Air 空 : Void/Spirit.
1 10 Statistical Inference for Two Samples 10-1 Inference on the Difference in Means of Two Normal Distributions, Variances Known Hypothesis tests.
By: Holly Straub.  Usually up to eight players, play against the House.
Normal Distr Practice Major League baseball attendance in 2011 averaged 30,000 with a standard deviation of 6,000. i. What percentage of teams had between.
1 Filling in the blanks with PROC FREQ Bill Klein Ryerson University.
VOLLEYBALL TERMINOLOGY. ROTATION Each time a team wins back the serve, all players of that team move one position in a clockwise position. The right.
NEW CHAPTER Circuits and Electronics CHAPTER the BIG idea Circuits control the flow of electric charge. Charge needs a continuous path to flow. Circuits.
Neural Network Implementation of Poker AI
Probability Evaluation 11/12 th Grade Statistics Fair Games Random Number Generator Probable Outcomes Resources Why Fair Games? Probable Outcome Examples.
WOULD YOU PLAY THIS GAME? Roll a dice, and win $1000 dollars if you roll a 6.
GamblingGambling What are the odds? Jessica Judd.
By: Floyd Cooper  One trying to win Each competitor is trying to dribble the basketball to the goal and score.
Jai- Alai (TBp.280) THE FASTEST GAME IN THE WORLD PELOTA VASCA.
PICKLEBALL Springboro Junior High. SERVING The serve must be underhand. Contact must be made below waist/navel level. The ball must be served to the person.
TABLE TENNIS Springboro Junior High. HOW DO YOU PLAY? of-Table-Tennis-Ping-Pong-EXPLAINED.
Copyright © 2011 Pearson Education, Inc. Probability: Living with the Odds Discussion Paragraph 7B 1 web 59. Lottery Chances 60. HIV Probabilities 1 world.
Gambling and probability 1. Odds and football.  Predict the Premier League results for this weekend.  Can you estimate the probability of a win/draw/loss.
The secret of winning The real difference between winners and losers in life – is understanding your chances…
Online Gambling Establishment Malaysia -- Live Gambling Establishment, Betting Online InfiniWin has actually been offering only the finest in gambling.
Writing.
Probability in gambling Lucie Tejessyová. Gambling Games of chances or skills when betting ratios are to bettors disadvantage The best bets – bring the.
How To Avoid Online Casino Scams. Kahnawake Licenses The Kahnawake Gaming Commission is based in the Mohawk territory of Kahnawake, Canada. It issues.
INTRO TO NITRO BALL Background: NitroBall was created in summer of 2005 in Sarasota, Florida. And was first known as “inverted volleyball” Created by Peter.
The Last Class. Class Grades Project 10 is the only thing not yet posted Will be posted by end of classes Working through the last two day’s s Still.
Estimation Procedures
Pari-Mutuel Wagering a mechanism for mass, skill based, contest outcome, wagering January 6th 2017.
Truth tables: Ways to organize results of Boolean expressions.
Truth tables: Ways to organize results of Boolean expressions.
ROULETTE Yasmina, Phoebe, and Roshen.
Blackjack: Counting Hands and Counting Cards
Steve Grilli Life Office Management Association
Presentation transcript:

Chula! Using all sorts of SAS to simulate and handicap jai-alai games for fun (and profit ???) Steve Grilli Life Office Management Association

Presentation Outline Intro: Steven Skiena’s Calculated Bets Jai Alai -- The Game -- The Game -- Betting Terminology -- Betting Terminology -- Pari-mutuel Wagering -- Pari-mutuel Wagering -- How Games are Scored -- How Games are Scored Using SAS to Engineer the System -- Simulating Games -- Simulating Games -- Parsing Internet Files -- Parsing Internet Files -- Bet Selection Analysis -- Bet Selection Analysis SAS and Selected Research Issues -- Confidence Limits on small proportions -- Confidence Limits on small proportions -- “Hot hands” and players’ skill levels -- “Hot hands” and players’ skill levels -- Modelling mean payouts -- Modelling mean payoutsConclusions

DISCLAIMER “Fun” SAS application Not advocating gambling ! ! ! Internet gambling is considered illegal by US Dept. of Justice, and State of Georgia ! ! !

THE BOOK Calculated Bets: Computers, Gambling, and Mathematical Modeling to Win by Steven Skiena by Steven Skiena Professor of Computer Science Professor of Computer Science SUNY Stony Brook SUNY Stony Brook (Cambrigde University Press and Mathematical Association of America, 2001)

THE GAME OF JAI ALAI Originated in the Basque Region Originated in the Basque Region Players use a “basket” (cesta) to fire a hard ball (pelota) against a wall. Players use a “basket” (cesta) to fire a hard ball (pelota) against a wall. Must be caught and returned on the fly or one bounce Must be caught and returned on the fly or one bounce In U.S. eight players or doubles teams rotate In U.S. eight players or doubles teams rotate Pari-mutuel gambling allowed at fronton and off- site betting establishments Pari-mutuel gambling allowed at fronton and off- site betting establishments

BETTING TERMINOLOGY Money goes into POOLS Win, Place, Show Win, Place, Show Quinella Quinella Exacta (Perfecta) Exacta (Perfecta) Trifecta Trifecta

PARI-MUTUEL WAGERING Different from casino games where you play against the house Different from casino games where you play against the house No fixed odds No fixed odds Fronton (Jai Alai Stadium and its operators) take a cut of each pool off the top Fronton (Jai Alai Stadium and its operators) take a cut of each pool off the top Quite high (over 20%) Quite high (over 20%) Good news: they don’t care who wins Good news: they don’t care who wins More that’s wagered, the more the fronton makes More that’s wagered, the more the fronton makes

How Games Are Scored Eight players (or double teams) Eight players (or double teams) Color-coded Posts 1-8 Color-coded Posts 1-8 Player 1 serves to Player 2 Player 1 serves to Player 2 Winner of point stays on the court Winner of point stays on the court Loser goes to the end of the line Loser goes to the end of the line Next player in the queue takes the court Next player in the queue takes the court First time through rotation points worth one First time through rotation points worth one After all 8 players have taken the court points worth two After all 8 players have taken the court points worth two Games played to 7 or 9 points Games played to 7 or 9 points

Simulating Games 1: What Do We Need?  A basic player skill measure: Point- win Percentage (PTWPER)  A probability function that generates the probability that Player A with PTWPER-A wins the point against Player B with PTWPER-B

Simulating Games 2: The Probability Function Alpha is the key Alpha is the key Ex: Player A PTWPER = Player B PTWPER = Player B PTWPER = Alpha= 1.0; A wins 52.5% Alpha= 0.4; A wins 65.1%

Simulating Games 3: SAS Code /* simulate winner */; /* simulate winner */; do until(win gt 0); do until(win gt 0); pt+1; pt+1; alpha=&alph; alpha=&alph; if wper(Op1) ge wper(Op2) then if wper(Op1) ge wper(Op2) then winop12=.5*(1 + (wper(Op1)- wper(Op2))**alpha); winop12=.5*(1 + (wper(Op1)- wper(Op2))**alpha); else winop12=.5*(1 - (wper(Op2)- wper(Op1))**alpha); else winop12=.5*(1 - (wper(Op2)- wper(Op1))**alpha); if ranuni(0) lt winop12 then do; if ranuni(0) lt winop12 then do; Ppt(Op1)+1; Ppt(Op1)+1; Ppt(Op2)+1; Ppt(Op2)+1; Pptw(Op1)+1; Pptw(Op1)+1; q(pt+6)=Op2; q(pt+6)=Op2; Op2=q(pt); Op2=q(pt); if pt le 7 then Sc(Op1)+1; if pt le 7 then Sc(Op1)+1; else Sc(Op1)+2; else Sc(Op1)+2; if Sc(Op1) ge game then do; if Sc(Op1) ge game then do; win=Op1; win=Op1; Sc(Op1)=-1; Sc(Op1)=-1; end; end; else do; else do; Ppt(Op1)+1; Ppt(Op1)+1; Ppt(Op2)+1; Ppt(Op2)+1; Pptw(Op2)+1; Pptw(Op2)+1; q(pt+6)=Op1; q(pt+6)=Op1; if pt le 7 then Sc(Op2)+1; if pt le 7 then Sc(Op2)+1; else Sc(Op2)+2; else Sc(Op2)+2; if Sc(Op2) ge game then do; if Sc(Op2) ge game then do; win=Op2; win=Op2; Sc(Op2)=-1; Sc(Op2)=-1; end; end; Op1=Op2; Op1=Op2; Op2=q(pt); Op2=q(pt); end; end; end; end;

Simulating Games 4: Some SAS Output GAME 6 GAME 6 PTWPER GACT TEAM POST PTWPER GACT TEAM POST JAIRO-LARREA JAIRO-LARREA LECUE-CHASIO LECUE-CHASIO TOTO-MADARIETA TOTO-MADARIETA SCOTTY-ERKIAGA II SCOTTY-ERKIAGA II OCHOA-PEDRO OCHOA-PEDRO OLATE-CARVALHO OLATE-CARVALHO BARRE-AZPIRI BARRE-AZPIRI ARECHA-URTARAN ARECHA-URTARAN 8

Simulating Games 4: More SAS Output The FREQ Procedure The FREQ Procedure Cumulative Cumulative Cumulative Cumulative EX Frequency Percent Frequency Percent EX Frequency Percent Frequency Percent

GAME 6 EXACTA SELECTIONS GAME 6 EXACTA SELECTIONS GDATE GTIME GM GT GPTS TYP SEL PR RET GDATE GTIME GM GT GPTS TYP SEL PR RET EVE 6 D 7 E EVE 6 D 7 E EVE 6 D 7 E EVE 6 D 7 E Simulating Games 5: Bet Selection

Parsing Internet Files: Results Files GAME 6 GAME 6 2 Lecue-Chasio Lecue-Chasio Jairo-Larrea Jairo-Larrea Ochoa-Pedro Ochoa-Pedro 3.80 QUINIELA QUINIELA EXACTA EXACTA TRIFECTA TRIFECTA SAS FUNCTIONS INDEX () INDEX () SCAN () SCAN () Also, conditional input statements Also, conditional input statements

Bet Selection Analysis GAME 6 ANALYSIS OF RET CUTOFFS GAME 6 ANALYSIS OF RET CUTOFFS RET N MEANPROF PERCOR TPROF COR LOWER UPPER RET N MEANPROF PERCOR TPROF COR LOWER UPPER

System Structure Summary Parse entries.txt file from fronton website Parse entries.txt file from fronton website Simulate games; select bets Simulate games; select bets Parse entry changes.txt file; resimulate any games with changes Parse entry changes.txt file; resimulate any games with changes Finalize bets Finalize bets Parse results.txt file Parse results.txt file Update SAS data sets (PTWPER, Mean Payouts, et. al.) Update SAS data sets (PTWPER, Mean Payouts, et. al.)

Research 1: Confidence Interval on Small Proportions 95% Jeffreys interval: LOWER=BETAINV(.025,COR+0.50,N-COR+0.50); LOWER=BETAINV(.025,COR+0.50,N-COR+0.50); UPPER= BETAINV(.975,COR+0.50, N-COR+0.50); UPPER= BETAINV(.975,COR+0.50, N-COR+0.50);

Research 2: “Hot Hand” and Player Skill Estimation Statisticians still argue about the existence of streaks in sports Statisticians still argue about the existence of streaks in sports If we had actual point-win data, we can conduct research If we had actual point-win data, we can conduct research Use GEE option in PROC GENMOD Use GEE option in PROC GENMOD Use PROC FACTOR to build a weighed index of long and short term PTWPER Use PROC FACTOR to build a weighed index of long and short term PTWPER

Research 3: Improving the Estimate of Mean Payout

CONCLUSIONS SAS works for the three major areas of this type of gaming application: parsing internet files, simulation of the games, and analysis & research Profit? System is still under construction, but profitable in terms of personal development as statistician and SAS programmer