{"id":5153,"date":"2025-07-14T07:45:17","date_gmt":"2025-07-14T06:45:17","guid":{"rendered":"https:\/\/pcool.dyndns.org\/?page_id=5153"},"modified":"2025-07-14T11:30:39","modified_gmt":"2025-07-14T10:30:39","slug":"which-mean","status":"publish","type":"page","link":"https:\/\/pcool.dyndns.org\/index.php\/which-mean\/","title":{"rendered":"Which Mean?"},"content":{"rendered":"\n<p><strong>Arithmetic mean<\/strong><\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\( x_{arithmetic} = \\frac{1}{n} \\sum_{i=1}^{n} x_i \n \\)<script src=\"https:\/\/pcool.dyndns.org\/wp-includes\/js\/dist\/hooks.min.js?ver=dd5603f07f9220ed27f1\" id=\"wp-hooks-js\"><\/script>\n<script src=\"https:\/\/pcool.dyndns.org\/wp-includes\/js\/dist\/i18n.min.js?ver=c26c3dc7bed366793375\" id=\"wp-i18n-js\"><\/script>\n<script id=\"wp-i18n-js-after\">\nwp.i18n.setLocaleData( { 'text direction\\u0004ltr': [ 'ltr' ] } );\n\/\/# sourceURL=wp-i18n-js-after\n<\/script>\n<script  async src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/mathjax\/2.7.7\/MathJax.js?config=TeX-MML-AM_CHTML\" id=\"mathjax-js\"><\/script>\n<\/div>\n\n\n\n<p>The arithmetic mean is the &#8216;normal&#8217; mean and calculated by adding all observations together and then dividing by the total number of observations. The arithmetic mean gives a good estimate of central tendency in data that con be modelled with a  <a href=\"https:\/\/pcool.dyndns.org\/index.php\/normal-distribution\/\" data-type=\"page\" data-id=\"578\">normal distribution<\/a>. However, it is very sensitive to outliers and not recommended for skewed data, where the median (middle value) is a better estimate of central tendency.<\/p>\n\n\n\n<p>Data that can be modelled with a normal distribution are summarised with the mean (central tendency) and the standard deviation (spread). <\/p>\n\n\n\n<p>Data that have a skewed distribution should be summarised using the median (central tendency) and the interquartile range (middle 50%).<\/p>\n\n\n\n<p><strong>Harmonic mean<\/strong><\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\(  x_{harmonic} = \\frac{n}{ \\sum_{i=1}^{n} \\frac{1}{x_i} }  \\)<\/div>\n\n\n\n<p>The harmonic mean is the reciprocal of the mean of the reciprocals as indicated in the formula above. This mean is better for <strong>ratios<\/strong> (ie speed). <\/p>\n\n\n\n<p>For example, somebody drives 10 km at 20 km\/hr and then the same 10 km back at 60 km\/hr. What is the mean speed? <\/p>\n\n\n\n<p>It is clearly <strong>NOT<\/strong> 40 km\/hr (arithmetic mean)!<\/p>\n\n\n\n<p>The first 10 km is at 20 km\/hr: 10 km in 30 minutes<\/p>\n\n\n\n<p>The return 10 km is at 60 km\/hr: 10 km in 10 minutes<\/p>\n\n\n\n<p>Consequently, the mean speed is 20 km in 40 minutes.<\/p>\n\n\n\n<p>This is equal to 1\/2 km a minute or <strong>30 km\/hr<\/strong>.<\/p>\n\n\n\n<p>What is the harmonic mean:<\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\(  x_{harmonic} = \\frac{2}{ \\frac{1}{20 } + \\frac{1}{60} } = \\frac{2}{\\frac{4}{60}} = \\frac{120}{4} = 30 km\/hr \\)<\/div>\n\n\n\n<p>Similarly, let&#8217;s consider two surgeons. Surgeon A always does two operations per list and surgeon B (different speciality) always does six operations per list. If the number of lists is the same:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/lists-1024x576.png\" alt=\"\" class=\"wp-image-5181\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/lists-1024x576.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/lists-300x169.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/lists-768x432.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/lists-1536x864.png 1536w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/lists.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>However, if the number of operations is the same:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/operatons-1024x576.png\" alt=\"\" class=\"wp-image-5182\" srcset=\"https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/operatons-1024x576.png 1024w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/operatons-300x169.png 300w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/operatons-768x432.png 768w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/operatons-1536x864.png 1536w, https:\/\/pcool.dyndns.org\/wp-content\/uploads\/2025\/07\/operatons.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>So, it depends what you are looking at what mean you require! If the number of operations is the same, the mean is 3 (harmonic mean, as the mean of the denominator is required). However, if the number of lists is the same, the mean is 4 (arithmetic mean, as dealing with the numerator)).<\/p>\n\n\n\n<p>The harmonic mean of precision and recall (<a href=\"https:\/\/pcool.dyndns.org\/index.php\/precision-and-recall\/\" data-type=\"page\" data-id=\"5151\">F1 score<\/a>) is often used in machine learning to evaluate performance.<\/p>\n\n\n\n<p><strong>Geometric mean<\/strong><\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\(  x_{geometric} = \\left( \\prod_{i=1}^{n} x_i \\right)^{\\frac{1}{n}} = \\sqrt[n]{ x_1 \\cdot x_2 \\cdot \\cdots \\cdot x_n }  \\)<\/div>\n\n\n\n<p>This mean is used for multiplicative factors such as investment return rates, but also survival probabilities. The geometric mean gives an overall average survival probability across survival times, emphasising the multiplicative (cumulative) nature of survival probabilities.<\/p>\n\n\n\n<p>For example if the survival at:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>year 1 is 0.9<\/li>\n\n\n\n<li>year 2 0.81 <\/li>\n\n\n\n<li>year 3 0.72<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\(x_{geom}  = \\sqrt[3]{ 0.9 \\cdot 0.81 \\cdot 0.72 } = \\sqrt[3]{ 0.52488 } \\approx 0.807\\)<\/div>\n\n\n\n<p>The arithmetic mean and harmonic mean of the same numbers are:<\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\(x_{arithmetic}  = \\frac{ 0.9 + 0.81 +0.72 }{3} = 0.81 \\)<\/div>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\(  x_{harmonic} = \\frac{3}{ \\frac{1}{0.9 } + \\frac{1}{0.81} + \\frac{1}{0.72} } \\approx 0.803 \\)<\/div>\n\n\n\n<p><strong><em>The arithmetic mean is always larger than the geometric mean and the geometric mean is always larger than the harmonic mean.<\/em><\/strong><\/p>\n\n\n\n<p><strong>Quadratic mean (Root Mean Square)<\/strong><\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\( x_{rms} = \\sqrt{\\frac{1}{n} \\sum_{i=1}^{n} x_i^2} \\)<\/div>\n\n\n\n<p>The quadratic mean is better known as the root mean square and is used to find a magnitude of time varying data (for example alternating current, electrical signals in electro-cardiogram \/ electro-encephalogram, electro-myogram). In addition, the root mean square is useful in <strong>estimating uncertainty in repeated measurements<\/strong>. It is also used in machine learning to evaluate performance of for example regression models. Using the same numbers as above:<\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">\\(  x_{rms} = \\sqrt{0.9^2 + 0.81^2 + 0.72^2} \\approx 1.41 \\)<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Arithmetic mean The arithmetic mean is the &#8216;normal&#8217; mean and calculated by adding all observations together and then dividing by the total number of observations. The arithmetic mean gives a good estimate of central tendency in data that con be modelled with a normal distribution. However, it is very sensitive to outliers and not recommended [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-5153","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/5153","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/comments?post=5153"}],"version-history":[{"count":6,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/5153\/revisions"}],"predecessor-version":[{"id":5189,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/5153\/revisions\/5189"}],"wp:attachment":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/media?parent=5153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}