Originally posted by jjgold
Math/Betting Question
Collapse
X
-
ChuckyTheGoatBARRELED IN @ SBR!- 04-04-11
- 38265
#71Gaming shape? As in square?Where's the fuckin power box, Carol?Comment -
flocko76SBR MVP
- 10-01-10
- 1447
#72Deemer won't be back.Originally posted by zizoudane10Use the numbers 2, 3, 4 and 5 and the symbols + and = to make a true equation Deemer.
your answer is 3 squared = 4+5. It works writing it on paper.Comment -
BigDeem5SBR Posting Legend
- 02-26-11
- 17191
#73
Comment -
artyfudgepackerSBR MVP
- 01-06-13
- 2205
#74
Originally posted by SamDiamondFuk the iPhone.
Isn't he a chinaman?
He should be able to do that sleeping.Comment -
Chi_archieSBR Aristocracy
- 07-22-08
- 63182
#75Originally posted by jjgoldDeemer you might have to leave site
This was real bad
I am embarrassed

Think Tank???
paging Ganch, Durito, RickySteve, and MonkeyF0cker... I need to know how much i'd make a year delivering Chinese food if I make $400 a weekComment -
allin1SBR MVP
- 11-07-11
- 4555
#77He did posted in the think tank, it was moved, but there is still a link there to it.Originally posted by opie1988Only way this could have been any better is if he ACTUALLY posted this in the Think Tank
I'm sure those guys would've enjoyed it
Comment -
Chi_archieSBR Aristocracy
- 07-22-08
- 63182
#78yeah the thread is in the think tank (moved/s-linked by a mod to be funny i'm sure)Originally posted by allin1He did posted in the think tank, it was moved, but there is still a link there to it.
right below a thread with this opening post....
Originally posted by ljump12I'm writing this post to serve as an intro into using computers for sports betting. Programming isn't as hard as most people think, and the basic skills can be picked up on a weekend. This will be by no means an extensive resource, but will rather be a brief introduction. It is my belief that the best way to beat the books is with extensive research and backtesting. What is taught here will not give you the answers, there are no 20*play GOTY locks in this thread, only the tools that will allow you to succeed. Also note this is very much a work in progress, I will post new sections as I write them. If you have suggestions, would like to contribute etc. etc. just post!
Sections:
1) Intro to programming (Taught in Python)a) What you need to get started2) Intro to excel
b) Basics of programming
c) Basics of data input & output
d) How to scrape the internet for data
e) How to manipulate the data for excel
a) How to load in data files3) Intro to standard wagering ideas
b) What can be done in excel
a) ArbitragePython is one of many programming languages, and it allows us to work gather,manipulate and apply data. I believe Python is the best language for a beginner to learn becuase it reads like english, but is still extremely powerful.
b) Kelly Criterion
Section A) What you need to get started..
Since you're reading this thread i'll assume you have a computer. Python is a platform independent scripting language, which means that it *should* run the same across different operating systems [Windows, Mac, Unix etc]. For this tutorial, i'm going to assume you have Mac/Linux becuase that is what I'm familiar with. However, it should be pretty easy to generalize to Windows.
Downloading Python
If you're on windows you will need to download Python and Idle [ http://www.python.org/download/ ]
Get version 2.6.* -- don't get version 3. A lot has changed in version 3, and most old code is not supported, making it a pain in the ass. Trust me on this. Version 2.6.* is what you want.
Good news, If you're on Mac or Linux, you probably already have python!
Open up terminal [Mac users hit apple+space to bring up spotlight, and type in terminal].
Type in "python -V" and press enter. It should tell you which version of python is installed. Even if it's not version 2.6.*, it will probably still do, as long as it's > 2.3 and < 3.0
Writing Python Programs
Python programs should be writted in a text editor, in a monospaced font...
Windows Users: There's a good editor called "notepad++" google it. Alternatively when you download python it will come with an editor. You could use that...
Mac Users: I like a program called "TextMate", though you need to pay for it. There's probably a free trial somewhere.
Section B) Basics of Programming..
Learning Python:
I could type up a basic tutorial in python, but i'd be reinventing the wheel. John wrote a great introduction to programming that you can find here: http://books.google.com/books?id=aJQ...age&q=&f=false
I'd suggest you read this through. Read at least the first 4 chapters. Spend a day and DO THE EXAMPLES. The only way to learn programming is by doing. It's really not hard stuff, it just takes some time to get the basics. Again, don't just read it or you will learn nothing. Take some time and practice practice practice. You can post questions or snippets of code in this thread if you're having problems. I'm sure I, or someone else can find and fix your problem.
Section C) Basics of data input & output..
If you have gotten to this point, you should already know the basics of python. You should know what an "if statement" is, what a "for loop" is, and how to print "Hello World!".
In general the tasks we are trying to do with python will either be taking data from excel and manipulating/running tests on it, or getting data from the internet, and writing it to an excel file for easier access. We can do both with python! Excel takes in what is known as a "CSV" or comma separated file, and displays it in spreadsheet format, so all we have to do is have our python program output a file that is comma separated -- and we can load it right into excel.
Let's start with a simple example. I have uploaded a .csv file to my website, it contains MLB game information for a single day. Download and save this file into the same directory that your python script will run from. If you open the file in excel, you will get a better idea of what is inside it. You'll find the file here: http://atbgreen.com/mlb_ex_1.csv
[Opening and Reading a .csv File]
Save and run the code. I've commented it generously so you can tell exactly whats going on. It looks long, but it's only becuase i've tried to make it as clear as possible. If I wanted, i could compress the code into 3 lines -- but it's not nearly as easy to understand.PHP Code:## Created on 4/1/10 ## This example should shows how to open and read a .csv file. ## ## Notes: The file mlb_ex_1.csv should be downloaded and in the same folder ## .. as this scrpt ## Tell python to import the .csv module, becuase we will be reading a .csv import csv ## First we need to open the file mlb_file = open("mlb_ex_1.csv","r") ## Open the MLB .csv file for reading ## Now we need to tell python to read it as a csv file ## We are opening the mlb_file as defined above, it is deliminated by commas, ## and our quote characted is a regular quote (") mlbReader = csv.reader(mlb_file, delimiter=',', quotechar='"') ## Grab the first line, becuase it is the headers.. headers = mlbReader.next() ## It's now time to iterate through the file row by row... for row in mlbReader: ## Let's try and only print the Over/Under Line, and the actual runs scored ## .. in the game. If you look at the .csv in excel you will see these are ## .. in the 6 & 7 columns. But since the computer starts counting at 0, ## .. we would say they are in the 5th and 6th columns ou_line = float(row[5]) ## This should be a float, becase it can be .5 runs_scored = int(row[6]) ## This will be an int, becuase runs are integers print "The line was",ou_line,"and",runs_scored,"runs were scored" ## End of program
[Opening and Reading a .csv File (in 3 lines)]
Let's go a step further this time, and do some calculations with our file. Let's determine whether the game went over or under.PHP Code:import csv mlbReader = csv.reader(open("mlb_ex_1.csv"),delimiter=',',quotechar='"') for row in mlbReader: print "The line was",row[5],"and",row[6],"runs were scored"
[Opening and Reading a .csv File, and determining over or under]
That's really all there is to reading in a file. What you do after you have read the file in is completely up to you. All the columns are accessible in the "row" array, and can be accessed by asking for a position out of the array. Remember the position is always one less then its column number. For example, if you want the 7th column, you would do row[6].PHP Code:## Created on 4/1/10 ## This example should shows how to open and read a .csv file, and perform ## .. some simple calculations ## ## Notes: The file mlb_ex_1.csv should be downloaded and in the same folder ## .. as this scrpt ## Tell python to import the .csv module, becuase we will be reading a .csv import csv total_overs = 0 ## Initialize the total number of overs to 0 total_unders = 0 ## Initialize the total number of unders to 0 ## First we need to open the file mlb_file = open("mlb_ex_1.csv","r") ## Open the MLB .csv file for reading ## Now we need to tell python to read it as a csv file ## We are opening the mlb_file as defined above, it is deliminated by commas, ## and our quote characted is a regular quote (") mlbReader = csv.reader(mlb_file, delimiter=',', quotechar='"') ## Grab the first line, becuase it is the headers.. headers = mlbReader.next() ## It's now time to iterate through the file row by row... for row in mlbReader: ## First we need to get the OU_Line, and runs scored out of the file. ou_line = float(row[5]) ## This should be a float, becase it can be .5 runs_scored = int(row[6]) ## This will be an int, becuase runs are integers ## Now lets compare the two with an if statement to see what happened: if ou_line < runs_scored: ou_result = "Under" total_unders += 1 elif ou_line > runs_scored: ou_result = "Over" total_overs += 1 else: ou_result = "Push" ## Calculate the percent of games that went over, and round it to 2 decimal places. over_under_percentage = round((total_overs / float(total_overs + total_unders)),2)*100 ## Finally let's put it all together in one print statement print "The line was",ou_line,"and",runs_scored,"runs were scored, so the game went",ou_result ## END OF FOR LOOP print "There were",total_overs,"Overs" print "There were",total_unders,"Unders" print over_under_percentage,"percent of games went Over" ## End of program
Let's move on to data output. Let's further expand on our old example, and say after we calculate whether the game went over or under, we want to write it to a new file. We want our new file to have three columns. Date, Teams, OverUnder. If we look in our sheet we will see that the date and teams are in columns 1 and 3 respectively. We will call our new file MLB_output.csv
Try running the program. After you do, you should see a new file has been created. This file will contain exactly what we expectPHP Code:## Created on 4/1/10 ## This example should shows how to open and read a .csv file, and perform ## .. some simple calculations ## ## Notes: The file mlb_ex_1.csv should be downloaded and in the same folder ## .. as this scrpt ## Tell python to import the .csv module, becuase we will be reading a .csv import csv ## First we need to open both files mlb_file = open("mlb_ex_1.csv","r") ## Open the MLB .csv file for reading output_file = open("MLB_output.csv","w") ## Open the output file for writing ## Now we need to tell python to read it as a csv file ## We are opening the mlb_file as defined above, it is deliminated by commas, ## and our quote characted is a regular quote (") mlbReader = csv.reader(mlb_file, delimiter=',', quotechar='"') ## We'll do the same for our writer. We need to tell it where we will be writing ## .. to, and what kind of delimiters we want to use. mlbWriter = csv.writer(output_file, delimiter=',', quotechar='"') ## Grab the first line, becuase it is the headers.. headers = mlbReader.next() ## It's now time to iterate through the file row by row... for row in mlbReader: ## First we need to get the OU_Line, and runs scored out of the file. ou_line = float(row[5]) ## This should be a float, becase it can be .5 runs_scored = int(row[6]) ## This will be an int, becuase runs are integers ## Now lets get the other information we need out (Date and Teams) date = row[0] teams = row[2] ## Now lets compare the two with an if statement to see what happened: if ou_line < runs_scored: ou_result = "Under" elif ou_line > runs_scored: ou_result = "Over" else: ou_result = "Push" ## Instead of printing here like we did before, we want to write to the file mlbWriter.writerow([date,teams,ou_result]) ## END OF FOR LOOP output_file.close() ## Close the file after we have written everything print "The program has written everything!" ## End of program
That's really all there is to basic input and output of files!Code:9/21/09,atl at nyn,Under 9/21/09,bal at tor,Under 9/21/09,bos at kca,Under 9/21/09,chn at mil,Under 9/21/09,min at cha,Over 9/21/09,nya at ana,Over 9/21/09,sdn at pit,Under 9/21/09,sln at hou,Under 9/21/09,tex at oak,Under
Section D) How to scrape the internet for data
To be continued......
Comment -
bigboydanSBR Aristocracy
- 08-10-05
- 55420
#79With capping like that I guess we could call it ""Murphy8276"s lawOriginally posted by BigDeem5This may be for the Think Tank, but I assume we have enough guys in PT that can figure it out..
Assuming -110 juice, and I believe 52.2 or 52.3% is break even.
If you make 250 plays and hit 55% at $25 a game how much should you make?
Same question at $100 a game?
Comment -
I/OSBR Hall of Famer
- 05-26-11
- 7922
#80Watch it TonyOriginally posted by tony_comeWhat did accomplish here
SBR Grammar Police working over time these days

