<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title></title>
	<atom:link href="http://sportsobjective.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://sportsobjective.com/wordpress</link>
	<description>Taking pride in over-complicating the simple...and picking winners!</description>
	<lastBuildDate>Wed, 17 Oct 2012 15:22:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>NBA Data from Covers</title>
		<link>http://sportsobjective.com/wordpress/?p=4912</link>
		<comments>http://sportsobjective.com/wordpress/?p=4912#comments</comments>
		<pubDate>Wed, 17 Oct 2012 15:20:16 +0000</pubDate>
		<dc:creator>Rufio Magillicutty</dc:creator>
				<category><![CDATA[Covers]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[NBA]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://sportsobjective.com/wordpress/?p=4912</guid>
		<description><![CDATA[Here is a little PHP script that grabs NBA data from covers.com (for example, here) and throws it over to a MySQL database. Each game is identified with a unique &#8216;GmNAME&#8217; so duplicates are ignored. However this doesn&#8217;t happen until the MySQL query. It would be ideal if PHP handled this operation, would speed up [...]]]></description>
				<content:encoded><![CDATA[
<p>Here is a little PHP script that grabs NBA data from covers.com (for example, <a href="http://www.covers.com/pageLoader/pageLoader.aspx?page=/data/nba/teams/pastresults/2011-2012/team404213.html" >here</a>) and throws it over to a MySQL database.  Each game is identified with a unique &#8216;GmNAME&#8217; so duplicates are ignored.  However this doesn&#8217;t happen until the MySQL query.  It would be ideal if PHP handled this operation, would speed up the script considerably, but I just threw it together and only thought of that while writing this.</p>
<p>Open the php file in a text editor, enter your MySQL connection parameters, and the desired span of years for which to get data.  Uncomment the lines that create the table structure.  </p>
<p>I may mess around with it at length.</p>
<p><a href="http://sportsobjective.com/wordpress/wp-content/uploads/2012/10/nba_covers.tar" >nba_covers</a></p>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsportsobjective.com%2Fwordpress%2F%3Fp%3D4912&amp;title=NBA%20Data%20from%20Covers" id="wpa2a_2"><img src="http://sportsobjective.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://sportsobjective.com/wordpress/?feed=rss2&#038;p=4912</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AL/NL Cy Young</title>
		<link>http://sportsobjective.com/wordpress/?p=4902</link>
		<comments>http://sportsobjective.com/wordpress/?p=4902#comments</comments>
		<pubDate>Mon, 23 Jul 2012 01:33:58 +0000</pubDate>
		<dc:creator>Rufio Magillicutty</dc:creator>
				<category><![CDATA[Cy Young]]></category>
		<category><![CDATA[MLB]]></category>
		<category><![CDATA[american league]]></category>
		<category><![CDATA[baseball betting]]></category>
		<category><![CDATA[clayton kershaw]]></category>
		<category><![CDATA[cy young]]></category>
		<category><![CDATA[cy young odds]]></category>
		<category><![CDATA[Futures]]></category>
		<category><![CDATA[major league baseball]]></category>
		<category><![CDATA[National League]]></category>
		<category><![CDATA[probability]]></category>

		<guid isPermaLink="false">http://sportsobjective.com/wordpress/?p=4902</guid>
		<description><![CDATA[Again, last post on this.  I&#8217;ll attach necessary files at bottom. Hit both pitchers last year.  Kershaw was sharp, he won us money (be weary of &#8220;max payout&#8221; disclaimers on Cy Young futures emailed to you after the fact by some unspecified sportsbooks, though no worries we got paid in full). AL and NL formulas: [...]]]></description>
				<content:encoded><![CDATA[
<p>Again, last post on this.  I&#8217;ll attach necessary files at bottom.</p>
<p>Hit both pitchers last year.  Kershaw was sharp, he won us money (be weary of &#8220;max payout&#8221; disclaimers on Cy Young futures emailed to you after the fact by some unspecified sportsbooks, though no worries we got paid in full).</p>
<p>AL and NL formulas:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20V_%7BAL%7D%20%3D%209.22%28WAR%29%20-%2021.94%28ERA%29%20%2B%200.25%28K%29%20-%20108.5&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' V_{AL} = 9.22(WAR) - 21.94(ERA) + 0.25(K) - 108.5' title=' V_{AL} = 9.22(WAR) - 21.94(ERA) + 0.25(K) - 108.5' class='latex' />
<img src='http://s.wordpress.com/latex.php?latex=%20V_%7BNL%7D%20%3D%208.71%28WINS%29%20%2B%206.72%28WAR%29%20-%2039.88%28ERA%29%20%2B%200.14%28K%29%20-%2046.79%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' V_{NL} = 8.71(WINS) + 6.72(WAR) - 39.88(ERA) + 0.14(K) - 46.79 ' title=' V_{NL} = 8.71(WINS) + 6.72(WAR) - 39.88(ERA) + 0.14(K) - 46.79 ' class='latex' />
<p>And a different formula is required for NL relief pitchers:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20V_%7BNLR%7D%20%3D%2014.72%28WAR%29%20%2B%202.19%28SV%29%20-%20108.24%28WHIP%29%20-%207.95%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' V_{NLR} = 14.72(WAR) + 2.19(SV) - 108.24(WHIP) - 7.95 ' title=' V_{NLR} = 14.72(WAR) + 2.19(SV) - 108.24(WHIP) - 7.95 ' class='latex' />
<p>bWAR is baseball-reference WAR projected to the end of the season.</p>
<p><strong>AL CY YOUNG</strong></p>
<table border="0" cellspacing="0">
<tbody>
<tr>
<td align="LEFT" height="16"><strong>NAME</strong></td>
<td align="LEFT"><strong>TEAM</strong></td>
<td align="LEFT"><strong>bWAR</strong></td>
<td align="LEFT"><strong>PROB</strong></td>
<td align="LEFT"><strong>ODDS</strong></td>
</tr>
<tr>
<td align="LEFT" height="18">Justin Verlander</td>
<td align="RIGHT">DET</td>
<td align="RIGHT">8.70</td>
<td align="RIGHT">47.30%</td>
<td align="RIGHT">111</td>
</tr>
<tr>
<td align="LEFT" height="16">Chris Sale</td>
<td align="RIGHT">CHW</td>
<td align="RIGHT">7.76</td>
<td align="RIGHT">46.00%</td>
<td align="RIGHT">117</td>
</tr>
<tr>
<td align="LEFT" height="16">David Price</td>
<td align="RIGHT">TBR</td>
<td align="RIGHT">5.80</td>
<td align="RIGHT">43.85%</td>
<td align="RIGHT">128</td>
</tr>
<tr>
<td align="LEFT" height="18">Matt Harrison</td>
<td align="RIGHT">TEX</td>
<td align="RIGHT">7.14</td>
<td align="RIGHT">31.07%</td>
<td align="RIGHT">222</td>
</tr>
<tr>
<td align="LEFT" height="16">Jered Weaver</td>
<td align="RIGHT">LAA</td>
<td align="RIGHT">4.95</td>
<td align="RIGHT">26.24%</td>
<td align="RIGHT">281</td>
</tr>
<tr>
<td align="LEFT" height="18">Yu Darvis</td>
<td align="RIGHT">TEX</td>
<td align="RIGHT">3.48</td>
<td align="RIGHT">5.39%</td>
<td align="RIGHT">1755</td>
</tr>
<tr>
<td align="LEFT" height="18">CC Sabathia</td>
<td align="RIGHT">NYY</td>
<td align="RIGHT">3.62</td>
<td align="RIGHT">0.14%</td>
<td align="RIGHT">70129</td>
</tr>
</tbody>
</table>
<p><strong>NL CY YOUNG</strong></p>
<table border="0" cellspacing="0">
<tbody>
<tr>
<td align="LEFT" height="16"><strong>NAME</strong></td>
<td align="LEFT"><strong>TEAM</strong></td>
<td align="LEFT"><strong>bWAR</strong></td>
<td align="LEFT"><strong>PROB</strong></td>
<td align="LEFT"><strong>ODDS</strong></td>
</tr>
<tr>
<td align="LEFT" height="18">J. Cueto</td>
<td align="LEFT">CIN</td>
<td align="RIGHT">7.07</td>
<td align="RIGHT">27.21%</td>
<td align="RIGHT">267</td>
</tr>
<tr>
<td align="LEFT" height="18">C. Kimbrel</td>
<td align="LEFT">ATL</td>
<td align="RIGHT">3.1</td>
<td align="RIGHT">25.96%</td>
<td align="RIGHT">285</td>
</tr>
<tr>
<td align="LEFT" height="16">R. Dickey</td>
<td align="LEFT">NYM</td>
<td align="RIGHT">5.34</td>
<td align="RIGHT">25.49%</td>
<td align="RIGHT">292</td>
</tr>
<tr>
<td align="LEFT" height="18">S. Strasburg</td>
<td align="LEFT">WSN</td>
<td align="RIGHT">4.53</td>
<td align="RIGHT">18.79%</td>
<td align="RIGHT">432</td>
</tr>
<tr>
<td align="LEFT" height="18">W. Miley</td>
<td align="LEFT">ARI</td>
<td align="RIGHT">4.65</td>
<td align="RIGHT">17.01%</td>
<td align="RIGHT">488</td>
</tr>
<tr>
<td align="LEFT" height="16">G. Gonzalez</td>
<td align="LEFT">WSN</td>
<td align="RIGHT">4.01</td>
<td align="RIGHT">17.00%</td>
<td align="RIGHT">488</td>
</tr>
<tr>
<td align="LEFT" height="18">C. Hamels</td>
<td align="LEFT">PHI</td>
<td align="RIGHT">4.26</td>
<td align="RIGHT">13.77%</td>
<td align="RIGHT">626</td>
</tr>
<tr>
<td align="LEFT" height="16">L. Lynn</td>
<td align="LEFT">STL</td>
<td align="RIGHT">3.62</td>
<td align="RIGHT">12.65%</td>
<td align="RIGHT">690</td>
</tr>
<tr>
<td align="LEFT" height="18">M. Bumgarner</td>
<td align="LEFT">SFG</td>
<td align="RIGHT">2.76</td>
<td align="RIGHT">12.56%</td>
<td align="RIGHT">696</td>
</tr>
<tr>
<td align="LEFT" height="16">M. Cain</td>
<td align="LEFT">SFG</td>
<td align="RIGHT">3.79</td>
<td align="RIGHT">10.33%</td>
<td align="RIGHT">868</td>
</tr>
<tr>
<td align="LEFT" height="16">A. Chapman</td>
<td align="LEFT">CIN</td>
<td align="RIGHT">3.27</td>
<td align="RIGHT">6.90%</td>
<td align="RIGHT">1350</td>
</tr>
<tr>
<td align="LEFT" height="16">J. McDonald</td>
<td align="LEFT">PIT</td>
<td align="RIGHT">3.83</td>
<td align="RIGHT">6.03%</td>
<td align="RIGHT">1559</td>
</tr>
<tr>
<td align="LEFT" height="18">J. Zimmermann</td>
<td align="LEFT">WSN</td>
<td align="RIGHT">6.97</td>
<td align="RIGHT">4.51%</td>
<td align="RIGHT">2119</td>
</tr>
<tr>
<td align="LEFT" height="16">K. Jansen</td>
<td align="LEFT">LAD</td>
<td align="RIGHT">2.9</td>
<td align="RIGHT">1.79%</td>
<td align="RIGHT">5493</td>
</tr>
</tbody>
</table>
<p><a href="http://sportsobjective.com/wordpress/wp-content/uploads/2012/07/CY_YOUNG.tar.gz" >CY_YOUNG</a></p>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsportsobjective.com%2Fwordpress%2F%3Fp%3D4902&amp;title=AL%2FNL%20Cy%20Young" id="wpa2a_4"><img src="http://sportsobjective.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://sportsobjective.com/wordpress/?feed=rss2&#038;p=4902</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NL/AL MVP</title>
		<link>http://sportsobjective.com/wordpress/?p=4881</link>
		<comments>http://sportsobjective.com/wordpress/?p=4881#comments</comments>
		<pubDate>Sat, 21 Jul 2012 04:45:01 +0000</pubDate>
		<dc:creator>Rufio Magillicutty</dc:creator>
				<category><![CDATA[MLB]]></category>
		<category><![CDATA[MVP]]></category>
		<category><![CDATA[al mvp]]></category>
		<category><![CDATA[baseball]]></category>
		<category><![CDATA[bet]]></category>
		<category><![CDATA[future]]></category>
		<category><![CDATA[Lines]]></category>
		<category><![CDATA[most valuable player odds]]></category>
		<category><![CDATA[NL MVP]]></category>
		<category><![CDATA[odd]]></category>
		<category><![CDATA[Odds]]></category>
		<category><![CDATA[sports betting]]></category>
		<category><![CDATA[sportsbook]]></category>
		<category><![CDATA[Wager]]></category>

		<guid isPermaLink="false">http://sportsobjective.com/wordpress/?p=4881</guid>
		<description><![CDATA[Sportsbooks haven&#8217;t convened MVP odds yet because I haven&#8217;t posted them myself.  This is an obvious observation to anybody that visits this blog on a yearly basis.  I think we&#8217;d all agree on this.  (I use the terms &#8220;we&#8217;d all&#8221; and &#8220;nobody in particular&#8221; interchangeably). The formula behind setting a probability on a given player&#8217;s [...]]]></description>
				<content:encoded><![CDATA[
<p>Sportsbooks haven&#8217;t convened MVP odds yet because I haven&#8217;t posted them myself.  This is an obvious observation to anybody that visits this blog on a yearly basis.  I think we&#8217;d all agree on this.  (I use the terms &#8220;we&#8217;d all&#8221; and &#8220;nobody in particular&#8221; interchangeably).</p>
<p>The formula behind setting a probability on a given player&#8217;s chances can be expressed as:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20P%28v_i%29%20%3D%20%5Cbegin%7BBmatrix%7D%20%20%5Cdisplaystyle%20%5Cfrac%7B2v_i%7D%7B%5Csum%20_j%5En%20v_j%7D%2C%20%26%20%5Cmbox%20%7Bif%20%7D%20v_i%3E0%20%5C%5C%20%200%2C%20%26%20%5Cmbox%20%7Bif%20%7D%20v_i%20%5Cleq%200%20%20%5Cend%7BBmatrix%7D%20%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' P(v_i) = \begin{Bmatrix}  \displaystyle \frac{2v_i}{\sum _j^n v_j}, &amp; \mbox {if } v_i&gt;0 \\  0, &amp; \mbox {if } v_i \leq 0  \end{Bmatrix}  ' title=' P(v_i) = \begin{Bmatrix}  \displaystyle \frac{2v_i}{\sum _j^n v_j}, &amp; \mbox {if } v_i&gt;0 \\  0, &amp; \mbox {if } v_i \leq 0  \end{Bmatrix}  ' class='latex' />
<p>If a player doesn&#8217;t register a positive number of MVP points, the variable v, then he is simply ignored.  The points are calculated slightly differently in the NL and AL, and the years 2000-2010 were used to fit the data.  This has<a href="http://sportsobjective.com/wordpress/?p=3736" title="AL and NL MVP Odds Update" > already been explained </a>on <a href="http://sportsobjective.com/wordpress/?p=4202" title="NL and AL MVP Predictor" >multiple</a> <a href="http://sportsobjective.com/wordpress/?p=4221" title="AL MVP Update and WPA" >occasions.</a></p>
<p>For AL batters and pitchers:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20V_%7BALb%7D%20%3D%2057.28%28PLAYOFFS%29%20%2B%2012.58%28WAR%29%20%2B%2011.08%28WPA%29%20%2B%201.81%28HR%29%20%2B%20%201212.25%28AVG%29%20%2B%200.58%28RBI%29%20-%20500&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' V_{ALb} = 57.28(PLAYOFFS) + 12.58(WAR) + 11.08(WPA) + 1.81(HR) +  1212.25(AVG) + 0.58(RBI) - 500' title=' V_{ALb} = 57.28(PLAYOFFS) + 12.58(WAR) + 11.08(WPA) + 1.81(HR) +  1212.25(AVG) + 0.58(RBI) - 500' class='latex' />
<img src='http://s.wordpress.com/latex.php?latex=%20V_%7BALp%7D%20%3D%2050%28PLAYOFFS%29%20%2B%2025%28WAR%29%20%2B%2015%28WPA%29%20-%2025%28ERA%29%20-%20100&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' V_{ALp} = 50(PLAYOFFS) + 25(WAR) + 15(WPA) - 25(ERA) - 100' title=' V_{ALp} = 50(PLAYOFFS) + 25(WAR) + 15(WPA) - 25(ERA) - 100' class='latex' />
<p>The &#8220;PLAYOFFS&#8221; variable is either 1 or 0, and in season playoff projections are essentially current standings.</p>
<p>For all NL batters and pitchers:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20V_%7BNLb%7D%20%3D%2078.41%28playoffs%29%20%2B%208.98%28WAR%29%20%2B%2010.97%28WPA%29%20%2B%20975.41%28AVG%29%20%2B%203.79%28HR%29%20%2B%200.93%28RP%29%20%2B%201.07%28SB%29%20-%20553&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' V_{NLb} = 78.41(playoffs) + 8.98(WAR) + 10.97(WPA) + 975.41(AVG) + 3.79(HR) + 0.93(RP) + 1.07(SB) - 553' title=' V_{NLb} = 78.41(playoffs) + 8.98(WAR) + 10.97(WPA) + 975.41(AVG) + 3.79(HR) + 0.93(RP) + 1.07(SB) - 553' class='latex' />
<img src='http://s.wordpress.com/latex.php?latex=%20V_%7BNLp%7D%20%3D%2030%28playoffs%29%20%2B%2010%28WPA%29%20%2B%2025%28WAR%29%20-%20150&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' V_{NLp} = 30(playoffs) + 10(WPA) + 25(WAR) - 150' title=' V_{NLp} = 30(playoffs) + 10(WPA) + 25(WAR) - 150' class='latex' />
<p>The motivation for using <a href="http://sportsobjective.com/wordpress/?p=4233" title="SP Line, WAR, and WPA" >WAR and WPA</a> as primary coefficients stemmed from this post, which I found quite interesting.</p>
<p>At the bottom of the post I&#8217;ve attached some relevant excel files.  I&#8217;m not going to post anymore about this (I&#8217;ll do Cy Young this weekend and attach the necessary files), there really shouldn&#8217;t be any reason for me to have to.  I also never want to have to use or look at an excel file ever again.  But if I get enough requests via twitter/email/comments I&#8217;ll make a dedicated page that updates daily, probably using my own WAR calculations instead of<a href="http://www.baseball-reference.com/about/war_explained_wraa.shtml" > bRef&#8217;s mess of drivel</a>, and some server-side scripting.</p>
<p>Last year the formula picked Ryan Braun and Miguel Cabrera.  Verlander I think can we all agree <a href="http://sportsobjective.com/wordpress/?p=4297" title="AL MVP Update and BsR" >should not have won the MVP.</a></p>
<p><strong>NL MVP</strong></p>
<table border="0" cellspacing="0">
<thead></thead>
<tbody>
<tr>
<td align="LEFT" height="16"><strong>NAME</strong></td>
<td align="LEFT"><strong>Team</strong></td>
<td align="LEFT"><strong>bWAR</strong></td>
<td align="LEFT"><strong>WPA</strong></td>
<td align="LEFT"><strong>PROB</strong></td>
<td align="LEFT"><strong>ODDS</strong></td>
</tr>
<tr>
<td align="LEFT" height="18">Andrew McCutchen</td>
<td align="LEFT">PIT</td>
<td align="RIGHT">5.1</td>
<td align="RIGHT">3.2</td>
<td align="LEFT">52.15%</td>
<td align="LEFT">-108</td>
</tr>
<tr>
<td align="LEFT" height="16">Ryan Braun</td>
<td align="LEFT">MIL</td>
<td align="RIGHT">3.9</td>
<td align="RIGHT">3</td>
<td align="LEFT">33.73%</td>
<td align="LEFT">196</td>
</tr>
<tr>
<td align="LEFT" height="18">Joey Votto</td>
<td align="LEFT">CIN</td>
<td align="RIGHT">4.5</td>
<td align="RIGHT">5.2</td>
<td align="LEFT">33.42%</td>
<td align="LEFT">199</td>
</tr>
<tr>
<td align="LEFT" height="18">Melky Cabrera</td>
<td align="LEFT">SFG</td>
<td align="RIGHT">3.8</td>
<td align="RIGHT">2.7</td>
<td align="LEFT">18.64%</td>
<td align="LEFT">436</td>
</tr>
<tr>
<td align="LEFT" height="18">Johnny Cueto</td>
<td align="LEFT">CIN</td>
<td align="RIGHT">4</td>
<td align="RIGHT">2</td>
<td align="LEFT">15.18%</td>
<td align="LEFT">559</td>
</tr>
<tr>
<td align="LEFT" height="16">Carlos Gonzalez</td>
<td align="LEFT">COL</td>
<td align="RIGHT">1.6</td>
<td align="RIGHT">1.8</td>
<td align="LEFT">8.73%</td>
<td align="LEFT">1045</td>
</tr>
<tr>
<td align="LEFT" height="16">Carlos Beltran</td>
<td align="LEFT">STL</td>
<td align="RIGHT">2.3</td>
<td align="RIGHT">1.8</td>
<td align="LEFT">6.49%</td>
<td align="LEFT">1441</td>
</tr>
<tr>
<td align="LEFT" height="16">Matt Holliday</td>
<td align="LEFT">STL</td>
<td align="RIGHT">3.6</td>
<td align="RIGHT">2.8</td>
<td align="LEFT">6.32%</td>
<td align="LEFT">1482</td>
</tr>
<tr>
<td align="LEFT" height="16">Buster Posey</td>
<td align="LEFT">SFG</td>
<td align="RIGHT">2.8</td>
<td align="RIGHT">1.5</td>
<td align="LEFT">5.44%</td>
<td align="LEFT">1738</td>
</tr>
<tr>
<td align="LEFT" height="16">Ian Desmond</td>
<td align="LEFT">WSN</td>
<td align="RIGHT">2.3</td>
<td align="RIGHT">3.5</td>
<td align="LEFT">5.41%</td>
<td align="LEFT">1748</td>
</tr>
<tr>
<td align="LEFT" height="16">Pedro Alvarez</td>
<td align="LEFT">PIT</td>
<td align="RIGHT">2</td>
<td align="RIGHT">1.1</td>
<td align="LEFT">5.29%</td>
<td align="LEFT">1790</td>
</tr>
<tr>
<td align="LEFT" height="16">Jay Bruce</td>
<td align="LEFT">CIN</td>
<td align="RIGHT">1.1</td>
<td align="RIGHT">0.2</td>
<td align="LEFT">4.13%</td>
<td align="LEFT">2321</td>
</tr>
<tr>
<td align="LEFT" height="16">Giancarlo Stanton</td>
<td align="LEFT">MIA</td>
<td align="RIGHT">3</td>
<td align="RIGHT">2.5</td>
<td align="LEFT">2.34%</td>
<td align="LEFT">4174</td>
</tr>
<tr>
<td align="LEFT" height="16">Ryan Vogelsong</td>
<td align="LEFT">SFG</td>
<td align="RIGHT">2.8</td>
<td align="RIGHT">2.1</td>
<td align="LEFT">2.18%</td>
<td align="LEFT">4487</td>
</tr>
<tr>
<td align="LEFT" height="16">Brandon Phillips</td>
<td align="LEFT">CIN</td>
<td align="RIGHT">2.2</td>
<td align="RIGHT">0.8</td>
<td align="LEFT">0.55%</td>
<td align="LEFT">18082</td>
</tr>
</tbody>
</table>
<p><strong>AL MVP</strong></p>
<table border="0" cellspacing="0">
<thead></thead>
<tbody>
<tr>
<td align="LEFT" height="16"><strong>NAME</strong></td>
<td align="LEFT"><strong>TEAM</strong></td>
<td align="LEFT"><strong>bWAR</strong></td>
<td align="LEFT"><strong>WPA</strong></td>
<td align="LEFT"><strong>PROB</strong></td>
<td align="LEFT"><strong>ODDS</strong></td>
</tr>
<tr>
<td align="LEFT" height="16">Mike Trout</td>
<td align="LEFT">TBR</td>
<td align="RIGHT">5.3</td>
<td align="RIGHT">0.5</td>
<td align="RIGHT">34.66%</td>
<td align="RIGHT">188</td>
</tr>
<tr>
<td align="LEFT" height="17">Robinson Cano</td>
<td align="LEFT">NYY</td>
<td align="RIGHT">5</td>
<td align="RIGHT">1.6</td>
<td align="RIGHT">31.16%</td>
<td align="RIGHT">221</td>
</tr>
<tr>
<td align="LEFT" height="16">Josh Hamilton</td>
<td align="LEFT">TEX</td>
<td align="RIGHT">3.2</td>
<td align="RIGHT">1.2</td>
<td align="RIGHT">22.88%</td>
<td align="RIGHT">337</td>
</tr>
<tr>
<td align="LEFT" height="17">Adrian Beltre</td>
<td align="LEFT">TEX</td>
<td align="RIGHT">3</td>
<td align="RIGHT">1.6</td>
<td align="RIGHT">22.13%</td>
<td align="RIGHT">352</td>
</tr>
<tr>
<td align="LEFT" height="17">Mark Trumbo</td>
<td align="LEFT">TBR</td>
<td align="RIGHT">3.2</td>
<td align="RIGHT">0</td>
<td align="RIGHT">18.48%</td>
<td align="RIGHT">441</td>
</tr>
<tr>
<td align="LEFT" height="17">Josh Reddick</td>
<td align="LEFT">NYY</td>
<td align="RIGHT">3.8</td>
<td align="RIGHT">4.2</td>
<td align="RIGHT">14.96%</td>
<td align="RIGHT">568</td>
</tr>
<tr>
<td align="LEFT" height="16">Alex Rios</td>
<td align="LEFT">TEX</td>
<td align="RIGHT">2.6</td>
<td align="RIGHT">1.7</td>
<td align="RIGHT">14.61%</td>
<td align="RIGHT">584</td>
</tr>
<tr>
<td align="LEFT" height="16">Miguel Cabrera</td>
<td align="LEFT">DET</td>
<td align="RIGHT">3.5</td>
<td align="RIGHT">2.2</td>
<td align="RIGHT">14.42%</td>
<td align="RIGHT">593</td>
</tr>
<tr>
<td align="LEFT" height="16">David Ortiz</td>
<td align="LEFT">BOS</td>
<td align="RIGHT">2.7</td>
<td align="RIGHT">2.5</td>
<td align="RIGHT">6.46%</td>
<td align="RIGHT">1448</td>
</tr>
<tr>
<td align="LEFT" height="16">Matt Harrison</td>
<td align="LEFT">TEX</td>
<td align="RIGHT">4.1</td>
<td align="RIGHT">2.5</td>
<td align="RIGHT">5.95%</td>
<td align="RIGHT">1581</td>
</tr>
<tr>
<td align="LEFT" height="16">Fernando Rodney</td>
<td align="LEFT">TBR</td>
<td align="RIGHT">1.9</td>
<td align="RIGHT">2.8</td>
<td align="RIGHT">5.87%</td>
<td align="RIGHT">1604</td>
</tr>
<tr>
<td align="LEFT" height="17">Justin Verlander</td>
<td align="LEFT">DET</td>
<td align="RIGHT">5</td>
<td align="RIGHT">3.1</td>
<td align="RIGHT">3.51%</td>
<td align="RIGHT">2749</td>
</tr>
<tr>
<td align="LEFT" height="16">Chris Sale</td>
<td align="LEFT">CHW</td>
<td align="RIGHT">4.7</td>
<td align="RIGHT">3</td>
<td align="RIGHT">3.18%</td>
<td align="RIGHT">3045</td>
</tr>
<tr>
<td align="LEFT" height="17">Edwin Encarnacion</td>
<td align="LEFT">TOR</td>
<td align="RIGHT">3</td>
<td align="RIGHT">2.5</td>
<td align="RIGHT">1.72%</td>
<td align="RIGHT">5716</td>
</tr>
</tbody>
</table>
<p>Here are the files. The &#8220;NLMVP_ODDS&#8221; and &#8220;ALMVP_ODDS&#8221; files require a data refresh and some sorting.  Feel free to change the coefficients, I don&#8217;t care.  Some files may be irrelevant, not sure.  I just threw a bunch of seemingly related files in an archive.</p>
<p><a href="http://sportsobjective.com/wordpress/wp-content/uploads/2012/07/MLB_MVP_FILES.tar.gz" >MLB_MVP_FILES.tar</a></p>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsportsobjective.com%2Fwordpress%2F%3Fp%3D4881&amp;title=NL%2FAL%20MVP" id="wpa2a_6"><img src="http://sportsobjective.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://sportsobjective.com/wordpress/?feed=rss2&#038;p=4881</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iterative Simultaneous Kelly Solution</title>
		<link>http://sportsobjective.com/wordpress/?p=4399</link>
		<comments>http://sportsobjective.com/wordpress/?p=4399#comments</comments>
		<pubDate>Sun, 01 Jul 2012 22:48:00 +0000</pubDate>
		<dc:creator>Rufio Magillicutty</dc:creator>
				<category><![CDATA[Betting]]></category>
		<category><![CDATA[Kelly]]></category>
		<category><![CDATA[combinatorics]]></category>
		<category><![CDATA[kelly]]></category>
		<category><![CDATA[kelly stakes]]></category>
		<category><![CDATA[maximize]]></category>
		<category><![CDATA[mutual exclusivity]]></category>
		<category><![CDATA[optimizing]]></category>
		<category><![CDATA[probabilities]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sequential]]></category>
		<category><![CDATA[simultaneous kelly]]></category>
		<category><![CDATA[stakes]]></category>

		<guid isPermaLink="false">http://sportsobjective.com/wordpress/?p=4399</guid>
		<description><![CDATA[I like to use LaTeX, so this is mostly an excuse for me to practice my LaTeX skills. Whether one is familiar or unfamiliar with the Kelly Criterion, the concepts outlined below help to give insight to how one can make possible improvements when certain conditions are met. Generally, improvements from a sequential to simultaneous [...]]]></description>
				<content:encoded><![CDATA[
<p><em>I like to use LaTeX, so this is mostly an excuse for me to practice my LaTeX skills. Whether one is familiar or unfamiliar with the Kelly Criterion, the concepts outlined below help to give insight to how one can make possible improvements when certain conditions are met. Generally, improvements from a sequential to simultaneous adjustment of the Kelly stakes are slight. However, as will be shown, slightness can turn considerable when extrapolated over longer time frames.  Feel free to just jump<a href="#simultaneity"> here</a>.<br />
</em></p>
<h2><strong>Why a Log-Utility</strong></h2>
<p>The Kelly Criterion generalizes a model that maximizes the growth of one&#8217;s bankroll using a logarithmic utility. Why does this work? Well, its due to the inherent properties of logarithms. For instance, log2 (8) tells you how many times to divide eight by two to get one. Keep dividing by two in perpetuity and the number never reaches zero. Thus, using the Kelly Criterion, one has infinite bankroll, assuming there is no minimum placed on wager sizes. With infinite bankroll, there is no maximum placed on how big the bankroll can grow to.</p>
<p>Using a log-utility, bankroll is now the sum of the probabilities of the log-returns for any wager. Concretely, the return is simply the payout times the percentage of bankroll wagered. For one wager, with p as the win probability, w as the payout, and x as the wager size, the rate of growth is:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20G%28x%29%20%3D%20p%20%5Clog%20%281%2Bwx%29%20%2B%20%281-p%29%20%5Clog%20%281-x%29&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' G(x) = p \log (1+wx) + (1-p) \log (1-x)' title=' G(x) = p \log (1+wx) + (1-p) \log (1-x)' class='latex' />
<p>The payout, w, on a win is the decimal odds &#8211; 1. Since a losing bet results in w = -1, the return on a losing bet is 1-x. And when x = 1, the logarithm is undefined, and ruin is guaranteed. (Financial conditions when x &gt; 1 have yet to be of concern.)</p>
<p>The optimal wager size, or stakes, for any given bet is now the partial derivative of the function G with respect to x.</p>
<img src='http://s.wordpress.com/latex.php?latex=%20%5Cfrac%20%7B%20%5Cpartial%20G%7D%7B%20%5Cpartial%20x%7D%20%3D%20%5Cfrac%20%7B%20pw%20%7D%7B1%20%2B%20wx%7D%20%2B%20%5Cfrac%20%7B%201-p%20%7D%20%7B%201-x%20%7D&#038;bg=ffffff&#038;fg=000000&#038;s=2' alt=' \frac { \partial G}{ \partial x} = \frac { pw }{1 + wx} + \frac { 1-p } { 1-x }' title=' \frac { \partial G}{ \partial x} = \frac { pw }{1 + wx} + \frac { 1-p } { 1-x }' class='latex' />
<p>Conveniently, the function G is a concave function, and at some point on the interval <img src='http://s.wordpress.com/latex.php?latex=%200%20%5Cle%20x%20%5Cle%201&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' 0 \le x \le 1' title=' 0 \le x \le 1' class='latex' />, function G converges to a maximum, the tangent slope of the curve equals zero. Setting the partial derivative to zero gives:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20x%20%3D%20%5Cfrac%20%7B%20pw%20-%201%20%2B%20p%20%7D%7B%20w%20%7D%20%3D%20%5Cfrac%20%7B%20dp%20-%201%20%7D%20%7B%20w%20%7D&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' x = \frac { pw - 1 + p }{ w } = \frac { dp - 1 } { w }' title=' x = \frac { pw - 1 + p }{ w } = \frac { dp - 1 } { w }' class='latex' />
<p>(d = decimal odds)</p>
<p>This can also be expressed in terms of probabilities, since the win probability divided by the implied probability, 1/d, is roughly equal to the return on a winning wager:</p>
<img src='http://s.wordpress.com/latex.php?latex=%201%20%2B%20wx%20%5Capprox%20%5Cfrac%20%7B%20p%20%7D%7B%20p_%7Bimp%7D%7D&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' 1 + wx \approx \frac { p }{ p_{imp}}' title=' 1 + wx \approx \frac { p }{ p_{imp}}' class='latex' />
<p>And the optimal stakes can also be found with the formula:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20x%20%3D%20%5Cfrac%20%7B%20p%20-%20p_%7Bimp%7D%20%7D%20%7B%201%20-%20p_%7Bimp%7D%20%7D&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' x = \frac { p - p_{imp} } { 1 - p_{imp} }' title=' x = \frac { p - p_{imp} } { 1 - p_{imp} }' class='latex' />
<p><span id="simultaneity"><br />
<h2><strong>Simultaneity</strong></h2>
<p></span></p>
<p>For sequential stakes, the previous holds true. However, making wagers simultaneously results in a set of stakes that does not maximize log-utility. Since the bankroll isn&#8217;t re-adjusted every time a wager wins or loses, an adjustment has to be made. For example, with two independent simultaneous events (wagers placed at the same time), the function G equals:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20G%28x%20_%7B1%7D%2C%20x_%7B2%7D%29%20%3D%20p%20_%7B1%7Dp%20_%7B2%7Dlog%281%2Bw%20_%7B1%7Dx%20_%7B1%7D%20%2B%20w%20_%7B2%7Dx%20_%7B2%7D%29%20%2B%20q%20_%7B1%7Dp%20_%7B2%7Dlog%281%20-%20x%20_%7B1%7D%20%2B%20w%20_%7B2%7Dx%20_%7B2%7D%29%20%2B%20p%20_%7B1%7Dq%20_%7B2%7Dlog%281%2Bw%20_%7B1%7Dx%20_%7B1%7D%20-%20x%20_%7B2%7D%29%20%2B%20q%20_%7B1%7Dq%20_%7B2%7Dlog%281%20-%20x%20_%7B1%7D%20-%20x%20_%7B2%7D%29&#038;bg=ffffff&#038;fg=000000&#038;s=-1' alt=' G(x _{1}, x_{2}) = p _{1}p _{2}log(1+w _{1}x _{1} + w _{2}x _{2}) + q _{1}p _{2}log(1 - x _{1} + w _{2}x _{2}) + p _{1}q _{2}log(1+w _{1}x _{1} - x _{2}) + q _{1}q _{2}log(1 - x _{1} - x _{2})' title=' G(x _{1}, x_{2}) = p _{1}p _{2}log(1+w _{1}x _{1} + w _{2}x _{2}) + q _{1}p _{2}log(1 - x _{1} + w _{2}x _{2}) + p _{1}q _{2}log(1+w _{1}x _{1} - x _{2}) + q _{1}q _{2}log(1 - x _{1} - x _{2})' class='latex' />
<img src='http://s.wordpress.com/latex.php?latex=%20q%20_%7B1%7D%2C%20q%20_%7B2%7D%20%3D%201%20-%20p%20_%7B1%7D%2C%201%20-%20p%20_%7B2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' q _{1}, q _{2} = 1 - p _{1}, 1 - p _{2}' title=' q _{1}, q _{2} = 1 - p _{1}, 1 - p _{2}' class='latex' />
<p>The size of possible joint outcomes is m<sup>n</sup>, m being the single game outcomes (typically binary), and n the number of simultaneous events. In this case, there are four possible joint outcomes. When n becomes larger than two, the space of joint outcomes becomes too large to write down completely, so in more compact notation, the function G can be reduced to:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20G%28x%20_%7B1%7D%2C%20x%20_%7B2%7D%2C%20%5Cdots%2C%20x%20_%7Bn%7D%29%20%3D%20%5Csum%20_%7Bi%7D%5E%7Bm%5En%7D%20%5Ctextbf%7BP%7D%20_%7Bi%7D%20log%281%2B%5Csum%20_%7Bj%7D%5En%20w%20_%7Bij%7D%20x_%7Bj%7D%29&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' G(x _{1}, x _{2}, \dots, x _{n}) = \sum _{i}^{m^n} \textbf{P} _{i} log(1+\sum _{j}^n w _{ij} x_{j})' title=' G(x _{1}, x _{2}, \dots, x _{n}) = \sum _{i}^{m^n} \textbf{P} _{i} log(1+\sum _{j}^n w _{ij} x_{j})' class='latex' />
<p>Where P is an m<sup>n</sup> x 1 vector, and <img src='http://s.wordpress.com/latex.php?latex=%20%5Cprod%20_%7Bj%7D%5En%20p%20_%7Bj%7D%20%3D%20P%20_%7Bi%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' \prod _{j}^n p _{j} = P _{i}' title=' \prod _{j}^n p _{j} = P _{i}' class='latex' /></p>
<p>In Vectorized form:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20G%20%3D%20%5Ctextbf%7BP%7D%5E%5Cintercal%20%5Clog%281%20%2B%20%5Ctextbf%7BWX%7D%29&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' G = \textbf{P}^\intercal \log(1 + \textbf{WX})' title=' G = \textbf{P}^\intercal \log(1 + \textbf{WX})' class='latex' />
<p>W is an m<sup>n</sup> x n matrix, <img src='http://s.wordpress.com/latex.php?latex=%20w%20%5Cin%20%5Ctextbf%7BW%7D%20_%7Bi%7D%2C%20x%20%5Cin%20%5Ctextbf%7BX%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' w \in \textbf{W} _{i}, x \in \textbf{X}' title=' w \in \textbf{W} _{i}, x \in \textbf{X}' class='latex' /></p>
<h2><strong>Iterative Solution</strong></h2>
<p>As mentioned before, there are implied constraints placed on x. The sum of all stakes can not exceed one, and negative stakes are yet unknown to commerce. With that in mind, if one is fortunate enough to have a rather size-able edge across multiple simultaneous bets, the stakes can be re-calculated with elementary math:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20x%20_%7Bi%7D%20%3A%3D%20%5Cfrac%20%7Bx%20_%7Bi%7D%7D%7B%5Csum%20_%7Bi%7D%5E%7Bn%7D%20x_%7Bi%7D%7D&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' x _{i} := \frac {x _{i}}{\sum _{i}^{n} x_{i}}' title=' x _{i} := \frac {x _{i}}{\sum _{i}^{n} x_{i}}' class='latex' />
<p>Whether this is a necessary step or not will be obvious given a set of events. Regardless, the assumption here is the function G is not maximized using single game stakes, because after a result is final, the initial bankroll changes. Any number r &lt;&gt; ar if a &lt;&gt; 1. (When the stakes are zero, the number of simultaneous events simply becomes n &#8211; 1, and does not effect the current bankroll).</p>
<p>Through a derivative-free, iterative solution, the goal is to move up a curve until the point reaches an apex, so arbitrary steps are suitable enough to reach the desired goal. The result will be the optimal kelly fraction across all stakes, which has the benefit of maintaining proportionality. Conveniently, the time-complexity of such an algorithm has a lower bound of 1 and an upper bound of N, number of iterations, which should terminate, at the most, when the kelly fraction = 0.</p>
<p>Assuming the matrices P, W, and X have been populated (pseudocode):</p>
<pre>alpha = 1
N = 100
G_temp = -1
for i = 1 to N
    X := X * alpha  ##alpha = fraction
    G = P_transpose * log(1+W*X)
    if G &lt; G_temp
        break
    else
    G_temp = G
    alpha = alpha - .01  ##Sufficient step size, alpha terminates at zero
    end
end</pre>
<p>This should guarantee a solution. Two things to mention, the statement &#8220;Assuming the matrices P, W, and X have been populated&#8221; is of major importance, and should not be reduced to assumptions. However one chooses to populate an array, matrix, etc&#8230;, this adds considerably to the time-complexity of the algorithm. The size is enormous, and assigns <img src='http://s.wordpress.com/latex.php?latex=%20%5CTheta%20%28c%2Am%5En%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' \Theta (c*m^n)' title=' \Theta (c*m^n)' class='latex' /> the new lower bound.</p>
<p>I&#8217;ve created an example with random probabilities and payouts, to visualize the algorithm.<br />
<center><img src='http://s.wordpress.com/latex.php?latex=%20%5Cbegin%7Btabular%7D%7B%7Cl%7Cl%7Cl%7C%7D%20%20%5Chline%20%20%5Ctextbf%7Bimplied%20p%7D%26%5Ctextbf%7Bp%7D%26%5Ctextbf%7Bstake%7D%5C%5C%5Chline%20%200.5776%260.6250%260.1122%5C%5C%20%200.5560%260.5988%260.0965%5C%5C%20%200.5994%260.6427%260.1080%5C%5C%20%200.5273%260.5682%260.0866%5C%5C%20%200.5235%260.5719%260.1015%5C%5C%20%200.4070%260.4375%260.0514%5C%5C%20%200.4964%260.5431%260.0927%5C%5C%20%200.4738%260.5323%260.1112%5C%5C%20%200.4175%260.4691%260.0886%5C%5C%20%200.4150%260.4676%260.0899%5C%5C%5Chline%20%20%5Cend%7Btabular%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' \begin{tabular}{|l|l|l|}  \hline  \textbf{implied p}&amp;\textbf{p}&amp;\textbf{stake}\\\hline  0.5776&amp;0.6250&amp;0.1122\\  0.5560&amp;0.5988&amp;0.0965\\  0.5994&amp;0.6427&amp;0.1080\\  0.5273&amp;0.5682&amp;0.0866\\  0.5235&amp;0.5719&amp;0.1015\\  0.4070&amp;0.4375&amp;0.0514\\  0.4964&amp;0.5431&amp;0.0927\\  0.4738&amp;0.5323&amp;0.1112\\  0.4175&amp;0.4691&amp;0.0886\\  0.4150&amp;0.4676&amp;0.0899\\\hline  \end{tabular}' title=' \begin{tabular}{|l|l|l|}  \hline  \textbf{implied p}&amp;\textbf{p}&amp;\textbf{stake}\\\hline  0.5776&amp;0.6250&amp;0.1122\\  0.5560&amp;0.5988&amp;0.0965\\  0.5994&amp;0.6427&amp;0.1080\\  0.5273&amp;0.5682&amp;0.0866\\  0.5235&amp;0.5719&amp;0.1015\\  0.4070&amp;0.4375&amp;0.0514\\  0.4964&amp;0.5431&amp;0.0927\\  0.4738&amp;0.5323&amp;0.1112\\  0.4175&amp;0.4691&amp;0.0886\\  0.4150&amp;0.4676&amp;0.0899\\\hline  \end{tabular}' class='latex' /></center><br />
<a href="http://sportsobjective.com/wordpress/wp-content/uploads/2012/07/iter_sol1.jpg" ><img class="size-medium wp-image-4462 aligncenter" title="iter_sol" src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/07/iter_sol1-300x239.jpg" alt="" width="300" height="239" /></a></p>
<p>&nbsp;</p>
<p>In Octave, the entire process took 0.03 seconds. That was worth a .07% increase in bankroll.  The more events there are the more one will benefit.</p>
<p>As mentioned before, the improvements may be slight. But setting G as the rate of growth in the equation, Y = e<sup>rt</sup>, can translate into drastic increases in bankroll. A brief example of the time it takes to triple bankroll given r:</p>
<p><img src='http://s.wordpress.com/latex.php?latex=%203%20%3D%20e%5E%7Brt%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' 3 = e^{rt} ' title=' 3 = e^{rt} ' class='latex' /></br></p>
<p><img src='http://s.wordpress.com/latex.php?latex=%20r%20%3D%20.030%2C%20%5C%20t%20%3D%20%5Cfrac%20%7B%5Cln%283%29%7D%7B.030%7D%20%5Capprox%2036.62%20&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' r = .030, \ t = \frac {\ln(3)}{.030} \approx 36.62 ' title=' r = .030, \ t = \frac {\ln(3)}{.030} \approx 36.62 ' class='latex' /></br></p>
<img src='http://s.wordpress.com/latex.php?latex=%20r%20%3D%20.025%2C%20%5C%20t%20%3D%20%5Cfrac%20%7B%5Cln%283%29%7D%7B.025%7D%20%5Capprox%2043.94&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' r = .025, \ t = \frac {\ln(3)}{.025} \approx 43.94' title=' r = .025, \ t = \frac {\ln(3)}{.025} \approx 43.94' class='latex' />
<p>A 0.5% increase in bankroll in this case means if one makes a series of wagers simultaneously, each meeting similar conditions, approximately seven such wagers are unnecessary to reach three times initial bankroll. If n = 10, that&#8217;s 70 different bets. Performed weekly and that&#8217;s over two months worth of extra money ever year. Over ten years and a bettor can secure over 18 months of additional bankroll had one considered simultaneous outcomes.</p>
<h2><strong>Direct Calculation</strong></h2>
<p>The iterative solution has the advantage of maintaining proportionality. This can be restated as using some scalar, s, to optimize stakes, X:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20s%20%5Cbegin%7Bpmatrix%7Dx_1%20%5C%5C%20x_2%20%5C%5C%20%5Cvdots%20%5C%5C%20x_n%20%5Cend%7Bpmatrix%7D%20%5CRightarrow%20%5Ctextbf%7Bmax%7D%28G%29&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' s \begin{pmatrix}x_1 \\ x_2 \\ \vdots \\ x_n \end{pmatrix} \Rightarrow \textbf{max}(G)' title=' s \begin{pmatrix}x_1 \\ x_2 \\ \vdots \\ x_n \end{pmatrix} \Rightarrow \textbf{max}(G)' class='latex' />
<p>Now the function, G, becomes:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20G%28s%29%20%3D%20%5Ctextbf%7BP%7D%5E%5Cintercal%20%5Clog%20%281%20%2B%20%5Ctextbf%7BW%7D%20%5Ctimes%20s%20%5Ctextbf%7BX%7D%29&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' G(s) = \textbf{P}^\intercal \log (1 + \textbf{W} \times s \textbf{X})' title=' G(s) = \textbf{P}^\intercal \log (1 + \textbf{W} \times s \textbf{X})' class='latex' />
<p>And the derivative of G:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20%5Cfrac%20%7B%20dG%7D%7B%20ds%7D%20%3D%20%5Ctextbf%7BP%7D%5E%5Cintercal%20%28%5Ctextbf%7BWX%7D%20%5Cdiv%20%281%2B%5Ctextbf%7BW%7D%20%5Ctimes%20s%20%5Ctextbf%7BX%7D%29%29&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt=' \frac { dG}{ ds} = \textbf{P}^\intercal (\textbf{WX} \div (1+\textbf{W} \times s \textbf{X}))' title=' \frac { dG}{ ds} = \textbf{P}^\intercal (\textbf{WX} \div (1+\textbf{W} \times s \textbf{X}))' class='latex' />
<p>Here, division is element-by-element division. In most programming languages, this is syntactically equivalent to &#8220;(W*X)./(1+W*X).&#8221;</p>
<p>I&#8217;ve reduced G to a one variable equation, so there should be a direct solution without having to iterate by setting the derivative of G to zero and solving for s, the kelly fraction.  (N = m<sup>n</sup> )</p>
<img src='http://s.wordpress.com/latex.php?latex=%20s%20%3D%20%5Cfrac%20%7B%20%5Csum%20_i%5E%7BN%7D%20P_i%20%5Csum%20_j%5E%7Bn%7D%20w_%7Bij%7D%20x_j%7D%7B%20%5Csum%20_i%5E%7BN%7D%20P_i%20%28%20%5Csum%20_j%5E%7Bn%7D%20w_%7Bij%7D%20x_j%29%5E2%20%7D%20%20%20%3D%20%5Cfrac%20%7B%20%5Ctextbf%7BP%7D%5E%5Cintercal%20%28WX%29%7D%7B%20%5Ctextbf%7BP%7D%5E%5Cintercal%20%28WX%20%5Ccirc%20WX%29%20%7D&#038;bg=ffffff&#038;fg=000000&#038;s=3' alt=' s = \frac { \sum _i^{N} P_i \sum _j^{n} w_{ij} x_j}{ \sum _i^{N} P_i ( \sum _j^{n} w_{ij} x_j)^2 }   = \frac { \textbf{P}^\intercal (WX)}{ \textbf{P}^\intercal (WX \circ WX) }' title=' s = \frac { \sum _i^{N} P_i \sum _j^{n} w_{ij} x_j}{ \sum _i^{N} P_i ( \sum _j^{n} w_{ij} x_j)^2 }   = \frac { \textbf{P}^\intercal (WX)}{ \textbf{P}^\intercal (WX \circ WX) }' class='latex' />
<p><a rel="nofollow" href="http://en.wikipedia.org/wiki/Hadamard_product_%28matrices%29" ><span style="font-size: x-small;">(Hadamard Product)</span></a></p>
<h2><strong>Mutual Exclusivity</strong></h2>
<p>Much work has been done on simultaneous events whose outcomes are dependent on each other (i.e. horse racing, futures).  A general algorithm for kelly stakes across mutual exclusive events is outlined at <a rel="nofollow" href="http://en.wikipedia.org/wiki/Kelly_criterion#Many_horses" >wikipedia</a>.</p>
<p><strong>Further Reading</strong><br />
<a href="http://www.sbrforum.com/betting-tools/kelly-calculator/" >SBRForum Kelly Calculator</a><br />
<a href="http://econpapers.repec.org/article/blajorssc/v_3a56_3ay_3a2007_3ai_3a5_3ap_3a607-623.htm"  title="Algorithms for optimal allocation of bets on many simultaneous events">Algorithms for optimal allocation of bets on many simultaneous events</a><br />
<a href="http://da.journal.informs.org/content/5/1/10.abstract?ijkey=69e4ed845f956062c0282e4ca7ba7707d8f038f2&#038;keytype2=tf_ipsecsha"  title="Optimal Betting Strategies for Simultaneous Games">Optimal Betting Strategies for Simultaneous Games</a></p>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsportsobjective.com%2Fwordpress%2F%3Fp%3D4399&amp;title=Iterative%20Simultaneous%20Kelly%20Solution" id="wpa2a_8"><img src="http://sportsobjective.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://sportsobjective.com/wordpress/?feed=rss2&#038;p=4399</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pitch F/X with PHP and Octave</title>
		<link>http://sportsobjective.com/wordpress/?p=4385</link>
		<comments>http://sportsobjective.com/wordpress/?p=4385#comments</comments>
		<pubDate>Fri, 08 Jun 2012 04:06:47 +0000</pubDate>
		<dc:creator>Rufio Magillicutty</dc:creator>
				<category><![CDATA[MLB]]></category>
		<category><![CDATA[Octave]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PitchFX]]></category>
		<category><![CDATA[cold zones]]></category>
		<category><![CDATA[fit]]></category>
		<category><![CDATA[heat maps]]></category>
		<category><![CDATA[hot zones]]></category>
		<category><![CDATA[octave]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[pitch fx]]></category>
		<category><![CDATA[pitch locations]]></category>
		<category><![CDATA[strike zones]]></category>
		<category><![CDATA[surface]]></category>
		<category><![CDATA[umpire data]]></category>

		<guid isPermaLink="false">http://sportsobjective.com/wordpress/?p=4385</guid>
		<description><![CDATA[Generally, sabermetric nerds use R (or Excel lmfao) to appropriate their desire to waste time. I, however, prefer Octave, an open-source alternative to MATLAB. Its more intellectually stimulating than R, in my opinion. By that I mean, there isn&#8217;t a built in mechanism to download thousands of user submitted R functions and scripts (Believe it [...]]]></description>
				<content:encoded><![CDATA[
<p>Generally, sabermetric nerds use R (or Excel lmfao) to appropriate their desire to waste time.  I, however, prefer <a href="http://www.gnu.org/software/octave/" >Octave</a>, an open-source alternative to MATLAB.  Its more intellectually stimulating than R, in my opinion.  By that I mean, there isn&#8217;t a built in mechanism to download thousands of user submitted R functions and scripts  (Believe it not, there is even a <a rel="nofollow" href="http://code.google.com/p/r-pitchfx/" >pitch fx library to use with R</a>).  There are degrees of laziness, and while I fall in the upper percentile, people who use R really would rather remain rigid regarding routes to regale their ridiculous yet reasonably remunerative run value research.</p>
<p>Actually, the primary reason I&#8217;m using Octave is its the program of choice for <a href="https://www.coursera.org/course/ml" >ML-Class</a>.  Its also more syntactically convenient.  </p>
<p>This isn&#8217;t important.  What is important, however, is something that is very easy to implement.  The motivation behind using PHP with Octave is the lack of MYSQL compatability with Octave.  I was having trouble getting it to work, as have others, based on a google search.  Fortunately, one can call Octave, or open up a shell to essentially run anything, from PHP, with:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">system</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'path/to/bin path/to/file'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Visit <a href="http://php.net/" >php.net</a> for more info.</p>
<p>For Octave users on Linux (Windows users may have to specify the full path to Octave):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">system</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'octave -q path/to/file'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Octave script files use the extension &#8220;.m&#8221;, and in PHP we can easily write to a file and save as &#8220;filename.m&#8221;:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$octave_file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'octave_file.m'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'w'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$octave_file</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;This is octave code to do stuff really cool&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$octave_file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This is elementary, though vital, PHP code.</p>
<p>I&#8217;m going to assume the reader has a Pitch F/X database already.  If not, grab my script at github <a href="https://github.com/wa-rufio/SP-Database/blob/master/pitchfx_get.php" >here</a> (its setup to grab from yesterday, comment that section and change the start and end dates), or download <a href="http://www.wantlinux.net/baseball/" >here</a> (pbp2.zip).</p>
<p>Octave is going to be used for all the math, so the Octave script will include code to open a data file, a file that is initialized in the PHP code:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'pfx_data.txt'</span><span style="color: #339933;">;</span>
<span style="color: #990000;">unlink</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$f</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>It is of major importance that the &#8216;unlink&#8217; function is called, and the &#8216;a&#8217; property be assigned to the file.  The data is going to be appended to the file each time the PHP code loops through the query results.  And when the PHP code is run the file itself is going to be deleted before written to.</p>
<p>After connecting to a database, here is a rather dull example query:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT p.px, p.pz, SUM(IF(p.event IN ('Single', 'Double', 'Triple', 'Home Run'),1,0))/SUM(IF(p.event NOT LIKE '%Sac %',1,0)) AS BA FROM pitches as p JOIN (SELECT id FROM batters WHERE name_display_first_last LIKE '%<span style="color: #006699; font-weight: bold;">$player_name</span>%' LIMIT 1) AS t ON t.id = p.ab_id WHERE LEFT(p.gameName,4) BETWEEN &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$yr_start</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; AND &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$yr_end</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; AND p.type = 'X' AND p.px IS NOT NULL GROUP BY p.px, p.pz&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This is extracting a specified player&#8217;s contact Batting Average. (Different from BABIP, which excludes Home Runs, hence the phrase &#8220;Balls in Play.&#8221;  Any sort of &#8220;Sacrifice&#8221; will be undefined, and ignored below.)</p>
<p>Subsequently on each loop, the query results are appended to the file &#8220;pfx_data.txt&#8221;.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_assoc</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'BA'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span>
              <span style="color: #b1b100;">continue</span>
        <span style="color: #b1b100;">else</span>
              <span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$f</span><span style="color: #339933;">,</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'px'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">','</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pz'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">','</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'BA'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_free_result</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$connection</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$f</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>I&#8217;ll provide a file so one can decipher all the Octave code themselves.  For now, here&#8217;s an example plot in Octave (default is the <a href="http://www.gnuplot.info/" >gnuplot</a> graphing library):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;">data=<span style="color: #0000FF;">load</span><span style="color: #080;">&#40;</span><span style="color:#A020F0;">'&quot;.$file.&quot;'</span><span style="color: #080;">&#41;</span>; 
X = data<span style="color: #080;">&#40;</span>:, <span style="color: #080;">&#91;</span><span style="color: #33f;">1</span>, <span style="color: #33f;">2</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>; 
y = data<span style="color: #080;">&#40;</span>:, <span style="color: #33f;">3</span><span style="color: #080;">&#41;</span>; 
hits=<span style="color: #0000FF;">find</span><span style="color: #080;">&#40;</span>y==<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>; 
outs=<span style="color: #0000FF;">find</span><span style="color: #080;">&#40;</span>y==<span style="color: #33f;">0</span><span style="color: #080;">&#41;</span>; 
<span style="color: #0000FF;">plot</span><span style="color: #080;">&#40;</span>X<span style="color: #080;">&#40;</span>hits,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>,X<span style="color: #080;">&#40;</span>hits,<span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>,<span style="color:#A020F0;">'rx'</span>,<span style="color:#A020F0;">'MarkerSize'</span>,<span style="color: #33f;">7</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">hold</span> on
<span style="color: #0000FF;">plot</span><span style="color: #080;">&#40;</span>X<span style="color: #080;">&#40;</span>outs,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>,X<span style="color: #080;">&#40;</span>outs,<span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>,<span style="color:#A020F0;">'bo'</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">title</span><span style="color: #080;">&#40;</span><span style="color:#A020F0;">'&quot;.$player_name.&quot; pitch position on cBA (&quot;.$yr_start.&quot; - &quot;.$yr_end.&quot;)'</span><span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">gca</span>,<span style="color:#A020F0;">'xlim'</span>,<span style="color: #080;">&#91;</span>-<span style="color: #33f;">2</span>,<span style="color: #33f;">2</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>; <span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">gca</span>,<span style="color:#A020F0;">'ylim'</span>,<span style="color: #080;">&#91;</span><span style="color: #33f;">0</span>,<span style="color: #33f;">5</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">legend</span><span style="color: #080;">&#40;</span><span style="color:#A020F0;">'hits'</span>,<span style="color:#A020F0;">'outs'</span><span style="color: #080;">&#41;</span>; 
<span style="color: #0000FF;">xlabel</span><span style="color: #080;">&#40;</span><span style="color:#A020F0;">'Horizontal position (ft)'</span><span style="color: #080;">&#41;</span>; 
<span style="color: #0000FF;">ylabel</span><span style="color: #080;">&#40;</span><span style="color:#A020F0;">'Vertical position (ft)'</span><span style="color: #080;">&#41;</span>; 
text<span style="color: #080;">&#40;</span>-<span style="color: #33f;">1.8</span>,<span style="color: #33f;">4.8</span>,<span style="color: #080;">&#91;</span><span style="color:#A020F0;">'N = '</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">length</span><span style="color: #080;">&#40;</span>data<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>; 
text<span style="color: #080;">&#40;</span>-<span style="color: #33f;">1.8</span>,<span style="color: #33f;">4.5</span>,<span style="color: #080;">&#91;</span><span style="color:#A020F0;">'hits = '</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">length</span><span style="color: #080;">&#40;</span>hits<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>,<span style="color:#A020F0;">', outs = '</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">length</span><span style="color: #080;">&#40;</span>outs<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#93;</span>,<span style="color:#A020F0;">'fontsize'</span>,<span style="color: #33f;">6</span><span style="color: #080;">&#41;</span></pre></td></tr></table></div>

<p>Obviously, some of the variables are PHP assignments, and wouldn&#8217;t be used in Octave.  In PHP, just condense what would have been written in a script or in the Octave terminal into the call to &#8216;fwrite&#8217;, over-writing any text that was there before:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$file1</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'pfx_octave.m'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$f1</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'w'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$f1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;data=load('&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;');<span style="color: #000099; font-weight: bold;">\n</span>X=data(:,1:2); y=data(:,3);<span style="color: #000099; font-weight: bold;">\n</span>plot(X(hits,1),X(hits,2),'rx','MarkerSize',7)<span style="color: #000099; font-weight: bold;">\n</span>hold on;<span style="color: #000099; font-weight: bold;">\n</span>plot(X(outs,1),X(outs,2),'bo')<span style="color: #000099; font-weight: bold;">\n</span>title('&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$player_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; pitch position on cBA (&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$yr_start</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; - &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$yr_end</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;)'); set(gca,'xlim',[-2,2]); set(gca,'ylim',[0,5]);<span style="color: #000099; font-weight: bold;">\n</span>legend('hits','outs'); xlabel('Horizontal position (ft)'); ylabel('Vertical position (ft)'); text(-1.8,4.8,['N = ',num2str(length(data))]); text(-1.8,4.5,['hits = ',num2str(length(hits)),', outs = ',num2str(length(outs))],'fontsize',6)</span></pre></td></tr></table></div>

<p>(The &#8216;\n&#8217; character is just to make &#8216;pfx_octave.m&#8217; look pretty.  One can still use the file after closing PHP.)</p>
<p>The result is something like this:</p>
<p><a href="http://sportsobjective.com/wordpress/wp-content/uploads/2012/06/ex_jeter.jpg" ><img src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/06/ex_jeter-300x225.jpg" alt="" title="ex_jeter" width="300" height="225" class="aligncenter size-medium wp-image-4386" /></a></p>
<p>I threw together a virtual strike zone and some hot and cold zones (TY to Mike Fast for his regularized strike zones, the file at the bottom provides code for LHB and RHB strike zone deviations):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">hold</span> on
&quot;<span style="color: #0000FF;">plot</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#91;</span>-<span style="color: #33f;">1</span>,<span style="color: #33f;">1</span><span style="color: #080;">&#93;</span>,<span style="color: #080;">&#91;</span><span style="color: #33f;">1.5</span>,<span style="color: #33f;">1.5</span><span style="color: #080;">&#93;</span>,<span style="color:#A020F0;">'k--'</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">plot</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#91;</span>-<span style="color: #33f;">1</span>,<span style="color: #33f;">1</span><span style="color: #080;">&#93;</span>,<span style="color: #080;">&#91;</span><span style="color: #33f;">3.5</span>,<span style="color: #33f;">3.5</span><span style="color: #080;">&#93;</span>,<span style="color:#A020F0;">'k--'</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">plot</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#91;</span>-<span style="color: #33f;">1</span>,-<span style="color: #33f;">1</span><span style="color: #080;">&#93;</span>,<span style="color: #080;">&#91;</span><span style="color: #33f;">1.5</span>,<span style="color: #33f;">3.5</span><span style="color: #080;">&#93;</span>,<span style="color:#A020F0;">'k--'</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">plot</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#91;</span><span style="color: #33f;">1</span>,<span style="color: #33f;">1</span><span style="color: #080;">&#93;</span>,<span style="color: #080;">&#91;</span><span style="color: #33f;">1.5</span>,<span style="color: #33f;">3.5</span><span style="color: #080;">&#93;</span>,<span style="color:#A020F0;">'k--'</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">plot</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#91;</span>-<span style="color: #33f;">1</span>,<span style="color: #33f;">1</span><span style="color: #080;">&#93;</span>,<span style="color: #080;">&#91;</span><span style="color: #33f;">1.5</span>+<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span>,<span style="color: #33f;">1.5</span>+<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span><span style="color: #080;">&#93;</span>,<span style="color:#A020F0;">'k--'</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">plot</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#91;</span>-<span style="color: #33f;">1</span>,<span style="color: #33f;">1</span><span style="color: #080;">&#93;</span>,<span style="color: #080;">&#91;</span><span style="color: #33f;">1.5</span>+<span style="color: #33f;">4</span>/<span style="color: #33f;">3</span>,<span style="color: #33f;">1.5</span>+<span style="color: #33f;">4</span>/<span style="color: #33f;">3</span><span style="color: #080;">&#93;</span>,<span style="color:#A020F0;">'k--'</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">plot</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#91;</span>-<span style="color: #33f;">1</span>+<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span>,-<span style="color: #33f;">1</span>+<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span><span style="color: #080;">&#93;</span>,<span style="color: #080;">&#91;</span><span style="color: #33f;">1.5</span>,<span style="color: #33f;">3.5</span><span style="color: #080;">&#93;</span>,<span style="color:#A020F0;">'k--'</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">plot</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#91;</span>-<span style="color: #33f;">1</span>+<span style="color: #33f;">4</span>/<span style="color: #33f;">3</span>,-<span style="color: #33f;">1</span>+<span style="color: #33f;">4</span>/<span style="color: #33f;">3</span><span style="color: #080;">&#93;</span>,<span style="color: #080;">&#91;</span><span style="color: #33f;">1.5</span>,<span style="color: #33f;">3.5</span><span style="color: #080;">&#93;</span>,<span style="color:#A020F0;">'k--'</span><span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">hold</span> off</pre></td></tr></table></div>

<p>To calculate and plot hot/cold zones:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;">z=x=x1=x2<span style="color: #080;">&#91;</span><span style="color: #080;">&#93;</span>;
<span style="color: #0000FF;">for</span> <span style="color: #0000FF;"><span style="color: #33f;">i</span></span> = <span style="color: #33f;">1</span>:<span style="color: #33f;">3</span>
x=<span style="color: #0000FF;">find</span><span style="color: #080;">&#40;</span>X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>&gt;=-<span style="color: #33f;">1</span> &amp; X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>&lt;=-<span style="color: #33f;">1</span>+<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span> &amp; X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>&gt;=<span style="color: #33f;">1.5</span>+<span style="color: #080;">&#40;</span><span style="color: #33f;">i</span>-<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>*<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span> &amp; X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>&lt;=<span style="color: #33f;">1.5</span>+<span style="color: #0000FF;"><span style="color: #33f;">i</span></span>*<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span>;
x1=<span style="color: #0000FF;">find</span><span style="color: #080;">&#40;</span>X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>&gt;=-<span style="color: #33f;">1</span>+<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span> &amp; X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>&lt;=-<span style="color: #33f;">1</span>+<span style="color: #33f;">4</span>/<span style="color: #33f;">3</span> &amp; X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>&gt;=<span style="color: #33f;">1.5</span>+<span style="color: #080;">&#40;</span><span style="color: #33f;">i</span>-<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>*<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span> &amp; X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>&lt;=<span style="color: #33f;">1.5</span>+<span style="color: #0000FF;"><span style="color: #33f;">i</span></span>*<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span>
x2=<span style="color: #0000FF;">find</span><span style="color: #080;">&#40;</span>X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>&gt;=-<span style="color: #33f;">1</span>+<span style="color: #33f;">4</span>/<span style="color: #33f;">3</span> &amp; X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>&lt;=<span style="color: #33f;">1</span> &amp; X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>&gt;=<span style="color: #33f;">1.5</span>+<span style="color: #080;">&#40;</span><span style="color: #33f;">i</span>-<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>*<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span> &amp; X<span style="color: #080;">&#40;</span>:,<span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>&lt;=<span style="color: #33f;">1.5</span>+<span style="color: #0000FF;"><span style="color: #33f;">i</span></span>*<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span>;  
z=<span style="color: #080;">&#91;</span><span style="color: #0000FF;">mean</span><span style="color: #080;">&#40;</span>y<span style="color: #080;">&#40;</span>x,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> <span style="color: #0000FF;">mean</span><span style="color: #080;">&#40;</span>y<span style="color: #080;">&#40;</span>x1,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> <span style="color: #0000FF;">mean</span><span style="color: #080;">&#40;</span>y<span style="color: #080;">&#40;</span>x2,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span> z<span style="color: #080;">&#93;</span>;  
<span style="color: #0000FF;">end</span>
<span style="color: #0000FF;">hold</span> on
text<span style="color: #080;">&#40;</span>-.8,<span style="color: #33f;">3.5</span>-<span style="color: #33f;">1</span>/<span style="color: #33f;">3</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>z<span style="color: #080;">&#40;</span><span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>,<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
text<span style="color: #080;">&#40;</span>-<span style="color: #33f;">1</span>+<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span>+.2,<span style="color: #33f;">3.5</span>-<span style="color: #33f;">1</span>/<span style="color: #33f;">3</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>z<span style="color: #080;">&#40;</span><span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>,<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
text<span style="color: #080;">&#40;</span><span style="color: #33f;">1</span>-<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span>+.2,<span style="color: #33f;">3.5</span>-<span style="color: #33f;">1</span>/<span style="color: #33f;">3</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>z<span style="color: #080;">&#40;</span><span style="color: #33f;">3</span><span style="color: #080;">&#41;</span>,<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
text<span style="color: #080;">&#40;</span>-.8,<span style="color: #33f;">2.5</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>z<span style="color: #080;">&#40;</span><span style="color: #33f;">4</span><span style="color: #080;">&#41;</span>,<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
text<span style="color: #080;">&#40;</span>-<span style="color: #33f;">1</span>+<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span>+.2,<span style="color: #33f;">2.5</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>z<span style="color: #080;">&#40;</span><span style="color: #33f;">5</span><span style="color: #080;">&#41;</span>,<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
text<span style="color: #080;">&#40;</span><span style="color: #33f;">1</span>-<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span>+.2,<span style="color: #33f;">2.5</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>z<span style="color: #080;">&#40;</span><span style="color: #33f;">6</span><span style="color: #080;">&#41;</span>,<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
text<span style="color: #080;">&#40;</span>-.8,<span style="color: #33f;">1.5</span>+<span style="color: #33f;">1</span>/<span style="color: #33f;">3</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>z<span style="color: #080;">&#40;</span><span style="color: #33f;">7</span><span style="color: #080;">&#41;</span>,<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
text<span style="color: #080;">&#40;</span>-<span style="color: #33f;">1</span>+<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span>+.2,<span style="color: #33f;">1.5</span>+<span style="color: #33f;">1</span>/<span style="color: #33f;">3</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>z<span style="color: #080;">&#40;</span><span style="color: #33f;">8</span><span style="color: #080;">&#41;</span>,<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
text<span style="color: #080;">&#40;</span><span style="color: #33f;">1</span>-<span style="color: #33f;">2</span>/<span style="color: #33f;">3</span>+.2,<span style="color: #33f;">1.5</span>+<span style="color: #33f;">1</span>/<span style="color: #33f;">3</span>,<span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>z<span style="color: #080;">&#40;</span><span style="color: #33f;">9</span><span style="color: #080;">&#41;</span>,<span style="color: #33f;">3</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">hold</span> off</pre></td></tr></table></div>

<p><a href="http://sportsobjective.com/wordpress/wp-content/uploads/2012/06/hcz_jeter.jpg" ><img src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/06/hcz_jeter-300x225.jpg" alt="" title="hcz_jeter" width="300" height="225" class="aligncenter size-medium wp-image-4387" /></a></p>
<p>Here is a multi-plot figure with a surface plot of Jeter&#8217;s data:</p>
<p><a href="http://sportsobjective.com/wordpress/wp-content/uploads/2012/06/ex_jeter_subplot.jpg" ><img src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/06/ex_jeter_subplot-273x300.jpg" alt="" title="ex_jeter_subplot" width="273" height="300" class="aligncenter size-medium wp-image-4388" /></a></p>
<p>Rick Reed&#8217;s strike zone from 2008-2011:</p>
<p><a href="http://sportsobjective.com/wordpress/wp-content/uploads/2012/06/rr_sz.jpg" ><img src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/06/rr_sz-300x117.jpg" alt="" title="rr_sz" width="300" height="117" class="aligncenter size-medium wp-image-4389" /></a></p>
<p>Just an example of some of the things Octave can do.  Copy the code directly into the PHP file and insert into a variable or directly into &#8216;fwrite&#8217; and the Octave script can be opened directly from PHP.</p>
<p>All of this should work fine with MatLab, or even FreeMat (another open-source alternative).</p>
<p><a href="http://sportsobjective.com/wordpress/wp-content/uploads/2012/06/pfx_octave_example.tar.gz" >pfx_octave_example</a></p>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsportsobjective.com%2Fwordpress%2F%3Fp%3D4385&amp;title=Pitch%20F%2FX%20with%20PHP%20and%20Octave" id="wpa2a_10"><img src="http://sportsobjective.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://sportsobjective.com/wordpress/?feed=rss2&#038;p=4385</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Build a Line Database</title>
		<link>http://sportsobjective.com/wordpress/?p=4364</link>
		<comments>http://sportsobjective.com/wordpress/?p=4364#comments</comments>
		<pubDate>Tue, 29 May 2012 00:12:30 +0000</pubDate>
		<dc:creator>Rufio Magillicutty</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MLB]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Pinnacle]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[baseball]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[javascriptr]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[line movement]]></category>
		<category><![CDATA[Lines]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Odds]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[pinnacle]]></category>
		<category><![CDATA[pinnacle sports]]></category>
		<category><![CDATA[webserve]]></category>

		<guid isPermaLink="false">http://sportsobjective.com/wordpress/?p=4364</guid>
		<description><![CDATA[Apologies for not having provided any content lately (my tweets have certainly offended about ten users). I would have wrote this months ago but I didn&#8217;t. Let me preface this futher by saying, assuming one will be building a database on a local web-server, I highly recommend using another computer other than the primary one [...]]]></description>
				<content:encoded><![CDATA[
<p>Apologies for not having provided any content lately (my tweets have certainly offended about ten users). I would have wrote this months ago but I didn&#8217;t.</p>
<p>Let me preface this futher by saying, assuming one will be building a database on a local web-server, I highly recommend using another computer other than the primary one to run a server.  I have an old Toshiba laptop that is running Debian (Debian 6.0 is the latest version) and sits in the back of my closet.</p>
<p>In a previous post I uploaded an Excel file that automatically extracts lines from Pinnacle and inserts into an Access database on open (keep the file open and invoke the &#8220;Application.OnTime&#8221; VBA function for a reoccurring call, or set up a windows task scheduler event).  But that requires Windows, and ideally one would want a solution that can be applied across various operating systems.  PHP and MySQL is one such solution.  Linux users can simply download apache, php, and mysql from the repository.  Windows or MAC users might want to look into downloading <a rel="nofollow" href="http://sourceforge.net/projects/xampp/" >XAMPP</a>.  PHP is a server-side scripting language, so it operates via some sort of web-server, such as apache (if PHP is unfamiliar, just carefully read the code it and should be pretty straight-foward).  And MySQL provides the database structure and query language that can be interfaced with most programming languages.  I would also suggest setting up an <a href="http://inside.mines.edu/~gmurray/HowTo/sshNotes.html" >ssh connection</a>, from one computer on the network to the one running the server.</p>
<p>Here is my SQL table structure configured for baseball lines from Pinnacle (assuming a database has already been created):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #990099; font-weight: bold;"><span style="color: #009900;">IF</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> EXISTS</span> <span style="color: #008000;">`LINES`</span> <span style="color: #FF00FF;">&#40;</span>
  <span style="color: #008000;">`Date`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">55</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`vRot`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">5</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`Away`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">55</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`vListed`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">55</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`vLine`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">12</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`vTotal`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">12</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`vML`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`hRot`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">5</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`Home`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">55</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`hListed`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">55</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`hLine`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">12</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`hTotal`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">12</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`hML`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`nowTime`</span> <span style="color: #999900; font-weight: bold;">timestamp</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #000099;">CURRENT_TIMESTAMP</span><span style="color: #000033;">,</span>
  <span style="color: #FF9900; font-weight: bold;">UNIQUE</span> <span style="color: #990099; font-weight: bold;">KEY</span> <span style="color: #008000;">`ID`</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`Date`</span><span style="color: #000033;">,</span><span style="color: #008000;">`vRot`</span><span style="color: #000033;">,</span><span style="color: #008000;">`vListed`</span><span style="color: #000033;">,</span><span style="color: #008000;">`hRot`</span><span style="color: #000033;">,</span><span style="color: #008000;">`hListed`</span><span style="color: #000033;">,</span><span style="color: #008000;">`hML`</span><span style="color: #000033;">,</span><span style="color: #008000;">`hTotal`</span><span style="color: #000033;">,</span><span style="color: #008000;">`hLine`</span><span style="color: #000033;">,</span><span style="color: #008000;">`vML`</span><span style="color: #000033;">,</span><span style="color: #008000;">`vTotal`</span><span style="color: #000033;">,</span><span style="color: #008000;">`vLine`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">ENGINE</span><span style="color: #CC0099;">=</span>MyISAM <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #FF9900; font-weight: bold;">CHARSET</span><span style="color: #CC0099;">=</span>latin1<span style="color: #000033;">;</span></pre></td></tr></table></div>

<p>The &#8216;nowTime&#8217; column automatically tracks the current time on data insert. This table is meant to accomodate those interested in tracking line movement, because Pinnacle&#8217;s XML updates everytime there is new information added. To take advantage of this, an intermittent call (Pinnacle allows at least 60 seconds between calls) can be made using whatever fashion is most convenient for the programmer (cron job, delayed loop&#8230;). And to avoid redundant database inserts, indexing every column and using the &#8216;INSERT IGNORE&#8217; sql command is essential.</p>
<p>Again, I&#8217;m using PHP, and here is my PHP code to grab MLB lines from Pinnacle and insert them into the above SQL table (my database name is &#8216;MLB&#8217;):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//error_reporting(0);</span>
<span style="color: #000088;">$host</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$username</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'USER'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pswrd</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'PASS'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$con</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$host</span><span style="color: #339933;">,</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span><span style="color: #000088;">$pswrd</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Could not connect: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;MLB&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error while selecting db'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$xmldoc</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DOMDocument<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://xml.pinnaclesports.com/pinnacleFeed.aspx?sporttype=baseball&amp;sportsubtype=MLB'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$xmldoc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$xmldoc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">documentElement</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$event</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;event&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$event</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$ev</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$ml_v</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsbyTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;moneyline_visiting&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$ml_h</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsbyTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;moneyline_home&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ml_h</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">continue</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000088;">$total_v</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsbyTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;total_points&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsbyTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;over_adjust&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$total_h</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsbyTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;total_points&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsbyTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;under_adjust&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$d</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;event_datetimeGMT&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$teamnames</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;participant_name&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$name_v</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$teamnames</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$name_h</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$teamnames</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$rot</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;rotnum&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$rotv</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$rot</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$roth</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$rot</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$pitcher</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;pitcher&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$pitch_v</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pitcher</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$pitch_h</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pitcher</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$spread_v</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsbyTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;spread_visiting&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsbyTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;spread_adjust_visiting&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span> 
  <span style="color: #000088;">$spread_h</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsbyTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;spread_home&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$ev</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsbyTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;spread_adjust_home&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span> 
&nbsp;
  <span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT IGNORE INTO MLB.LINES (Date,vRot,Away,vListed,vLine,vTotal,vML,hRot,Home,hListed,hLine,hTotal,hML) Values ('<span style="color: #006699; font-weight: bold;">$d</span>','<span style="color: #006699; font-weight: bold;">$rotv</span>','<span style="color: #006699; font-weight: bold;">$name_v</span>','<span style="color: #006699; font-weight: bold;">$pitch_v</span>','<span style="color: #006699; font-weight: bold;">$spread_v</span>','<span style="color: #006699; font-weight: bold;">$total_v</span>','<span style="color: #006699; font-weight: bold;">$ml_v</span>','<span style="color: #006699; font-weight: bold;">$roth</span>','<span style="color: #006699; font-weight: bold;">$name_h</span>','<span style="color: #006699; font-weight: bold;">$pitch_h</span>','<span style="color: #006699; font-weight: bold;">$spread_h</span>','<span style="color: #006699; font-weight: bold;">$total_h</span>','<span style="color: #006699; font-weight: bold;">$ml_h</span>')&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #339933;">,</span><span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Could not insert values: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>You can use whatever language you want, some are more comfortable with python, perl, javascript, <del datetime="2012-05-28T22:49:16+00:00">brainfuck,</del> etc&#8230;</p>
<p>What is important is knowing how to access your MySQL database from the script and how to <a href="http://sportsobjective.com/wordpress/?p=3885" title="Grabbing Pinnacle Lines with Excel and DOM" >navigate the Pinnacle XML file</a>.</p>
<p>As a paranthetical, I previously mentioned running a cron job. In Windows, one may have to <a href="http://drupal.org/node/31506" >use the task scheduler</a>. In MAC or LINUX, the ability to run a cron job should already be set up, just edit the crontab file. For example, a linux user simply has to type in a terminal:</p>
<pre>crontab -e</pre>
<p>And add the line:</p>
<pre>*/2 * * * * /usr/bin/php path/to/php/file.php</pre>
<p>This simply means, every two minutes (&#8220;/2&#8243;), a php file will be opened by the program &#8220;php.&#8221;</p>
<p>Now if everything works, we can start to present the lines in a nice HTML table. First, create a PHP file to query the database, grabbing the latest lines for each game listed at Pinnacle, and outputting the information in JSON format. This can be a bit tricky, but here is my solution (after connecting to a database with the name &#8216;MLB&#8217;):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">...</span>
<span style="color: #000088;">$sql</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SELECT * <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;FROM MLB.LINES AS m<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;INNER JOIN (<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;SELECT c.vROT, MAX( c.nowTime ) AS maxtime<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;FROM MLB.LINES AS c<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;GROUP BY c.vROT<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;) AS a ON m.vROT = a.vROT<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;AND m.nowTime = a.maxtime WHERE NOW()&lt;=DATE_SUB(m.Date,INTERVAL 4 HOUR)&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #339933;">=</span><span style="color: #990000;">mysql_fetch_assoc</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$results</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'D'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Date'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hRot'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hRot'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vRot'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vRot'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Away'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Away'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Home'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Home'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vListed'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vListed'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hListed'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hListed'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vML'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vML'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hML'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hML'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vTotal'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vTotal'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hTotal'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hTotal'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vLine'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vLine'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$array</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hLine'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hLine'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: application/json'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$array</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">...</span></pre></td></tr></table></div>

<p>The advantage of Jquery is the background calls it can make to another file on a server and at the same time read and parse the information that is queried from that file.  The &#8220;.getJSON&#8221; subroutine makes this possible by making calls every 120 seconds (120000) to the php file &#8220;MLB_Pinny.php&#8221;:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> $ <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">var</span> timeout<span style="color: #339933;">,</span> d<span style="color: #339933;">;</span>
	getPinny<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">function</span> getPinny<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'php/MLB_Pinny.php?'</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">new</span> <span style="">Date</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>json_data<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			update <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> <span style="">Date</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#update td:first'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'LAST UPDATE: '</span><span style="color: #339933;">+</span>update.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;yyyy-MM-dd h:mm&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#today tr:not(:first)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tomorrow tr:not(:first)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    			$.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>json_data<span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> item<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			d <span style="color: #339933;">=</span> <span style="">Date</span>.<span style="color: #660066;">parse</span><span style="color: #009900;">&#40;</span>item.<span style="color: #660066;">D</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addHours</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			cur <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>d.<span style="color: #660066;">getDayName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="">Date</span>.<span style="color: #660066;">today</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getDayName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #3366CC;">&quot;today&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;tomorrow&quot;</span><span style="color: #339933;">;</span>
         		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">+</span>cur<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;tr&gt;&lt;td rowspan=&quot;2&quot;&gt;'</span> <span style="color: #339933;">+</span> d.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;yyyy-MM-dd h:mm&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">vRot</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td class=&quot;team&quot;&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">Away</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td class=&quot;pitch&quot;&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">vListed</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td class=&quot;ml&quot;&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">vML</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">vTotal</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">vLine</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">hRot</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td class=&quot;team&quot;&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">Home</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td class=&quot;pitch&quot;&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">hListed</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td class=&quot;ml&quot;&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">hML</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">hTotal</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;td&gt;'</span> <span style="color: #339933;">+</span> item.<span style="color: #660066;">hLine</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/td&gt;&lt;/tr&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   			 <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	timeout <span style="color: #339933;">=</span> setInterval<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> getPinny<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">120000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Mine looks like this:</p>
<p><a href="http://sportsobjective.com/wordpress/wp-content/uploads/2012/05/linestable.jpg" ><img src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/05/linestable.jpg" alt="" title="linestable" width="546" height="536" class="aligncenter size-full wp-image-4369" /></a></p>
<p>I have two &#8220;tbody&#8221; sections, one with &#8216;id = &#8220;today&#8221;&#8216; and the other &#8216;id = &#8220;tomorrow&#8221;&#8216;.  This should be self-explanatory.</p>
<p>Feel free to add some table enhancements (in this case, a toggle):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#today'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tr:eq(0)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#today'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tr:gt(0)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tomorrow'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tr:eq(0)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tomorrow'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tr:gt(0)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>It would be nice if included was the ability to query a pitcher&#8217;s closing lines for each start:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">...</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pitch'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;%&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;. &quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pitch'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$sql</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SELECT * <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;FROM MLB.LINES AS m<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;WHERE vLISTED LIKE '%<span style="color: #006699; font-weight: bold;">$query</span>%' OR hLISTED LIKE '%<span style="color: #006699; font-weight: bold;">$query</span>%'<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;ORDER BY nowTime DESC&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'HTTP/1.1 400 Bad Request'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Please use correct paramaters'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #339933;">,</span><span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error while executing query'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;
&lt;table border=1&gt;&lt;thead&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Away&lt;/th&gt;&lt;th&gt;vListed&lt;/th&gt;&lt;th&gt;vML&lt;/th&gt;&lt;th&gt;Home&lt;/th&gt;&lt;th&gt;hListed&lt;/th&gt;&lt;th&gt;hML&lt;/th&gt;&lt;/thead&gt;&lt;tbody&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #339933;">=</span><span style="color: #990000;">mysql_fetch_assoc</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$d</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Date'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">continue</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vListed'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$boldvml</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vML'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/strong&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$boldvnm</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vListed'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/strong&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$boldvtm</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Away'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/strong&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$boldhml</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hML'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$boldhnm</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hListed'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$boldhtm</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Home'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$boldhml</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hML'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/strong&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$boldhnm</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hListed'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/strong&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$boldhtm</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Home'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/strong&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$boldvml</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vML'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$boldvnm</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vListed'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$boldvtm</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Away'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$d</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Date'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;tr&gt;&lt;td&gt;'</span><span style="color: #339933;">.</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-m-d hh:MM&quot;</span><span style="color: #339933;">,</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Date'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'-4hours'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/td&gt;&lt;td&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$boldvtm</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/td&gt;&lt;td&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$boldvnm</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/td&gt;&lt;td&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$boldvml</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/td&gt;&lt;td&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$boldhtm</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/td&gt;&lt;td&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$boldhnm</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/td&gt;&lt;td&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$boldhml</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/td&gt;&lt;/tr&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #339933;">...</span></pre></td></tr></table></div>

<p>Additionally, the HTML table needs to have the cell with the starter&#8217;s name clickable. Jquery can do this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.pitch'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">live</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		window.<span style="color: #660066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'php/linedb.php?pitch='</span><span style="color: #339933;">+</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot; &quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;%&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Occassionally, Pinnacle has a listed starer in the format &#8220;F LAST&#8221; rather than &#8220;F. Last&#8221;, this usually occurs when there is a late change in the listed starter or the pitcher is making his/her first start.  Hence, there are some minor whitespace and trimming issues that for now seem to be resolved with some of the above code.</p>
<p>Hopefully what all this accomplishes is a personal Pinnacle line service, one that updates every 60+ seconds without having to refresh the browser or re-run a query. One could easily integrate the PHP code for different sports. Obviously, basketball and football do not have listed starters, other than that the PHP code should work fine once pointed to the relevant Pinnacle XML file (or any other sportsbook).</p>
<p>I haven&#8217;t updated this in a while, but on<a href="http://www.github.com/wa-rufio" > my github account</a> there is a &#8220;SP-DATABASE&#8221; project. More importantly, various PHP and MySQL files are provided that can be used independently of the html front-end, and provide a template to abuse Pinnacle.</p>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsportsobjective.com%2Fwordpress%2F%3Fp%3D4364&amp;title=How%20to%20Build%20a%20Line%20Database" id="wpa2a_12"><img src="http://sportsobjective.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://sportsobjective.com/wordpress/?feed=rss2&#038;p=4364</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Comparing Rating Systems For NCAA Tournament</title>
		<link>http://sportsobjective.com/wordpress/?p=4352</link>
		<comments>http://sportsobjective.com/wordpress/?p=4352#comments</comments>
		<pubDate>Fri, 16 Mar 2012 01:51:52 +0000</pubDate>
		<dc:creator>Rufio Magillicutty</dc:creator>
				<category><![CDATA[Betting]]></category>
		<category><![CDATA[kenpom]]></category>
		<category><![CDATA[NCAAB]]></category>
		<category><![CDATA[Pinnacle]]></category>
		<category><![CDATA[tournament]]></category>
		<category><![CDATA[Basketball]]></category>
		<category><![CDATA[bbstate]]></category>
		<category><![CDATA[bet]]></category>
		<category><![CDATA[bracket]]></category>
		<category><![CDATA[championship]]></category>
		<category><![CDATA[College]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[final four]]></category>
		<category><![CDATA[future]]></category>
		<category><![CDATA[line movement]]></category>
		<category><![CDATA[ncaa championship]]></category>
		<category><![CDATA[Odds]]></category>
		<category><![CDATA[pinnacle]]></category>
		<category><![CDATA[Wager]]></category>

		<guid isPermaLink="false">http://sportsobjective.com/wordpress/?p=4352</guid>
		<description><![CDATA[The images represent how each rating system projects the NCAAB Tournament. The higher rated team was selected for each matchup. For the bracket labeled &#8220;PINNY&#8221;, the future odds from Pinnacle were used to assess team-by-team comparison. Click on the image for full-size view.]]></description>
				<content:encoded><![CDATA[
<p>The images represent how each rating system projects the NCAAB Tournament.  The higher rated team was selected for each matchup.  For the bracket labeled &#8220;PINNY&#8221;, the future odds from Pinnacle were used to assess team-by-team comparison.  Click on the image for full-size view.</p>

<a href='http://sportsobjective.com/wordpress/?attachment_id=4353' title='KP2012BRACKET'><img width="150" height="150" src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/03/KP2012BRACKET-150x150.jpg" class="attachment-thumbnail" alt="KENPOM" /></a>
<a href='http://sportsobjective.com/wordpress/?attachment_id=4354' title='BBSTATE2012BRACKET'><img width="150" height="150" src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/03/BBSTATE2012BRACKET-150x150.jpg" class="attachment-thumbnail" alt="BBSTATE" /></a>
<a href='http://sportsobjective.com/wordpress/?attachment_id=4357' title='PINNY2012BRACKET'><img width="150" height="150" src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/03/PINNY2012BRACKET-150x150.jpg" class="attachment-thumbnail" alt="PINNY" /></a>
<a href='http://sportsobjective.com/wordpress/?attachment_id=4359' title='SAGARINBRACKET'><img width="150" height="150" src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/03/SAGARINBRACKET-150x150.jpg" class="attachment-thumbnail" alt="SAGARIN" /></a>
<a href='http://sportsobjective.com/wordpress/?attachment_id=4360' title='RPI2012BRACKET'><img width="150" height="150" src="http://sportsobjective.com/wordpress/wp-content/uploads/2012/03/RPI2012BRACKET-150x150.jpg" class="attachment-thumbnail" alt="RPI" /></a>


<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsportsobjective.com%2Fwordpress%2F%3Fp%3D4352&amp;title=Comparing%20Rating%20Systems%20For%20NCAA%20Tournament" id="wpa2a_14"><img src="http://sportsobjective.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://sportsobjective.com/wordpress/?feed=rss2&#038;p=4352</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NCAA Tourney KP vs Pinny</title>
		<link>http://sportsobjective.com/wordpress/?p=4344</link>
		<comments>http://sportsobjective.com/wordpress/?p=4344#comments</comments>
		<pubDate>Thu, 15 Mar 2012 05:53:49 +0000</pubDate>
		<dc:creator>Rufio Magillicutty</dc:creator>
				<category><![CDATA[Betting]]></category>
		<category><![CDATA[NCAAB]]></category>
		<category><![CDATA[Pinnacle]]></category>
		<category><![CDATA[Basketball]]></category>
		<category><![CDATA[bracket]]></category>
		<category><![CDATA[Bracket Predictions]]></category>
		<category><![CDATA[Bracket Projections]]></category>
		<category><![CDATA[College]]></category>
		<category><![CDATA[Duke]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[final four]]></category>
		<category><![CDATA[future]]></category>
		<category><![CDATA[kenpom]]></category>
		<category><![CDATA[Kentucky]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[Lines]]></category>
		<category><![CDATA[Missouri]]></category>
		<category><![CDATA[National Championship]]></category>
		<category><![CDATA[Odds]]></category>
		<category><![CDATA[odds to win]]></category>
		<category><![CDATA[pinnacle]]></category>
		<category><![CDATA[Regional Final]]></category>
		<category><![CDATA[tournament]]></category>
		<category><![CDATA[UNC]]></category>

		<guid isPermaLink="false">http://sportsobjective.com/wordpress/?p=4344</guid>
		<description><![CDATA[Same thing as conference tournaments. SEC Field hit at 3/1 odds, the other four lost. A brief survey of a hypothetical bankroll outcome demonstrated the prodigious and frightening force of the Kelly Criterion and all the emotional turmoil likely to beget its constituency. Flat bettors would have come away in the negative, but with an [...]]]></description>
				<content:encoded><![CDATA[
<p>Same thing as <a href="http://sportsobjective.com/wordpress/?p=4341" title="NCAAB Conference Tourney’s: Pinny v KenPom" >conference tournaments</a>. SEC Field hit at 3/1 odds, the other four lost. A brief survey of a hypothetical bankroll outcome demonstrated the prodigious and frightening force of the Kelly Criterion and all the emotional turmoil likely to beget its constituency. Flat bettors would have come away in the negative, but with an air of optimism and satisfaction having lingered for hitting a future.</p>
<p>KenPom&#8217;s LOG5 predictions are <a href="http://kenpom.com/blog/index.php/weblog/ncaa_tourney_log5/" >here</a>. If you don&#8217;t know what that means, to wit:</p>
<p>LOG5 = (a &#8211; a * b)/(a + b &#8211; 2 * a * b)</p>
<p>&#8220;a&#8221; and &#8220;b&#8221; here are winning percentages. KenPom uses his pythagorean winning percentages calculated by PPP and tempo rather than just points scored for and against, with an exponent of around 12.</p>
<p>(Numbers in each cell represent percentages sans the non-obligatory &#8220;%&#8221; symbol).</p>
<table border="0" frame="VOID" rules="NONE" cellspacing="0">
<colgroup>
<col width="86" />
<col width="86" />
<col width="86" />
<col width="86" /></colgroup>
<tbody>
<tr>
<td colspan="4" align="CENTER" valign="MIDDLE" width="343" height="23"><strong><span style="font-size: medium;">TOP 5</span></strong></td>
</tr>
<tr>
<td colspan="2" align="CENTER" valign="MIDDLE" bgcolor="#B3B3B3" height="17">REGION</td>
<td colspan="2" align="CENTER" valign="MIDDLE" bgcolor="#B3B3B3">CHAMP</td>
</tr>
<tr>
<td align="LEFT" height="17">Ohio St</td>
<td align="CENTER">10.54</td>
<td align="LEFT">Ohio St</td>
<td align="CENTER">3.55</td>
</tr>
<tr>
<td align="LEFT" height="17">Mich St</td>
<td align="CENTER">7.64</td>
<td align="LEFT">Wisconsin</td>
<td align="CENTER">2.24</td>
</tr>
<tr>
<td align="LEFT" height="17">Wisconsin</td>
<td align="CENTER">6.97</td>
<td align="LEFT">Mich St</td>
<td align="CENTER">1.98</td>
</tr>
<tr>
<td align="LEFT" height="17">Kansas</td>
<td align="CENTER">6.8</td>
<td align="LEFT">Kansas</td>
<td align="CENTER">1.74</td>
</tr>
<tr>
<td align="LEFT" height="17">Indiana</td>
<td align="CENTER">3.38</td>
<td align="LEFT">Indiana</td>
<td align="CENTER">0.67</td>
</tr>
</tbody>
</table>
<p>Mr. Pomeroy &#8220;likes&#8221; the Big Ten, Pinnacle doesn&#8217;t.</p>
<p>&nbsp;</p>
<table border="0" frame="VOID" rules="NONE" cellspacing="0">
<colgroup>
<col width="86" />
<col width="86" />
<col width="86" />
<col width="86" />
<col width="86" />
<col width="86" />
<col width="86" /></colgroup>
<tbody>
<tr>
<td colspan="7" align="CENTER" valign="MIDDLE" width="600" height="30"><span style="font-size: large;">SOUTH</span></td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td colspan="2" align="CENTER" valign="MIDDLE">KP</td>
<td colspan="2" align="CENTER" valign="MIDDLE">PINNY</td>
<td colspan="2" align="CENTER" valign="MIDDLE">KP-P</td>
</tr>
<tr>
<td align="LEFT" height="17">TEAM</td>
<td align="LEFT">REGION</td>
<td align="LEFT">CHAMP</td>
<td align="LEFT">REGION</td>
<td align="LEFT">CHAMP</td>
<td align="LEFT">REGION</td>
<td align="LEFT">CHAMP</td>
</tr>
<tr>
<td align="LEFT" height="17">Kentucky</td>
<td align="RIGHT">47.9</td>
<td align="RIGHT">19.7</td>
<td align="RIGHT">47.4</td>
<td align="RIGHT">27.78</td>
<td align="RIGHT">0.5</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-8.08</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Wichita St</td>
<td align="RIGHT">11.8</td>
<td align="RIGHT">2.6</td>
<td align="RIGHT">8.43</td>
<td align="RIGHT">2.32</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>3.37</strong></td>
<td align="RIGHT">0.28</td>
</tr>
<tr>
<td align="LEFT" height="23">Indiana</td>
<td align="RIGHT">9.2</td>
<td align="RIGHT">1.7</td>
<td align="RIGHT">5.82</td>
<td align="RIGHT">1.03</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>3.38</strong></td>
<td align="RIGHT">0.67</td>
</tr>
<tr>
<td align="LEFT" height="17">Baylor</td>
<td align="RIGHT">10.9</td>
<td align="RIGHT">1.7</td>
<td align="RIGHT">12.08</td>
<td align="RIGHT">2.82</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.18</strong></td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.12</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Duke</td>
<td align="RIGHT">9.5</td>
<td align="RIGHT">1.7</td>
<td align="RIGHT">12.08</td>
<td align="RIGHT">4.8</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-2.58</strong></td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-3.1</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">UNLV</td>
<td align="RIGHT">3</td>
<td align="RIGHT">0.2</td>
<td align="RIGHT">3.51</td>
<td align="RIGHT">0.73</td>
<td align="RIGHT">-0.51</td>
<td align="RIGHT">-0.53</td>
</tr>
<tr>
<td align="LEFT" height="17">Iowa St.</td>
<td align="RIGHT">1.7</td>
<td align="RIGHT">0.1</td>
<td align="RIGHT">1.31</td>
<td align="RIGHT">0.42</td>
<td align="RIGHT">0.39</td>
<td align="RIGHT">-0.32</td>
</tr>
<tr>
<td align="LEFT" height="17">Notre Dame</td>
<td align="RIGHT">1.9</td>
<td align="RIGHT">0.1</td>
<td align="RIGHT">1.96</td>
<td align="RIGHT">0.44</td>
<td align="RIGHT">-0.06</td>
<td align="RIGHT">-0.34</td>
</tr>
<tr>
<td align="LEFT" height="17">Uconn</td>
<td align="RIGHT">0.9</td>
<td align="RIGHT">0.06</td>
<td align="RIGHT">2.58</td>
<td align="RIGHT">1.07</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.68</strong></td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.01</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Xavier</td>
<td align="RIGHT">0.09</td>
<td align="RIGHT">0.04</td>
<td align="RIGHT">1.32</td>
<td align="RIGHT">0.43</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.23</strong></td>
<td align="RIGHT">-0.39</td>
</tr>
<tr>
<td align="LEFT" height="17">S Dakota St.</td>
<td align="RIGHT">0.8</td>
<td align="RIGHT">0.03</td>
<td align="RIGHT">0.41</td>
<td align="RIGHT">0.29</td>
<td align="RIGHT">0.39</td>
<td align="RIGHT">-0.26</td>
</tr>
<tr>
<td align="LEFT" height="17">VCU</td>
<td align="RIGHT">0.5</td>
<td align="RIGHT">0.02</td>
<td align="RIGHT">0.79</td>
<td align="RIGHT">0.29</td>
<td align="RIGHT">-0.29</td>
<td align="RIGHT">-0.27</td>
</tr>
<tr>
<td align="LEFT" height="17">Colorado</td>
<td align="RIGHT">0.4</td>
<td align="RIGHT">0.01</td>
<td align="RIGHT">0.67</td>
<td align="RIGHT">0.29</td>
<td align="RIGHT">-0.27</td>
<td align="RIGHT">-0.28</td>
</tr>
<tr>
<td align="LEFT" height="17">NMSU</td>
<td align="RIGHT">0.3</td>
<td align="RIGHT">0.01</td>
<td align="RIGHT">0.41</td>
<td align="RIGHT">0.35</td>
<td align="RIGHT">-0.11</td>
<td align="RIGHT">-0.34</td>
</tr>
<tr>
<td align="LEFT" height="17">Lehigh</td>
<td align="RIGHT">0.3</td>
<td align="RIGHT">0.007</td>
<td align="RIGHT">0.4</td>
<td align="RIGHT">0.21</td>
<td align="RIGHT">-0.1</td>
<td align="RIGHT">-0.203</td>
</tr>
<tr>
<td align="LEFT" height="17">WKY</td>
<td align="RIGHT">0.001</td>
<td align="LEFT"></td>
<td align="RIGHT">0.82</td>
<td align="RIGHT">0.32</td>
<td align="RIGHT">-0.819</td>
<td align="RIGHT">-0.32</td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td colspan="7" align="CENTER" valign="MIDDLE" height="30"><span style="font-size: large;">MIDWEST</span></td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td colspan="2" align="CENTER" valign="MIDDLE">KP</td>
<td colspan="2" align="CENTER" valign="MIDDLE">PINNY</td>
<td colspan="2" align="CENTER" valign="MIDDLE">KP-P</td>
</tr>
<tr>
<td align="LEFT" height="17">TEAM</td>
<td align="LEFT" bgcolor="#B3B3B3">REGION</td>
<td align="LEFT" bgcolor="#B3B3B3">CHAMP</td>
<td align="LEFT" bgcolor="#B3B3B3">REGION</td>
<td align="LEFT" bgcolor="#B3B3B3">CHAMP</td>
<td align="LEFT" bgcolor="#B3B3B3">REGION</td>
<td align="LEFT" bgcolor="#B3B3B3">CHAMP</td>
</tr>
<tr>
<td align="LEFT" height="17">UNC</td>
<td align="RIGHT">28.5</td>
<td align="RIGHT">6.6</td>
<td align="RIGHT">32.95</td>
<td align="RIGHT">13.64</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-4.45</strong></td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-7.04</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Kansas</td>
<td align="RIGHT">33.7</td>
<td align="RIGHT">9.1</td>
<td align="RIGHT">26.9</td>
<td align="RIGHT">7.36</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>6.8</strong></td>
<td align="RIGHT" bgcolor="#33CC66"><strong>1.74</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Gtown</td>
<td align="RIGHT">9.7</td>
<td align="RIGHT">1.4</td>
<td align="RIGHT">7.31</td>
<td align="RIGHT">1.45</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>2.39</strong></td>
<td align="RIGHT">-0.05</td>
</tr>
<tr>
<td align="LEFT" height="17">Michigan</td>
<td align="RIGHT">5.7</td>
<td align="RIGHT">0.5</td>
<td align="RIGHT">4.57</td>
<td align="RIGHT">0.88</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>1.13</strong></td>
<td align="RIGHT">-0.38</td>
</tr>
<tr>
<td align="LEFT" height="17">Temple</td>
<td align="RIGHT">2.3</td>
<td align="RIGHT">0.1</td>
<td align="RIGHT">3.92</td>
<td align="RIGHT">0.64</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.62</strong></td>
<td align="RIGHT">-0.54</td>
</tr>
<tr>
<td align="LEFT" height="17">SDSU</td>
<td align="RIGHT">0.9</td>
<td align="RIGHT">0.03</td>
<td align="RIGHT">2.65</td>
<td align="RIGHT">0.52</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.75</strong></td>
<td align="RIGHT">-0.49</td>
</tr>
<tr>
<td align="LEFT" height="17">St. Mary&#8217;s</td>
<td align="RIGHT">1.2</td>
<td align="RIGHT">0.05</td>
<td align="RIGHT">2.65</td>
<td align="RIGHT">0.59</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.45</strong></td>
<td align="RIGHT">-0.54</td>
</tr>
<tr>
<td align="LEFT" height="17">Creighton</td>
<td align="RIGHT">2</td>
<td align="RIGHT">0.1</td>
<td align="RIGHT">1.61</td>
<td align="RIGHT">0.43</td>
<td align="RIGHT">0.39</td>
<td align="RIGHT">-0.33</td>
</tr>
<tr>
<td align="LEFT" height="17">Alabama</td>
<td align="RIGHT">3.1</td>
<td align="RIGHT">0.2</td>
<td align="RIGHT">2.04</td>
<td align="RIGHT">0.57</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>1.06</strong></td>
<td align="RIGHT">-0.37</td>
</tr>
<tr>
<td align="LEFT" height="17">Purdue</td>
<td align="RIGHT">3.9</td>
<td align="RIGHT">0.3</td>
<td align="RIGHT">3.92</td>
<td align="RIGHT">0.73</td>
<td align="RIGHT">-0.02</td>
<td align="RIGHT">-0.43</td>
</tr>
<tr>
<td align="LEFT" height="17">NC State</td>
<td align="RIGHT">1.5</td>
<td align="RIGHT">0.07</td>
<td align="RIGHT">4.57</td>
<td align="RIGHT">0.73</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-3.07</strong></td>
<td align="RIGHT">-0.66</td>
</tr>
<tr>
<td align="LEFT" height="17">USF</td>
<td align="RIGHT">0.3</td>
<td align="RIGHT">0.008</td>
<td align="RIGHT">0.81</td>
<td align="RIGHT">0.66</td>
<td align="RIGHT">-0.51</td>
<td align="RIGHT">-0.652</td>
</tr>
<tr>
<td align="LEFT" height="17">Ohio</td>
<td align="RIGHT">0.5</td>
<td align="RIGHT">0.01</td>
<td align="RIGHT">0.81</td>
<td align="RIGHT">0.29</td>
<td align="RIGHT">-0.31</td>
<td align="RIGHT">-0.28</td>
</tr>
<tr>
<td align="LEFT" height="17">Belmont</td>
<td align="RIGHT">4</td>
<td align="RIGHT">0.03</td>
<td align="RIGHT">3.92</td>
<td align="RIGHT">0.85</td>
<td align="RIGHT">0.08</td>
<td align="RIGHT">-0.82</td>
</tr>
<tr>
<td align="LEFT" height="17">Detroit</td>
<td align="RIGHT">0.07</td>
<td align="LEFT"></td>
<td align="RIGHT">0.54</td>
<td align="RIGHT">0.21</td>
<td align="RIGHT">-0.47</td>
<td align="RIGHT">-0.21</td>
</tr>
<tr>
<td align="LEFT" height="17">Vermont</td>
<td align="RIGHT">0.03</td>
<td align="LEFT"></td>
<td align="RIGHT">0.84</td>
<td align="RIGHT">0.39</td>
<td align="RIGHT">-0.81</td>
<td align="RIGHT">-0.39</td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td colspan="7" align="CENTER" valign="MIDDLE" height="30"><span style="font-size: large;">WEST</span></td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td colspan="2" align="CENTER" valign="MIDDLE">KP</td>
<td colspan="2" align="CENTER" valign="MIDDLE">PINNY</td>
<td colspan="2" align="CENTER" valign="MIDDLE">KP-P</td>
</tr>
<tr>
<td align="LEFT" height="17">TEAM</td>
<td align="LEFT" bgcolor="#B3B3B3">REGION</td>
<td align="LEFT" bgcolor="#B3B3B3">CHAMP</td>
<td align="LEFT" bgcolor="#B3B3B3">REGION</td>
<td align="LEFT" bgcolor="#B3B3B3">CHAMP</td>
<td align="LEFT" bgcolor="#B3B3B3">REGION</td>
<td align="LEFT" bgcolor="#B3B3B3">CHAMP</td>
</tr>
<tr>
<td align="LEFT" height="17">Mich St</td>
<td align="RIGHT">35.2</td>
<td align="RIGHT">12.4</td>
<td align="RIGHT">27.56</td>
<td align="RIGHT">10.42</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>7.64</strong></td>
<td align="RIGHT" bgcolor="#33CC66"><strong>1.98</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Missouri</td>
<td align="RIGHT">23.1</td>
<td align="RIGHT">5.3</td>
<td align="RIGHT">22.63</td>
<td align="RIGHT">8.31</td>
<td align="RIGHT">0.47</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-3.01</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Memphis</td>
<td align="RIGHT">8.2</td>
<td align="RIGHT">1.7</td>
<td align="RIGHT">5.67</td>
<td align="RIGHT">1.61</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>2.53</strong></td>
<td align="RIGHT">0.09</td>
</tr>
<tr>
<td align="LEFT" height="17">New Mexico</td>
<td align="RIGHT">7.1</td>
<td align="RIGHT">1</td>
<td align="RIGHT">7.84</td>
<td align="RIGHT">1.33</td>
<td align="RIGHT">-0.74</td>
<td align="RIGHT">-0.33</td>
</tr>
<tr>
<td align="LEFT" height="17">Marquette</td>
<td align="RIGHT">7.5</td>
<td align="RIGHT">0.9</td>
<td align="RIGHT">9</td>
<td align="RIGHT">2.34</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.5</strong></td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.44</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Loserville</td>
<td align="RIGHT">4.7</td>
<td align="RIGHT">0.5</td>
<td align="RIGHT">9.08</td>
<td align="RIGHT">2.61</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-4.38</strong></td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-2.11</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Florida</td>
<td align="RIGHT">4.4</td>
<td align="RIGHT">0.5</td>
<td align="RIGHT">3.97</td>
<td align="RIGHT">0.8</td>
<td align="RIGHT">0.43</td>
<td align="RIGHT">-0.3</td>
</tr>
<tr>
<td align="LEFT" height="17">St. Louis</td>
<td align="RIGHT">3.4</td>
<td align="RIGHT">0.5</td>
<td align="RIGHT">2.2</td>
<td align="RIGHT">0.57</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>1.2</strong></td>
<td align="RIGHT">-0.07</td>
</tr>
<tr>
<td align="LEFT" height="17">Virginia</td>
<td align="RIGHT">2.5</td>
<td align="RIGHT">0.2</td>
<td align="RIGHT">1.78</td>
<td align="RIGHT">0.43</td>
<td align="RIGHT">0.72</td>
<td align="RIGHT">-0.23</td>
</tr>
<tr>
<td align="LEFT" height="17">Murray St.</td>
<td align="RIGHT">1.4</td>
<td align="RIGHT">0.07</td>
<td align="RIGHT">3.05</td>
<td align="RIGHT">0.73</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.65</strong></td>
<td align="RIGHT">-0.66</td>
</tr>
<tr>
<td align="LEFT" height="17">LBSU</td>
<td align="RIGHT">1</td>
<td align="RIGHT">0.06</td>
<td align="RIGHT">1.3</td>
<td align="RIGHT">0.29</td>
<td align="RIGHT">-0.3</td>
<td align="RIGHT">-0.23</td>
</tr>
<tr>
<td align="LEFT" height="17">BYU</td>
<td align="RIGHT">0.5</td>
<td align="RIGHT">0.02</td>
<td align="RIGHT">3.91</td>
<td align="RIGHT">0.97</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-3.41</strong></td>
<td align="RIGHT">-0.95</td>
</tr>
<tr>
<td align="LEFT" height="17">Davidson</td>
<td align="RIGHT">0.3</td>
<td align="RIGHT">0.009</td>
<td align="RIGHT">0.71</td>
<td align="RIGHT">0.29</td>
<td align="RIGHT">-0.41</td>
<td align="RIGHT">-0.281</td>
</tr>
<tr>
<td align="LEFT" height="17">Colorado St.</td>
<td align="RIGHT">0.4</td>
<td align="RIGHT">0.008</td>
<td align="RIGHT">0.52</td>
<td align="RIGHT">0.29</td>
<td align="RIGHT">-0.12</td>
<td align="RIGHT">-0.282</td>
</tr>
<tr>
<td align="LEFT" height="17">LIU</td>
<td align="RIGHT">0.003</td>
<td align="LEFT"></td>
<td align="RIGHT">0.39</td>
<td align="RIGHT">0.17</td>
<td align="RIGHT">-0.387</td>
<td align="RIGHT">-0.17</td>
</tr>
<tr>
<td align="LEFT" height="17">Norfolk St</td>
<td align="RIGHT">0.0001</td>
<td align="LEFT"></td>
<td align="RIGHT">0.39</td>
<td align="RIGHT">0.21</td>
<td align="RIGHT">-0.3899</td>
<td align="RIGHT">-0.21</td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td colspan="7" align="CENTER" valign="MIDDLE" height="30"><span style="font-size: large;">EAST</span></td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td colspan="2" align="CENTER" valign="MIDDLE">KP</td>
<td colspan="2" align="CENTER" valign="MIDDLE">PINNY</td>
<td colspan="2" align="CENTER" valign="MIDDLE">KP-P</td>
</tr>
<tr>
<td align="LEFT" height="17">TEAM</td>
<td align="LEFT" bgcolor="#B3B3B3">REGION</td>
<td align="LEFT" bgcolor="#B3B3B3">CHAMP</td>
<td align="LEFT" bgcolor="#B3B3B3">REGION</td>
<td align="LEFT" bgcolor="#B3B3B3">CHAMP</td>
<td align="LEFT" bgcolor="#B3B3B3">REGION</td>
<td align="LEFT" bgcolor="#B3B3B3">CHAMP</td>
</tr>
<tr>
<td align="LEFT" height="17">Syracuse</td>
<td align="RIGHT">17.5</td>
<td align="RIGHT">4.4</td>
<td align="RIGHT">18.22</td>
<td align="RIGHT">5.72</td>
<td align="RIGHT">-0.72</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.32</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Ohio St</td>
<td align="RIGHT">45.9</td>
<td align="RIGHT">19.3</td>
<td align="RIGHT">35.36</td>
<td align="RIGHT">15.75</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>10.54</strong></td>
<td align="RIGHT" bgcolor="#33CC66"><strong>3.55</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">FSU</td>
<td align="RIGHT">3.9</td>
<td align="RIGHT">0.5</td>
<td align="RIGHT">9.29</td>
<td align="RIGHT">4.08</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-5.39</strong></td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-3.58</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Wisconsin</td>
<td align="RIGHT">16.2</td>
<td align="RIGHT">4.2</td>
<td align="RIGHT">9.23</td>
<td align="RIGHT">1.96</td>
<td align="RIGHT" bgcolor="#33CC66"><strong>6.97</strong></td>
<td align="RIGHT" bgcolor="#33CC66"><strong>2.24</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Vanderbilt</td>
<td align="RIGHT">4.9</td>
<td align="RIGHT">0.8</td>
<td align="RIGHT">7.92</td>
<td align="RIGHT">2.81</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-3.02</strong></td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-2.01</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Cincinnati</td>
<td align="RIGHT">1.8</td>
<td align="RIGHT">0.2</td>
<td align="RIGHT">4.39</td>
<td align="RIGHT">1.03</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-2.59</strong></td>
<td align="RIGHT">-0.83</td>
</tr>
<tr>
<td align="LEFT" height="17">Gonzaga</td>
<td align="RIGHT">1.7</td>
<td align="RIGHT">0.1</td>
<td align="RIGHT">2.4</td>
<td align="RIGHT">0.59</td>
<td align="RIGHT">-0.7</td>
<td align="RIGHT">-0.49</td>
</tr>
<tr>
<td align="LEFT" height="17">Kansas St</td>
<td align="RIGHT">3.4</td>
<td align="RIGHT">0.4</td>
<td align="RIGHT">4.39</td>
<td align="RIGHT">0.98</td>
<td align="RIGHT">-0.99</td>
<td align="RIGHT">-0.58</td>
</tr>
<tr>
<td align="LEFT" height="17">S. Miss</td>
<td align="RIGHT">0.2</td>
<td align="RIGHT">0.006</td>
<td align="RIGHT">0.98</td>
<td align="RIGHT">0.34</td>
<td align="RIGHT">-0.78</td>
<td align="RIGHT">-0.334</td>
</tr>
<tr>
<td align="LEFT" height="17">WVU</td>
<td align="RIGHT">0.8</td>
<td align="RIGHT">0.05</td>
<td align="RIGHT">2.4</td>
<td align="RIGHT">0.59</td>
<td align="RIGHT" bgcolor="#FF0000"><strong>-1.6</strong></td>
<td align="RIGHT">-0.54</td>
</tr>
<tr>
<td align="LEFT" height="17">Texas</td>
<td align="RIGHT">2.3</td>
<td align="RIGHT">0.2</td>
<td align="RIGHT">2.2</td>
<td align="RIGHT">0.52</td>
<td align="RIGHT">0.1</td>
<td align="RIGHT">-0.32</td>
</tr>
<tr>
<td align="LEFT" height="17">Harvard</td>
<td align="RIGHT">0.7</td>
<td align="RIGHT">0.04</td>
<td align="RIGHT">1.11</td>
<td align="RIGHT">0.29</td>
<td align="RIGHT">-0.41</td>
<td align="RIGHT">-0.25</td>
</tr>
<tr>
<td align="LEFT" height="17">Montana</td>
<td align="RIGHT">0.09</td>
<td align="RIGHT">0.002</td>
<td align="RIGHT">0.79</td>
<td align="RIGHT">0.29</td>
<td align="RIGHT">-0.7</td>
<td align="RIGHT">-0.288</td>
</tr>
<tr>
<td align="LEFT" height="17">St. Bona</td>
<td align="RIGHT">0.6</td>
<td align="RIGHT">0.03</td>
<td align="RIGHT">0.53</td>
<td align="RIGHT">0.29</td>
<td align="RIGHT">0.07</td>
<td align="RIGHT">-0.26</td>
</tr>
<tr>
<td align="LEFT" height="17">Loyola</td>
<td align="RIGHT">0.02</td>
<td align="LEFT"></td>
<td align="RIGHT">0.4</td>
<td align="RIGHT">0.17</td>
<td align="RIGHT">-0.38</td>
<td align="RIGHT">-0.17</td>
</tr>
<tr>
<td align="LEFT" height="17">UNC-Ashe</td>
<td align="RIGHT">0.03</td>
<td align="LEFT"></td>
<td align="RIGHT">0.4</td>
<td align="RIGHT">0.17</td>
<td align="RIGHT">-0.37</td>
<td align="RIGHT">-0.17</td>
</tr>
</tbody>
</table>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsportsobjective.com%2Fwordpress%2F%3Fp%3D4344&amp;title=NCAA%20Tourney%20KP%20vs%20Pinny" id="wpa2a_16"><img src="http://sportsobjective.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://sportsobjective.com/wordpress/?feed=rss2&#038;p=4344</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NCAAB Conference Tourney&#8217;s: Pinny v KenPom</title>
		<link>http://sportsobjective.com/wordpress/?p=4341</link>
		<comments>http://sportsobjective.com/wordpress/?p=4341#comments</comments>
		<pubDate>Tue, 06 Mar 2012 16:25:12 +0000</pubDate>
		<dc:creator>Rufio Magillicutty</dc:creator>
				<category><![CDATA[kenpom]]></category>
		<category><![CDATA[NCAAB]]></category>
		<category><![CDATA[Pinnacle]]></category>
		<category><![CDATA[ACC]]></category>
		<category><![CDATA[Big 12]]></category>
		<category><![CDATA[Big East]]></category>
		<category><![CDATA[big ten]]></category>
		<category><![CDATA[championship]]></category>
		<category><![CDATA[College Basketball]]></category>
		<category><![CDATA[conference tournament]]></category>
		<category><![CDATA[Futures]]></category>
		<category><![CDATA[ken pom]]></category>
		<category><![CDATA[log5]]></category>
		<category><![CDATA[ncaa tournament]]></category>
		<category><![CDATA[Odds]]></category>
		<category><![CDATA[pac 12]]></category>
		<category><![CDATA[SEC]]></category>

		<guid isPermaLink="false">http://sportsobjective.com/wordpress/?p=4341</guid>
		<description><![CDATA[KenPom LOG5&#8242;s here Top 5 Value: Kansas Indiana Syracuse Ohio State SEC Field ACC Tourney Team Pinny KP KP-P UNC 53.52% 52.20% -0.0132 Duke 21.30% 19.80% -0.0150 FSU 10.39% 9.90% -0.0049 UVA 6.65% 10.40% 0.0375 NC State 3.44% 2.40% -0.0104 Miami 2.48% 3.70% 0.0122 Field 2.22% 1.60% -0.0062 PAC 12 Tourney Team Pinny KP KP-P [...]]]></description>
				<content:encoded><![CDATA[
<p>KenPom LOG5&#8242;s <a href="http://kenpom.com/blog/index.php/weblog/log5_part_5_woulda_coulda_shoulda/" >here</a></p>
<p>Top 5 Value:<br />
Kansas<br />
Indiana<br />
Syracuse<br />
Ohio State<br />
SEC Field</p>
<table border="0" frame="VOID" rules="NONE" cellspacing="0">
<colgroup>
<col width="86" />
<col width="86" />
<col width="86" />
<col width="86" /></colgroup>
<tbody>
<tr>
<td colspan="4" align="CENTER" valign="MIDDLE" width="343" height="17">ACC Tourney</td>
</tr>
<tr>
<td align="LEFT" bgcolor="#C0C0C0" height="17"><strong>Team</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>Pinny</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP-P</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">UNC</td>
<td align="RIGHT">53.52%</td>
<td align="RIGHT">52.20%</td>
<td align="RIGHT">-0.0132</td>
</tr>
<tr>
<td align="LEFT" height="17">Duke</td>
<td align="RIGHT">21.30%</td>
<td align="RIGHT">19.80%</td>
<td align="RIGHT">-0.0150</td>
</tr>
<tr>
<td align="LEFT" height="17">FSU</td>
<td align="RIGHT">10.39%</td>
<td align="RIGHT">9.90%</td>
<td align="RIGHT">-0.0049</td>
</tr>
<tr>
<td align="LEFT" height="17">UVA</td>
<td align="RIGHT">6.65%</td>
<td align="RIGHT">10.40%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0375</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">NC State</td>
<td align="RIGHT">3.44%</td>
<td align="RIGHT">2.40%</td>
<td align="RIGHT">-0.0104</td>
</tr>
<tr>
<td align="LEFT" height="17">Miami</td>
<td align="RIGHT">2.48%</td>
<td align="RIGHT">3.70%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0122</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Field</td>
<td align="RIGHT">2.22%</td>
<td align="RIGHT">1.60%</td>
<td align="RIGHT">-0.0062</td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td colspan="4" align="CENTER" valign="MIDDLE" height="17">PAC 12 Tourney</td>
</tr>
<tr>
<td align="LEFT" bgcolor="#C0C0C0" height="17"><strong>Team</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>Pinny</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP-P</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">California</td>
<td align="RIGHT">30.29%</td>
<td align="RIGHT">32.30%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0201</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Oregon</td>
<td align="RIGHT">15.94%</td>
<td align="RIGHT">12.20%</td>
<td align="RIGHT">-0.0374</td>
</tr>
<tr>
<td align="LEFT" height="17">UCLA</td>
<td align="RIGHT">14.82%</td>
<td align="RIGHT">14.90%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0008</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Washington</td>
<td align="RIGHT">14.76%</td>
<td align="RIGHT">12.20%</td>
<td align="RIGHT">-0.0256</td>
</tr>
<tr>
<td align="LEFT" height="17">Arizona</td>
<td align="RIGHT">9.47%</td>
<td align="RIGHT">12.70%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0323</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Stanford</td>
<td align="RIGHT">5.98%</td>
<td align="RIGHT">8.00%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0202</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Colorado</td>
<td align="RIGHT">3.93%</td>
<td align="RIGHT">3.90%</td>
<td align="RIGHT">-0.0003</td>
</tr>
<tr>
<td align="LEFT" height="17">Oregon St.</td>
<td align="RIGHT">2.87%</td>
<td align="RIGHT">2.80%</td>
<td align="RIGHT">-0.0007</td>
</tr>
<tr>
<td align="LEFT" height="17">Field</td>
<td align="RIGHT">1.94%</td>
<td align="RIGHT">1.00%</td>
<td align="RIGHT">-0.0094</td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td colspan="4" align="CENTER" valign="MIDDLE" height="17">SEC Tourney</td>
</tr>
<tr>
<td align="LEFT" bgcolor="#C0C0C0" height="17"><strong>Team</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>Pinny</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP-P</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Kentucky</td>
<td align="RIGHT">72.63%</td>
<td align="RIGHT">68.70%</td>
<td align="RIGHT">-0.0393</td>
</tr>
<tr>
<td align="LEFT" height="17">Field</td>
<td align="RIGHT">27.37%</td>
<td align="RIGHT">31.30%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0393</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td colspan="4" align="CENTER" valign="MIDDLE" height="17">Big East Tourney</td>
</tr>
<tr>
<td align="LEFT" bgcolor="#C0C0C0" height="17"><strong>Team</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>Pinny</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP-P</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Syracuse</td>
<td align="RIGHT">33.02%</td>
<td align="RIGHT">39.50%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0648</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Marquette</td>
<td align="RIGHT">18.42%</td>
<td align="RIGHT">20.10%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0168</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Georgetown</td>
<td align="RIGHT">13.81%</td>
<td align="RIGHT">15.10%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0129</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Notre Dame</td>
<td align="RIGHT">7.21%</td>
<td align="RIGHT">7.90%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0069</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Cincy</td>
<td align="RIGHT">6.94%</td>
<td align="RIGHT">5.60%</td>
<td align="RIGHT">-0.0134</td>
</tr>
<tr>
<td align="LEFT" height="17">Loserville</td>
<td align="RIGHT">6.94%</td>
<td align="RIGHT">5.50%</td>
<td align="RIGHT">-0.0144</td>
</tr>
<tr>
<td align="LEFT" height="17">USF</td>
<td align="RIGHT">3.53%</td>
<td align="RIGHT">1.50%</td>
<td align="RIGHT">-0.0203</td>
</tr>
<tr>
<td align="LEFT" height="17">WVU</td>
<td align="RIGHT">3.52%</td>
<td align="RIGHT">1.90%</td>
<td align="RIGHT">-0.0162</td>
</tr>
<tr>
<td align="LEFT" height="17">Uconn</td>
<td align="RIGHT">2.78%</td>
<td align="RIGHT">1.40%</td>
<td align="RIGHT">-0.0138</td>
</tr>
<tr>
<td align="LEFT" height="17">Seton Hall</td>
<td align="RIGHT">1.27%</td>
<td align="RIGHT">0.70%</td>
<td align="RIGHT">-0.0057</td>
</tr>
<tr>
<td align="LEFT" height="17">Pitt</td>
<td align="RIGHT">1.08%</td>
<td align="RIGHT">0.20%</td>
<td align="RIGHT">-0.0088</td>
</tr>
<tr>
<td align="LEFT" height="17">St. John&#8217;s</td>
<td align="RIGHT">0.37%</td>
<td align="RIGHT">0.08%</td>
<td align="RIGHT">-0.0029</td>
</tr>
<tr>
<td align="LEFT" height="17">Field</td>
<td align="RIGHT">1.10%</td>
<td align="RIGHT">0.52%</td>
<td align="RIGHT">-0.0058</td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td colspan="4" align="CENTER" valign="MIDDLE" height="17">Big Ten Tourney</td>
</tr>
<tr>
<td align="LEFT" bgcolor="#C0C0C0" height="17"><strong>Team</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>Pinny</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP-P</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Ohio State</td>
<td align="RIGHT">32.29%</td>
<td align="RIGHT">37.20%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0491</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Michigan St.</td>
<td align="RIGHT">23.34%</td>
<td align="RIGHT">27.20%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0386</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Michigan</td>
<td align="RIGHT">15.96%</td>
<td align="RIGHT">5.10%</td>
<td align="RIGHT">-0.1086</td>
</tr>
<tr>
<td align="LEFT" height="17">Wisconsin</td>
<td align="RIGHT">10.48%</td>
<td align="RIGHT">10.40%</td>
<td align="RIGHT">-0.0008</td>
</tr>
<tr>
<td align="LEFT" height="17">Indiana</td>
<td align="RIGHT">9.74%</td>
<td align="RIGHT">16.50%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0676</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Purdue</td>
<td align="RIGHT">3.73%</td>
<td align="RIGHT">2.50%</td>
<td align="RIGHT">-0.0123</td>
</tr>
<tr>
<td align="LEFT" height="17">Nwestern</td>
<td align="RIGHT">2.17%</td>
<td align="RIGHT">0.50%</td>
<td align="RIGHT">-0.0167</td>
</tr>
<tr>
<td align="LEFT" height="17">Illinois</td>
<td align="RIGHT">0.79%</td>
<td align="RIGHT">0.20%</td>
<td align="RIGHT">-0.0059</td>
</tr>
<tr>
<td align="LEFT" height="17">Field</td>
<td align="RIGHT">1.51%</td>
<td align="RIGHT">0.40%</td>
<td align="RIGHT">-0.0111</td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td align="LEFT" height="17"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
<td align="LEFT"></td>
</tr>
<tr>
<td colspan="4" align="CENTER" valign="MIDDLE" height="17">Big 12 Tourney</td>
</tr>
<tr>
<td align="LEFT" bgcolor="#C0C0C0" height="17"><strong>Team</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>Pinny</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP</strong></td>
<td align="LEFT" bgcolor="#C0C0C0"><strong>KP-P</strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Kansas</td>
<td align="RIGHT">39.33%</td>
<td align="RIGHT">54.60%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.1527</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Missouri</td>
<td align="RIGHT">32.93%</td>
<td align="RIGHT">23.00%</td>
<td align="RIGHT">-0.0993</td>
</tr>
<tr>
<td align="LEFT" height="17">Baylor</td>
<td align="RIGHT">9.43%</td>
<td align="RIGHT">7.30%</td>
<td align="RIGHT">-0.0213</td>
</tr>
<tr>
<td align="LEFT" height="17">Kansas St.</td>
<td align="RIGHT">6.52%</td>
<td align="RIGHT">5.00%</td>
<td align="RIGHT">-0.0152</td>
</tr>
<tr>
<td align="LEFT" height="17">Iowa St</td>
<td align="RIGHT">5.97%</td>
<td align="RIGHT">4.50%</td>
<td align="RIGHT">-0.0147</td>
</tr>
<tr>
<td align="LEFT" height="17">Texas</td>
<td align="RIGHT">4.96%</td>
<td align="RIGHT">5.00%</td>
<td align="RIGHT"><strong><span style="color: #33cc66;">0.0004</span></strong></td>
</tr>
<tr>
<td align="LEFT" height="17">Oklahoma St</td>
<td align="RIGHT">0.57%</td>
<td align="RIGHT">0.40%</td>
<td align="RIGHT">-0.0017</td>
</tr>
<tr>
<td align="LEFT" height="17">Field</td>
<td align="RIGHT">0.29%</td>
<td align="RIGHT">0.20%</td>
<td align="RIGHT">-0.0009</td>
</tr>
</tbody>
</table>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsportsobjective.com%2Fwordpress%2F%3Fp%3D4341&amp;title=NCAAB%20Conference%20Tourney%E2%80%99s%3A%20Pinny%20v%20KenPom" id="wpa2a_18"><img src="http://sportsobjective.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://sportsobjective.com/wordpress/?feed=rss2&#038;p=4341</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Time need not end&#8221; for a degenerate</title>
		<link>http://sportsobjective.com/wordpress/?p=4337</link>
		<comments>http://sportsobjective.com/wordpress/?p=4337#comments</comments>
		<pubDate>Thu, 12 Jan 2012 02:24:57 +0000</pubDate>
		<dc:creator>Rufio Magillicutty</dc:creator>
				<category><![CDATA[Kelly]]></category>
		<category><![CDATA[Probability]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[coin toss]]></category>
		<category><![CDATA[flips]]></category>
		<category><![CDATA[gambling]]></category>
		<category><![CDATA[kelly]]></category>
		<category><![CDATA[multiverse]]></category>
		<category><![CDATA[new scientist]]></category>
		<category><![CDATA[probability]]></category>

		<guid isPermaLink="false">http://sportsobjective.com/wordpress/?p=4337</guid>
		<description><![CDATA[Apparently, time is on my side.  Which is funny if you&#8217;ve followed my twitter fades the last century.  (Obviously time is relative, what may seem like two months to you is almost certainly an eternity to tweeters of guaranteed fades, c&#8217;est moi, FML, c&#8217;est moi.) It all started with this thought experiment. In a back [...]]]></description>
				<content:encoded><![CDATA[
<p>Apparently, time is on my side.  Which is funny if you&#8217;ve followed my twitter fades the last century.  (Obviously time is relative, what may seem like two months to you is almost certainly an eternity to tweeters of guaranteed fades, c&#8217;est moi, FML, c&#8217;est moi.)</p>
<blockquote><p>It all started with this thought experiment. In a back room in a Las Vegas casino, you are handed a fair coin to flip. You will not be allowed to see the outcome, and the moment the coin lands you will fall into a deep sleep. If the coin lands heads up, the dealer will wake you 1 minute later; tails, in 1 hour. Upon waking, you will have no idea how long you have just slept.</p>
<p>The dealer smiles: would you like to bet on heads or tails? Knowing it&#8217;s a fair coin, you assume your odds are 50/50, so you choose tails. But the house has an advantage. The dealer knows you will almost certainly lose, because she is factoring in something you haven&#8217;t: that we live in a multiverse.</p></blockquote>
<p>Oh god.</p>
<blockquote><p>In any infinite multiverse, everything that can happen, will happen &#8211; an infinite number of times&#8230;How can we say that anything is more or less probable than anything else?</p>
<p>One procedure physicists are fond of is to draw a cut-off at some finite time, count up the number of events &#8211; say, heads and tails &#8211; that occur in the multiverse before the cut-off time, and use that as a representative sample.</p>
<p>It seems reasonable, but when tackling the casino experiment, something strange happens. Wherever the cut-off is drawn, it slices through some of the gamblers&#8217; naps, making it appear as if those gamblers simply never woke up. The longer the nap, the more likely it is to be cut off, so if you do awaken, it&#8217;s more likely that you have taken a shorter nap &#8211; that is, that you flipped heads. So even though the odds seemed to be 50/50 when the coins were first flipped, heads becomes more probable than tails once you and the other gamblers wake up.</p></blockquote>
<p>Somewhere deep down this is what J. L. Kelly, Jr. had in mind.  Accidental prescience?  I knew it.</p>
<blockquote><p>Upon waking, you have new information: you know that time didn&#8217;t end. That now means it is more likely that you only slept for a minute than for an hour. After all, time could end at any minute, and an hour has an extra 59 of those to spare. Heads wins.</p></blockquote>
<p>Ultimately, younger universes are more numerous than older universes, thus if I interpret each possible side as if its occurring primarily in younger universes, my probability increases at the rate proportional to <em>y/u</em>, where <em>y</em> is the number of younger universes, and <em>u</em> the number of older universes.  I&#8217;ve figured it out, guys.</p>
<p><a href="http://www.newscientist.com/article/mg21128253.700-time-need-not-end-in-the-multiverse.html" >New Scientist.  August 13, 2011</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fsportsobjective.com%2Fwordpress%2F%3Fp%3D4337&amp;title=%E2%80%9CTime%20need%20not%20end%E2%80%9D%20for%20a%20degenerate" id="wpa2a_20"><img src="http://sportsobjective.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://sportsobjective.com/wordpress/?feed=rss2&#038;p=4337</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
