{"id":545,"date":"2011-07-14T15:57:00","date_gmt":"2011-07-14T15:57:00","guid":{"rendered":"\/blogs\/bobb\/post\/What-exactly-does-PERCENTILE_CONT-do-anyhow.aspx"},"modified":"2011-07-14T15:57:00","modified_gmt":"2011-07-14T15:57:00","slug":"what-exactly-does-percentile_cont-do-anyhow","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/","title":{"rendered":"What exactly does PERCENTILE_CONT do, anyhow?"},"content":{"rendered":"<p>\nI&#39;m always leery when I hear&nbsp;people say &quot;statistics show that&#8230;&quot; followed by whatever their opinion is. Scientists do it. And your users probably do it too. I worked with a product called SAS once, on statistics for response time. Got some lovely reports and statistics, *<strong>from which other folks draw conclusions<\/strong>*. It&#39;s important to step back every once in a while, and make sure you&#39;re measuring what you think you&#39;re measuring. And that it really does add up. I&#39;ve made that into kind of a koan &quot;I don&#39;t want to hear your conclusion, I want to see your raw data&quot;. And, if I&#39;m really interested, I&#39;ll do the math &quot;by hand&quot;. Amazingly (well maybe not so amazingly) the conclusion doesn&#39;t always jibe with the raw data and\/or what folks *<strong>think<\/strong>* they&#39;re measuring.\n<\/p>\n<p>\nEnd of rant.\n<\/p>\n<p>\nSo SQL Server Denali CTP3 added some new analytical functions: PERCENT_RANK, CUME_DIST, PERCENTILE_DISC and PERCENTILE_CONT. The first three, I have no problem with. The Denali BOL lists how it works and I can confirm this using sample data. Good. The PERCENTILE_CONT function though&#8230;that&#39;s a little different.\n<\/p>\n<p>\nBTW, There is a slight typo in BOL for PERCENT_RANK. It says &quot;The range of values returned by PERCENT_RANK is greater than 0 and less than or equal to 1.&quot; Actually, PERCENT_RANK can, and is, in their example, sometimes *equal to 0*. It&#39;s CUME_DIST that is<br \/>\ngreater than 0 and less than or equal to 1. Fine.\n<\/p>\n<p>\nFor PERCENTILE_CONT, the SQL Server BOL says: &quot;Calculates a percentile based on a continuous distribution of the column value&#8230;<br \/>\nThe result is interpolated and might not be equal to any of the specific values in the column.&quot; That&#39;s sufficiently vague,<br \/>\ninterpolated how? And &quot;might not be equal to any of the specific values in the column&quot;? That&#39;s&nbsp;as opposed to PERCENTILE_DISC which is<br \/>\nalways equal to one of the specific values of the column, by definition.\n<\/p>\n<p>\nI&#39;ve also read that &quot;PERCENTILE_CONT(X) examines the percent_rank of values in a group until it finds one greater than or equal<br \/>\nto X.&quot; In two or three places on the web. Nope. Not true. Doesn&#39;t jibe with &quot;might not be equal to any of the specific values in<br \/>\nthe column&quot;.\n<\/p>\n<p>\nSo, I&#39;m intrigued . And, last night, tried to figure it out by running a variation of BOL sample query.\n<\/p>\n<p>\nUSE AdventureWorks2008R2;\n<\/p>\n<p>\nSELECT Name AS DepartmentName<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , ph.Rate<br \/>\n&nbsp;&nbsp; ,PERCENT_RANK() OVER(PARTITION BY Name ORDER BY ph.Rate) as Percent_rank<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY ph.Rate) <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OVER (PARTITION BY Name) AS MedianCont<br \/>\n&nbsp;&nbsp; ,CUME_DIST() OVER(PARTITION BY Name ORDER BY ph.Rate) as Cume_Dist<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY ph.Rate) <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OVER (PARTITION BY Name) AS MedianDisc<br \/>\nFROM HumanResources.Department AS d<br \/>\nINNER JOIN HumanResources.EmployeeDepartmentHistory AS dh <br \/>\n&nbsp;&nbsp;&nbsp; ON dh.DepartmentID = d.DepartmentID<br \/>\nINNER JOIN HumanResources.EmployeePayHistory AS ph<br \/>\n&nbsp;&nbsp;&nbsp; ON ph.BusinessEntityID = dh.BusinessEntityID<br \/>\nWHERE dh.EndDate IS NULL;\n<\/p>\n<p>\nLet&#39;s look at a few groups in the raw data (the three columns that matter have headers):\n<\/p>\n<p>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Rate&nbsp;&nbsp;&nbsp;&nbsp; Percent Rank&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MedianCont <br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nExecutive&nbsp;39.06&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 54.32695&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.25&nbsp;&nbsp;&nbsp;48.5577<br \/>\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is interpolated, like the BOL says. Not a value in the set. For &quot;Tool Design&quot;, the MedianCont (PERCENTILE_CONT(0.5))&nbsp;is 25,<br \/>\na value in the set, but not a value where percent rank is &gt; 0.5 (its 0.4). Oh. So I ripped out the rows that produced the<br \/>\nresultset and played with these for a while, adding new rows to each set and watching how the results changed. No joy. After yet<br \/>\nanother web search (I DID use web search, I swear, but missed this one the first 10 times) I came across this in Oracle Database<br \/>\nSQL Reference:\n<\/p>\n<p>\n&quot;The result of PERCENTILE_CONT is computed by linear interpolation between values after ordering them. Using the percentile<br \/>\nvalue (P) and the number of rows (N) in the aggregation group, we compute the row number we are interested in after ordering the<br \/>\nrows with respect to the sort specification. This row number (RN) is computed according to the formula RN = (1+ (P*(N-1)). The<br \/>\nfinal result of the aggregate function is computed by linear interpolation between the values from rows at row numbers CRN =<br \/>\nCEILING(RN) and FRN = FLOOR(RN).<br \/>\n&nbsp;<br \/>\nThe final result will be:<br \/>\n&nbsp;If (CRN = FRN = RN) then the result is<br \/>\n&nbsp;&nbsp;&nbsp; (value of expression from row at RN)<br \/>\n&nbsp; Otherwise the result is<br \/>\n&nbsp;&nbsp;&nbsp; (CRN &#8211; RN) * (value of expression for row at FRN) +<br \/>\n&nbsp;&nbsp;&nbsp; (RN &#8211; FRN) * (value of expression for row at CRN)<br \/>\n&quot;.\n<\/p>\n<p>\nSQL Server&#39;s numbers do agree with Oracle&#39;s for the &quot;demo&quot; (that&#39;s scott\/tiger) database examples. I tried them (yes, I really<br \/>\nhave a &quot;demo&quot; database on Denali, it&#39;s lamer than even pubs. But they&#39;ve replaced it now, with more robust samples DBs). So<br \/>\nlet&#39;s work these two out.\n<\/p>\n<p>\nFor &quot;Tool Design&quot;: <br \/>\ndeclare @p float = 0.5<br \/>\ndeclare @n int = 6<br \/>\nselect 1+ (@p*(@n-1)) &#8211;3.5<br \/>\nselect ceiling(1+ (@p*(@n-1))) &#8211;4<br \/>\nselect floor(1+ (@p*(@n-1))) &#8211;3<br \/>\n&#8212; value at row 3 = 25,value at row 4 = 25<br \/>\nselect .5*25 + .5*25 &#8212; 25\n<\/p>\n<p>\n25 is the right answer\n<\/p>\n<p>\nFor &quot;Executive&quot;:<br \/>\ndeclare @p float = 0.5<br \/>\ndeclare @n int = 4<br \/>\nselect 1+ (@p*(@n-1)) &#8211;2.5<br \/>\nselect ceiling(1+ (@p*(@n-1))) &#8211;3<br \/>\nselect floor(1+ (@p*(@n-1))) &#8211;2<br \/>\n&#8212; value at row 2 = ,value at row 3 =<br \/>\nselect .5*48.5577 + .5*60.0962 &#8212; 54.32695\n<\/p>\n<p>\n54.32695 is the right answer\n<\/p>\n<p>\nGot it? If you think you have it, run the sample query and work out dept &quot;Finance&quot;. Then (if you&#39;re up late like I was, and I worked out most\/all of the groups in the sample query), go to<br \/>\nsleep. You&#39;ve earned it. And&#8230;you may not ever use PERCENTILE_CONT in your day-to-day work.\n<\/p>\n<p>\n[Rant on] To reiterate, when looking at reports that contain statistical calculations, make sure you know what the statistic means. And<br \/>\ncheck it to make sure it DOES mean that, especially if you think the numbers look &quot;weird&quot; (ie, don&#39;t jibe with the description). We aren&#39;t all rocket<br \/>\nscientists. And rocket scientists may not have a background in statistics anyhow.<br \/>\nBut I&#39;ll bet they&nbsp;(like everyone) have opinions. And are hankerin&#39; to &quot;prove&quot; them.\n<\/p>\n<p>\n@bobbeauch<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#39;m always leery when I hear&nbsp;people say &quot;statistics show that&#8230;&quot; followed by whatever their opinion is. Scientists do it. And your users probably do it too. I worked with a product called SAS once, on statistics for response time. Got some lovely reports and statistics, *from which other folks draw conclusions*. It&#39;s important to step [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,40],"tags":[],"class_list":["post-545","post","type-post","status-publish","format-standard","hentry","category-sql-server-2012","category-transact-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What exactly does PERCENTILE_CONT do, anyhow? - Bob Beauchemin<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What exactly does PERCENTILE_CONT do, anyhow? - Bob Beauchemin\" \/>\n<meta property=\"og:description\" content=\"I&#039;m always leery when I hear&nbsp;people say &quot;statistics show that&#8230;&quot; followed by whatever their opinion is. Scientists do it. And your users probably do it too. I worked with a product called SAS once, on statistics for response time. Got some lovely reports and statistics, *from which other folks draw conclusions*. It&#039;s important to step [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/\" \/>\n<meta property=\"og:site_name\" content=\"Bob Beauchemin\" \/>\n<meta property=\"article:published_time\" content=\"2011-07-14T15:57:00+00:00\" \/>\n<meta name=\"author\" content=\"Bob Beauchemin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bob Beauchemin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/\",\"name\":\"What exactly does PERCENTILE_CONT do, anyhow? - Bob Beauchemin\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\"},\"datePublished\":\"2011-07-14T15:57:00+00:00\",\"dateModified\":\"2011-07-14T15:57:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server 2012\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/sql-server-2012\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What exactly does PERCENTILE_CONT do, anyhow?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\",\"name\":\"Bob Beauchemin\",\"description\":\"SQL Server Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\",\"name\":\"Bob Beauchemin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"caption\":\"Bob Beauchemin\"},\"sameAs\":[\"http:\/www.sqlskills.com\/blogs\/bobb\/\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What exactly does PERCENTILE_CONT do, anyhow? - Bob Beauchemin","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/","og_locale":"en_US","og_type":"article","og_title":"What exactly does PERCENTILE_CONT do, anyhow? - Bob Beauchemin","og_description":"I&#39;m always leery when I hear&nbsp;people say &quot;statistics show that&#8230;&quot; followed by whatever their opinion is. Scientists do it. And your users probably do it too. I worked with a product called SAS once, on statistics for response time. Got some lovely reports and statistics, *from which other folks draw conclusions*. It&#39;s important to step [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/","og_site_name":"Bob Beauchemin","article_published_time":"2011-07-14T15:57:00+00:00","author":"Bob Beauchemin","twitter_misc":{"Written by":"Bob Beauchemin","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/","name":"What exactly does PERCENTILE_CONT do, anyhow? - Bob Beauchemin","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website"},"datePublished":"2011-07-14T15:57:00+00:00","dateModified":"2011-07-14T15:57:00+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/what-exactly-does-percentile_cont-do-anyhow\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/"},{"@type":"ListItem","position":2,"name":"SQL Server 2012","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/sql-server-2012\/"},{"@type":"ListItem","position":3,"name":"What exactly does PERCENTILE_CONT do, anyhow?"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/","name":"Bob Beauchemin","description":"SQL Server Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e","name":"Bob Beauchemin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","caption":"Bob Beauchemin"},"sameAs":["http:\/www.sqlskills.com\/blogs\/bobb\/"],"url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/comments?post=545"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/545\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/media?parent=545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/categories?post=545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/tags?post=545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}