especially the steers, I mean queersComment -
leetreaperBARRELED IN @ SBR!
- 10-23-10
- 34841
#81This question is like teaching a kid a multiplication table.Originally posted by BigDeem5This may be for the Think Tank, but I assume we have enough guys in PT that can figure it out..
Assuming -110 juice, and I believe 52.2 or 52.3% is break even.
If you make 250 plays and hit 55% at $25 a game how much should you make?
Same question at $100 a game?Comment -
eidolonSBR Hall of Famer
- 01-02-08
- 9547
#82darkhat likes to play with pseudo dead catsComment -
darkhatSBR Hall of Famer
- 08-18-10
- 5723
#83Pseudo being the key wordOriginally posted by eidolondarkhat likes to play with pseudo dead catsComment -
sweepSBR Posting Legend
- 10-09-10
- 16755
#84
Comment -
zizoudane10SBR Hall of Famer
- 03-27-12
- 7278
#85Posting from the gym
Think Tank
Not able to use a calculator but posting
Comment -
kaliboyzSBR MVP
- 10-30-09
- 3121
#86I never wanted to be an internet bully, but this sh*t making me laugh in the last few days. Deemer used his cell phone to post his thread, i guess Deemer is using a really old phone that doesn't have a calculator. hahhha.
Originally posted by zizoudane10Posting from the gym
Think Tank
Not able to use a calculator but posting
Comment -
byronbbSBR MVP
- 11-13-08
- 3067
#87Poor Deemer, the Chris Bosh of SBR.Comment -
MoneyLineDawgSBR Posting Legend
- 01-01-09
- 13253
#88Originally posted by BigDeem5This may be for the Think Tank, but I assume we have enough guys in PT that can figure it out..
Comment -
MiDNiTeSBR Hall of Famer
- 11-11-13
- 7684
#89pricelessComment -
andywendSBR MVP
- 05-20-07
- 4805
#90If you're claiming that he would lose $372 @ $25 a game picking 55% winners, you have to be wrong. I'm sure someone commented on your math error unless you meant a profit of $372 and inadvertently put in that negative squiggle.Originally posted by tto827You can't do this math Deemer
this is like 8th grade shit.
~$372 at $25 a game
$1,375 at $100 a game
The fact that breakeven is whatever percent is irrelevant. These numbers are assuming 110 to win 100 and 27.50 to win 25 FYI.
250 games... 55%..... 137.5 winners..... 112.5 losers
You win $100/$25 depending, and lose $110/$27.50..... calculate total amount won minus total amount lost and you're done.Comment -
OptionalAdministrator
- 06-10-10
- 62179
#91The ~ squiggle is called a tilde.
It means circa. Or approximately..Comment -
Albert PujolsSBR MVP
- 06-01-10
- 1670
#92I have high IQ. I just can't add and subtract.
BahahahahahahahahComment -
MoneyLineDawgSBR Posting Legend
- 01-01-09
- 13253
#93Originally posted by andywendIf you're claiming that he would lose $372 @ $25 a game picking 55% winners, you have to be wrong. I'm sure someone commented on your math error unless you meant a profit of $372 and inadvertently put in that negative squiggle.
That squiggle doesn't have anything to do with negative....it means approximatelyComment -
TxBulldogSBR High Roller- 08-03-10
- 185
#94I may not know the answer to the Deemer's question, but this thread is ~Priceless
Comment -
Sam OdomSBR Aristocracy
- 10-30-05
- 58063
#95Originally posted by BigDeem5
This may be for the Think Tank
Did we figure this out ?Comment -
dbear808SBR Rookie
- 02-16-11
- 36
#963+4=2+5Comment -
opie1988SBR Posting Legend
- 09-12-10
- 23429
#97
what a dumbfukk
Classic thread.Comment -
edawgSBR MVP
- 07-09-11
- 2866
#98Deemer got some gym math for bench 8x3 with 55% max 60 to 72 hours later do a russian latter to 6 with 75% max will add 20 to 30 pounds to max in 3 months.Comment -
MoneyLineDawgSBR Posting Legend
- 01-01-09
- 13253
#99Deemer uses the elliptical and does lots of bicep curls at the gym
Comment -
gauchojakeBARRELED IN @ SBR!
- 09-17-10
- 34131
#100He's just a kid who has recessive Asian genes okay?Comment -
tony_comeSBR Posting Legend
- 03-31-10
- 21695
#101Jake knows his biology coursesComment -
Sam OdomSBR Aristocracy
- 10-30-05
- 58063
#102PBS is doing a special show on this question... Calling it "The Deemer Paradox" hosted by Stephen HawkingComment -
No coincidencesSBR Aristocracy
- 01-18-10
- 76300
#103
Never seen this thread before.
You've gotta be fvcking kidding me.Comment -
t-wizzleBARRELED IN @ SBR!
- 12-18-09
- 38099
#104I thought Asians were good at math?
Apparently not the case for this kid.Comment -
The KrakenBARRELED IN @ SBR!
- 12-25-11
- 29085
#105Deemer once fried his eggs for over 15 minutes, after they were already done.
Not a guy I'm gonna be fukking with.Comment
Search
Collapse
SBR Contests
Collapse
Top-Rated US Sportsbooks
Collapse
#1 BetMGM
4.8/5 BetMGM Bonus Code
#2 FanDuel
4.8/5 FanDuel Promo Code
#3 Caesars
4.8/5 Caesars Promo Code
#4 DraftKings
4.7/5 DraftKings Promo Code
#5 Fanatics
#6 bet365
4.7/5 bet365 Bonus Code
#7 Hard Rock
4.1/5 Hard Rock Bet Promo Code
#8 BetRivers
4.1/5 BetRivers Bonus Code
