{"id":170,"date":"2017-10-02T15:05:16","date_gmt":"2017-10-02T22:05:16","guid":{"rendered":"http:\/\/www.ootp.cavebutter.net\/blog\/?p=170"},"modified":"2017-10-02T15:05:16","modified_gmt":"2017-10-02T22:05:16","slug":"batting-stats-5-woba","status":"publish","type":"post","link":"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/170","title":{"rendered":"Batting Stats 5: wOBA"},"content":{"rendered":"<p>Here it is- wOBA. \u00a0I&#8217;ve been building up to this for a while and I&#8217;m excited to get going. \u00a0For the full details on wOBA, check out <a href=\"https:\/\/www.fangraphs.com\/library\/offense\/woba\/\">Fangraphs<\/a>&#8216; page. \u00a0The short version is that wOBA takes On Base Percentage and weights each of the components based on the run expectancy for each of the component events in each league year. \u00a0It&#8217;s a very good measure of the offensive contribution of a player in a specific league setting. \u00a0It does not normalize the data across years and ballparks &#8211; we will get to some stats that do that later on. \u00a0But it does acknowledge that a double is worth more than a walk &#8211; and it quantifies how much more.<\/p>\n<p>The formula takes the woba weights that we calculated in <a href=\"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/132\">Run Table 2<\/a>\u00a0and multiplies them by the number of walks, singles, doubles, etc. that a player accumulated during a season:<\/p>\n<pre class=\"line-numbers\"><code class=\"language-sql\">, round((r.wobaBB*b.bb + r.wobaHB*b.hp + r.woba1B*(b.h-b.d-b.t-b.hr) +\r\n       r.woba2B*b.d + r.woba3B*b.t + r.wobaHR*b.hr)\r\n       \/(b.ab+b.bb-b.ibb+b.sf+b.hp),3) as woba<\/code><\/pre>\n<p>I&#8217;ve already plugged this formula into the table and I&#8217;m getting results. \u00a0Before I start comparing my results to the game and pulling my hair out, I am going to establish success criteria. \u00a0I mentioned in the Run Environment posts that our formulae contain constants that I don&#8217;t fully understand. \u00a0Moreover, I don&#8217;t know if the game uses the same constants. \u00a0So, to expect a perfect match between my database and the game may be unreasonable.<\/p>\n<p>Let&#8217;s think about what a reasonable margin of difference would be. \u00a0Any difference less than 5 points is negligible. \u00a0I can&#8217;t really make a distinction between two players with wOBAs of .320 and .325. \u00a0They&#8217;re essentially equal. \u00a0Can I say the same thing about 20 points? \u00a0No. \u00a0There&#8217;s clearly a difference between .320 and .340. \u00a0What about 10? \u00a0Iffy. \u00a0If I want to give myself as much wiggle room as possible without losing faith in my metrics, I can&#8217;t go higher than 10. \u00a0Let&#8217;s set 10 as the absolute limit and see what we get. \u00a0 I am going to take a sample of 35 player years and see how close I get:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.ootp.cavebutter.net\/blog\/wp-content\/uploads\/2017\/10\/woba.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"173\" data-permalink=\"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/170\/woba\" data-orig-file=\"https:\/\/i0.wp.com\/www.ootp.cavebutter.net\/blog\/wp-content\/uploads\/2017\/10\/woba.jpg?fit=495%2C651\" data-orig-size=\"495,651\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"woba\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.ootp.cavebutter.net\/blog\/wp-content\/uploads\/2017\/10\/woba.jpg?fit=495%2C651\" class=\"aligncenter size-full wp-image-173\" src=\"https:\/\/i0.wp.com\/www.ootp.cavebutter.net\/blog\/wp-content\/uploads\/2017\/10\/woba.jpg?resize=495%2C651\" alt=\"\" width=\"495\" height=\"651\" srcset=\"https:\/\/i0.wp.com\/www.ootp.cavebutter.net\/blog\/wp-content\/uploads\/2017\/10\/woba.jpg?w=495 495w, https:\/\/i0.wp.com\/www.ootp.cavebutter.net\/blog\/wp-content\/uploads\/2017\/10\/woba.jpg?resize=228%2C300 228w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\" \/><\/a><\/p>\n<p>So, that&#8217;s 21 where the difference is less than 10 points. \u00a07 where the difference is between 10 and 20 points, and 7 where the difference is greater than 20. \u00a0Not perfect &#8211; 40% outside of the range I set for myself. \u00a0However, still better than I feared, and actually better than it looks. \u00a0For example, Dan Wasielewski&#8217;s 2012 season is off by 20 points. \u00a0But that 2012 season only had 6 plate appearances. \u00a0I am totally OK having wacky numbers for very small sample sizes. \u00a0The greatest difference (.029), similarly came from a season with barely over 100 plate appearances.<\/p>\n<p>Without digging in to how to determine my own constants and without being able to pick Markus&#8217;s or Matt&#8217;s brains on how they derive these formulae, I think I&#8217;m pretty OK with my stats. \u00a0Until I decide to relentlessly pursue perfection, that is&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here it is- wOBA. \u00a0I&#8217;ve been building up to this for a while and I&#8217;m excited to get going. \u00a0For the full details on wOBA, check out Fangraphs&#8216; page. \u00a0The short version is that wOBA takes On Base Percentage and weights each of the components based on the run expectancy for each of the component&hellip; <a class=\"more-link\" href=\"http:\/\/www.ootp.cavebutter.net\/blog\/archives\/170\">Continue reading <span class=\"screen-reader-text\">Batting Stats 5: wOBA<\/span> <span class=\"meta-nav\" aria-hidden=\"true\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[25],"tags":[14,7,4,22],"class_list":["post-170","post","type-post","status-publish","format-standard","hentry","category-batting","tag-batting","tag-mysql","tag-ootp","tag-players"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9cxb5-2K","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/posts\/170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/comments?post=170"}],"version-history":[{"count":3,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/posts\/170\/revisions"}],"predecessor-version":[{"id":174,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/posts\/170\/revisions\/174"}],"wp:attachment":[{"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/media?parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/categories?post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ootp.cavebutter.net\/blog\/wp-json\/wp\/v2\/tags?post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}