{"id":455,"date":"2015-07-27T22:41:12","date_gmt":"2015-07-27T21:41:12","guid":{"rendered":"http:\/\/pcool.dyndns.org:8080\/statsbook\/?page_id=455"},"modified":"2025-06-30T10:48:10","modified_gmt":"2025-06-30T09:48:10","slug":"percentiles-and-quantiles","status":"publish","type":"page","link":"https:\/\/pcool.dyndns.org\/index.php\/percentiles-and-quantiles\/","title":{"rendered":"Percentiles and Quantiles"},"content":{"rendered":"\n<p>Below are typical growth curves for boys:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"481\" height=\"360\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/boys.png\" alt=\"\" class=\"wp-image-2884\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/boys.png 481w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/boys-300x225.png 300w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><\/figure>\n\n\n\n<p>And Girls:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"467\" height=\"350\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/girls.png\" alt=\"\" class=\"wp-image-3188\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/girls.png 467w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/girls-300x225.png 300w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/figure>\n\n\n\n<p>The curves show the height as function of the age for boys and girls.<\/p>\n\n\n\n<p>The dotted lines are the percentiles. They indicate the proportion of children that are below a certain height. Ten per cent of the children are below the 10<sup>th<\/sup> percentile in height and consequently 90% are above it. Similarly, 30 per cent of the children are below the 30<sup>th<\/sup> percentile and 70 per cent above it. Also, 70 per cent are below the 70<sup>th<\/sup> percentile and 30 per cent above it.<\/p>\n\n\n\n<p>The 50<sup>th<\/sup> percentile is shown as a solid line. Indeed, 50 per cent of the children are taller than the 50<sup>th<\/sup> percentile and 50 per cent shorter. It can be demonstrated that height is normally distributed. Therefore, in growth curves, the 50<sup>th<\/sup> percentile (P50) is the same as the mean (average), mode and the median.<\/p>\n\n\n\n<p><strong>P50 = mean = mode = median<\/strong><\/p>\n\n\n\n<p>It can be read from the growth curves above, that the mean final height for boys is approximately 176 cm, whilst this is 164 cm for girls. Twelve year old girls are on average 150 cm tall, whilst boys this age are approximately 148 cm. From these curves, it can also be seen that girls reach maturity earlier than boys. The curve for girls reaches a plateau at 15 years of age, whilst this is approximately 17 years for boys.<\/p>\n\n\n\n<p>Quantiles are similar to percentiles. As the name implies, quantiles divide the data in four groups. The first quantile is at 25%, the second at 50%, the third at 75% and the fourth at 100%. So, the 25<sup>th<\/sup> percentile is the same as the first quantile. The 2<sup>nd<\/sup> quantile line is the same as the 50<sup>th<\/sup> percentile, the median, mode and median.<\/p>\n\n\n\n<p><strong>P50 = mean = mode = median = 2<sup>nd<\/sup> quantile<\/strong><\/p>\n\n\n\n<p>Growth curves with quantiles are shown below; only the 1<sup>st<\/sup>, 2<sup>nd<\/sup> and 3<sup>rd<\/sup> quantiles are shown:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"433\" height=\"324\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/boys2.png\" alt=\"\" class=\"wp-image-2885\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/boys2.png 433w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/boys2-300x224.png 300w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"433\" height=\"324\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/girls2.png\" alt=\"\" class=\"wp-image-3189\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/girls2.png 433w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/girls2-300x224.png 300w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/figure>\n\n\n\n<p>As stated previously, height is normally distributed. At any particular age, the percentiles show a Gaussian or bell shaped curve. The growth charts are a <strong><em>continuum of Gaussian curves<\/em><\/strong>. This is shown three dimensionally below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"405\" height=\"303\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/boys3d.png\" alt=\"\" class=\"wp-image-2886\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/boys3d.png 405w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/boys3d-300x224.png 300w\" sizes=\"auto, (max-width: 405px) 100vw, 405px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"404\" height=\"302\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/girls3d.png\" alt=\"\" class=\"wp-image-3190\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/girls3d.png 404w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/girls3d-300x224.png 300w\" sizes=\"auto, (max-width: 404px) 100vw, 404px\" \/><\/figure>\n\n\n\n<p>In normally distributed data, 68.27% of the data lie in an interval plus or minus one standard deviation from the mean. Similarly 95.45% of the data lie in an interval plus or minus twice the standard deviation and 99.73% of the data within an interval plus or minus three times the standard deviation.<\/p>\n\n\n\n<p>Or:<\/p>\n\n\n\n<p>Mean \u00b1 1 \u00d7 SD = 68.27 %<\/p>\n\n\n\n<p>Mean \u00b1 2 \u00d7 SD = 95.45 %<\/p>\n\n\n\n<p>Mean \u00b1 3 \u00d7 SD = 99.73 %<\/p>\n\n\n\n<p>To \u2018translate\u2019 this into percentiles:<\/p>\n\n\n\n<p>One standard deviation about the mean:<\/p>\n\n\n\n<p>68.27 % about the mean (P50) is the interval between<\/p>\n\n\n\n<p>50 \u2013 (68.27 \/ 2) = 50 \u2013 34.135 = 15.865 \u00bb 16<sup>th<\/sup> percentile<\/p>\n\n\n\n<p>and<\/p>\n\n\n\n<p>50 + (68.27 \/ 2) = 50 + 34.135 = 84.135 \u00bb 84<sup>th<\/sup> percentile<\/p>\n\n\n\n<p>Similarly, two standard deviations about the mean:<\/p>\n\n\n\n<p>50 \u2013 (95.45 \/ 2) = 50 \u2013 47.725 =&nbsp;&nbsp; 2.275 \u00bb 2<sup>nd<\/sup> percentile<\/p>\n\n\n\n<p>and<\/p>\n\n\n\n<p>50 + (95.45 \/ 2) = 50 + 47.725 = 97.725 \u00bb 98<sup>th<\/sup> percentile<\/p>\n\n\n\n<p>And three:<\/p>\n\n\n\n<p>50 \u2013 (99.73 \/ 2) = 50 \u2013 49.865 =&nbsp;&nbsp; 0.135 \u00bb 0.1<strong><sup>th<\/sup><\/strong> percentile<\/p>\n\n\n\n<p>and<\/p>\n\n\n\n<p>50 + (99.73 \/ 2) = 50 + 49.865 = 99.865 \u00bb 99.9<strong><sup>th<\/sup><\/strong> percentile<\/p>\n\n\n\n<p>In summary:<\/p>\n\n\n\n<p><strong>Mean \u00b1 1 \u00d7<\/strong> <strong>SD = 68.27 % : between 16<sup>th<\/sup> and 84<sup>th<\/sup> percentile<\/strong><\/p>\n\n\n\n<p><strong>Mean \u00b1 2 \u00d7<\/strong> <strong>SD = 95.45 % : between 2<sup>nd<\/sup> and 98<sup>th<\/sup> percentile<\/strong><\/p>\n\n\n\n<p><strong>Mean \u00b1 3 \u00d7<\/strong> <strong>SD = 99.73 % : between 0.1<sup>th<\/sup> and 99.9<sup>th<\/sup> percentile<\/strong><\/p>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p><strong>In R:<\/strong><\/p>\n\n\n\n<p>Sample data abstracted from the UK 1990 growth data are provided in <a href=\"https:\/\/pcool.dyndns.org:\/wp-content\/data_files\/malegrowth.rda\" target=\"_blank\" rel=\"noreferrer noopener\">malegrowth.rda.<\/a> Load the data and show (the data frame is called &#8216;male&#8217;):<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f30606\" class=\"has-inline-color\">load(\"~\/Desktop\/malegrowth.rda\")\nmale<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#0e08f4\" class=\"has-inline-color\">   year  X0.4th    X2nd    X9th   X25th  X50th   X75th   X91st   X98th\n2     0  45.743  46.938  48.362  49.693  51.04  52.387  53.718  55.142\n3     1  68.875  70.372  72.156  73.823  75.51  77.197  78.864  80.648\n4     2  78.607  80.456  82.658  84.716  86.80  88.884  90.942  93.144\n5     3  85.749  87.929  90.526  92.953  95.41  97.867 100.294 102.891\n6     4  91.596  94.054  96.982  99.719 102.49 105.261 107.998 110.926\n7     5  97.584 100.292 103.520 106.536 109.59 112.644 115.660 118.888\n8     6 103.048 105.954 109.417 112.654 115.93 119.206 122.443 125.906\n9     7 108.222 111.308 114.985 118.421 121.90 125.379 128.815 132.492\n10    8 113.324 116.601 120.507 124.156 127.85 131.544 135.193 139.099\n11    9 117.901 121.370 125.505 129.369 133.28 137.191 141.055 145.190\n12   10 121.992 125.691 130.100 134.219 138.39 142.561 146.680 151.089\n13   11 125.735 129.714 134.455 138.885 143.37 147.855 152.285 157.026\n14   12 129.285 133.588 138.717 143.509 148.36 153.211 158.003 163.132\n15   13 133.968 138.661 144.253 149.479 154.77 160.061 165.287 170.879\n16   14 140.357 145.321 151.236 156.764 162.36 167.956 173.484 179.399\n17   15 147.385 152.248 158.043 163.458 168.94 174.422 179.837 185.632\n18   16 153.208 157.761 163.187 168.257 173.39 178.523 183.593 189.019\n19   17 156.810 161.121 166.259 171.060 175.92 180.780 185.581 190.719\n20   18 158.501 162.695 167.692 172.362 177.09 181.818 186.488 191.485\n21   19 158.779 162.953 167.927 172.575 177.28 181.985 186.633 191.607\n22   20 158.861 163.030 167.998 172.640 177.34 182.040 186.682 191.650\n23   21 159.185 163.333 168.275 172.894 177.57 182.246 186.865 191.807\n24   22 159.582 163.704 168.615 173.204 177.85 182.496 187.085 191.996\n25   23 160.112 164.200 169.071 173.622 178.23 182.838 187.389 192.260<\/mark><\/em><\/code><\/pre>\n\n\n\n<p>Plot builder can be used to construct a growth chart based on these data using the geom_smooth (Loess) best fit lines. Each line is added to a plot:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f80202\" class=\"has-inline-color\">male_growth &lt;- male %>% <\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#f80202\" class=\"has-inline-color\">ggplot(<mark style=\"background-color:rgba(0, 0, 0, 0);color:#f80202\" class=\"has-inline-color\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f80202\" class=\"has-inline-color\">aes(x = year,y = X50th)<\/mark><\/mark>) <mark style=\"background-color:rgba(0, 0, 0, 0);color:#f80202\" class=\"has-inline-color\">+ <\/mark><\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#f80202\" class=\"has-inline-color\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f80202\" class=\"has-inline-color\">geom_smooth(,se = FALSE) <\/mark>+<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#f10909\" class=\"has-inline-color\">ggtitle(label = 'Boys Height') +\nxlab(label = 'Age &#91;years]') +\nylab(label = 'Height &#91;cm]') +<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#f80202\" class=\"has-inline-color\">theme_bw() \n\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#f80202\" class=\"has-inline-color\">male_growth<\/mark><\/mark><\/em><\/code><\/pre>\n\n\n\n<p>This will create a plot with the mean height for boys:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/growthchartmean-1024x768.png\" alt=\"\" class=\"wp-image-3192\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/growthchartmean-1024x768.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/growthchartmean-300x225.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/growthchartmean-768x576.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/growthchartmean.png 1355w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>It is easy to add the 2nd, 98th, 25th and 75th percentiles:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f60c0c\" class=\"has-inline-color\">male_growth &lt;- male_growth +\ngeom_smooth(aes(x=year, y=X2nd), data=male, linetype=3, se=FALSE) +\ngeom_smooth(aes(x=year, y=X98th), data=male, linetype=3, se=FALSE) +\ngeom_smooth(aes(x=year, y=X25th), data=male, linetype=5, se=FALSE) +\ngeom_smooth(aes(x =year, y=X75th), data=male, linetype=5, se=FALSE)\n\nmale_growth<\/mark><\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/growthchartall-1024x768.png\" alt=\"\" class=\"wp-image-3191\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/growthchartall-1024x768.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/growthchartall-300x225.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/growthchartall-768x576.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/06\/growthchartall.png 1355w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below are typical growth curves for boys: And Girls: The curves show the height as function of the age for boys and girls. The dotted lines are the percentiles. They indicate the proportion of children that are below a certain height. Ten per cent of the children are below the 10th percentile in height and [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-455","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/comments?post=455"}],"version-history":[{"count":1,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/455\/revisions"}],"predecessor-version":[{"id":4603,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/455\/revisions\/4603"}],"wp:attachment":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/media?parent=455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}