{"id":35643,"date":"2026-11-27T19:00:33","date_gmt":"2026-11-27T19:00:33","guid":{"rendered":"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/"},"modified":"2026-11-27T19:00:33","modified_gmt":"2026-11-27T19:00:33","slug":"interquartile-range-worked-examples","status":"publish","type":"post","link":"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/","title":{"rendered":"Interquartile Range: Measuring the Middle Spread of Data"},"content":{"rendered":"<p>The interquartile range, usually shortened to IQR, measures the spread between the lower and upper quartiles of a dataset. It is calculated as Q3 minus Q1 and describes the width of the central part of an ordered distribution. Because it focuses on this central region, it is less directly controlled by the most extreme observations than the full range.<\/p>\n<p>IQR is useful for comparing waiting times, measurements and other numerical data, especially when a few unusually large or small values make the range difficult to interpret. It is not a complete description of a distribution, however. Quartile conventions can differ, and a value outside a box-plot fence is a reason to investigate, not automatic proof of a mistake.<\/p>\n<h2>Key takeaways<\/h2>\n<ul>\n<li>IQR is the upper quartile minus the lower quartile.<\/li>\n<li>It measures spread, not the typical value itself.<\/li>\n<li>Different quartile conventions can produce different small-sample answers.<\/li>\n<li>Box-plot fences identify unusual observations rather than proven errors.<\/li>\n<li>IQR should be reported with context, units and other information.<\/li>\n<\/ul>\n<h2>What are quartiles?<\/h2>\n<p>Arrange numerical observations from smallest to largest. Quartiles locate positions in this ordered distribution. The first quartile, Q1, corresponds to the lower quarter boundary, while the third quartile, Q3, corresponds to the upper quarter boundary. The median is the central, or second-quartile, location.<\/p>\n<p>In a population distribution, these ideas are expressed through percentiles. In a finite sample, a requested percentile may fall between observations. Methods differ in how they handle those positions, particularly when the dataset is small.<\/p>\n<p>It is therefore safer to describe quartiles as boundaries associated with portions of an ordered distribution than to insist that exactly one quarter of every small dataset lies strictly below each boundary. Ties and interpolation complicate that literal interpretation.<\/p>\n<h2>How to calculate IQR using one clear convention<\/h2>\n<p>For the examples here, use the median-of-halves method. Sort the observations, split them into lower and upper halves, and find the median of each half. When the number of observations is odd, exclude the overall median before finding the two half-medians.<\/p>\n<p>This is a common teaching convention, not the only valid quantile method. Stating it at the start makes the calculations reproducible and prevents disagreement caused by silently switching methods.<\/p>\n<p>After obtaining Q1 and Q3, subtract the lower from the upper. The result has the same units as the original measurements. A negative result indicates an error in ordering or subtraction because the upper quartile cannot be below the lower quartile.<\/p>\n<h2>A complete worked example<\/h2>\n<p>Consider eight invented waiting times, in minutes: 2, 4, 5, 7, 8, 10, 12 and 20. They are already in ascending order. The lower half is 2, 4, 5, 7; the upper half is 8, 10, 12, 20.<\/p>\n<p>The lower-half median is the average of 4 and 5, giving Q1 = 4.5 minutes. The upper-half median is the average of 10 and 12, giving Q3 = 11 minutes. The interquartile range is therefore 11 minus 4.5 = 6.5 minutes.<\/p>\n<p>The overall median is the average of 7 and 8, or 7.5 minutes. The full range is 20 minus 2, or 18 minutes. These three results answer different questions: central location, central spread and total observed span.<\/p>\n<h3>What does the answer mean?<\/h3>\n<p>The quartile boundaries are 6.5 minutes apart under the stated convention. This does not mean that every observation is 6.5 minutes from the median, nor that the average waiting time is 6.5 minutes.<\/p>\n<p>It also does not mean that 6.5 minutes is a margin of error for a population estimate. IQR describes variation among observations. Uncertainty about an estimated statistic is a separate subject.<\/p>\n<h2>Why extreme observations affect range differently<\/h2>\n<p>Replace the largest invented waiting time, 20, with 40. The lower and upper half-medians remain 4.5 and 11, so IQR remains 6.5 minutes. The full range becomes 38 minutes instead of 18.<\/p>\n<p>This illustrates robustness: a change at the extreme can leave the central-spread summary unchanged. It does not show that IQR is unaffected by every possible change. Altering enough observations, especially around the quartile positions, can change it substantially.<\/p>\n<p>Neither result is automatically superior. If the longest wait matters operationally, the range or maximum contains important information. If the purpose is to describe the central concentration, IQR may be more informative. The question determines which summary is useful.<\/p>\n<h2>Why calculators sometimes disagree<\/h2>\n<p>Take the invented ordered list 2, 4, 5, 7, 8. Under the convention used here, exclude the overall median, 5. The lower half is 2, 4 and its median is 3; the upper half is 7, 8 and its median is 7.5. IQR is 4.5.<\/p>\n<p>Another teaching convention includes the overall median in each half. That gives lower-half values 2, 4, 5 and upper-half values 5, 7, 8. Their medians are 4 and 7, producing IQR = 3.<\/p>\n<p>Statistical software may use still other interpolation rules. A disagreement does not necessarily mean one calculation contains arithmetic errors. First compare the definitions and settings. For assignments, use the convention specified by the course.<\/p>\n<h3>Why the difference matters<\/h3>\n<p>With small samples, one observation can represent a substantial portion of the data. Choices about boundary placement can therefore make visible differences. Larger samples often reduce the practical importance of some differences, but the method should still be documented.<\/p>\n<p>Changing conventions halfway through a comparison is especially problematic. Two groups should be summarised consistently if their IQRs are being compared.<\/p>\n<h2>IQR and box plots<\/h2>\n<p>A box plot usually places the lower and upper edges of its box at Q1 and Q3, with a line marking the median. The box&#8217;s length therefore represents the interquartile range on the plotted scale.<\/p>\n<p>Whisker conventions vary. Some plots extend whiskers to minimum and maximum values, while others use a rule based on IQR and display more distant observations separately. The caption or software documentation should explain which version is used.<\/p>\n<p>A box plot compresses information. It can show central location, spread and some asymmetry, but it does not display every cluster or gap. Different datasets can produce the same box plot.<\/p>\n<h2>What does the 1.5-IQR rule do?<\/h2>\n<p>A common screening rule places a lower fence at Q1 minus 1.5 times IQR and an upper fence at Q3 plus 1.5 times IQR. Observations beyond those fences are flagged as potentially unusual.<\/p>\n<p>For the eight-value example, 1.5 multiplied by 6.5 equals 9.75 minutes. The lower fence is 4.5 minus 9.75, or \u22125.25 minutes. The upper fence is 11 plus 9.75, or 20.75 minutes.<\/p>\n<p>The original maximum of 20 is inside the upper fence. The changed value of 40 is outside. A negative lower fence does not imply that negative waiting times occurred; it is simply the result of the screening calculation.<\/p>\n<h3>A flag is not a verdict<\/h3>\n<p>An unusual observation could be a recording mistake, a measurement problem or a genuine event. Deleting it solely because it lies beyond a fence can remove the most important information in the dataset.<\/p>\n<p>Investigate the observation&#8217;s origin, check units and consult the context. Earth Site&#8217;s guide to <a title=\"Measurement Uncertainty: How Scientists Detect Real Change\" href=\"https:\/\/www.earth-site.co.uk\/Education\/measurement-uncertainty-real-change\/\">measurement uncertainty<\/a> helps distinguish instrument limitations from real variability. Record any exclusion and its justification rather than silently cleaning the data into a preferred pattern.<\/p>\n<h2>How units and transformations affect IQR<\/h2>\n<p>Adding the same constant to every observation shifts both quartiles by that constant, leaving their difference unchanged. If each waiting time increased by one hundred minutes, IQR would remain 6.5 minutes under the same method.<\/p>\n<p>Multiplying every observation by a positive factor multiplies IQR by that factor. Converting the original IQR from minutes to seconds gives 6.5 multiplied by sixty = 390 seconds. The physical spread has not changed; only its numerical expression has.<\/p>\n<p>Earth Site&#8217;s article on <a title=\"Dimensional Analysis: How Units Expose Calculation Mistakes\" href=\"https:\/\/www.earth-site.co.uk\/Education\/dimensional-analysis-units-calculation-errors\/\">units and calculation checks<\/a> explains why a comparison must use compatible units. An IQR of 390 seconds is not larger than one of 6.5 minutes.<\/p>\n<h2>Can IQR be zero?<\/h2>\n<p>Yes. If many observations have the same value, Q1 and Q3 can coincide even when some observations differ. For example, the invented list 5, 5, 5, 5, 5, 5, 5, 20 has both quartiles equal to 5 under the stated method.<\/p>\n<p>IQR is zero, but the data are not all identical. The maximum remains 20. This is a reminder that a summary of the central region does not describe every observation.<\/p>\n<p>Rules that divide by IQR require special handling when it is zero. One should not conceal the issue by substituting an arbitrary tiny denominator and presenting the result as a standard calculation.<\/p>\n<h2>Comparing two groups responsibly<\/h2>\n<p>A smaller IQR indicates a narrower central spread under the chosen method. It does not necessarily indicate better performance. Whether smaller variation is desirable depends on what is measured and what outcomes matter.<\/p>\n<p>Two groups may have equal IQRs but very different medians. A consistently long waiting time can have a small spread, while a service with a much shorter typical wait can be more variable. Report location and spread together.<\/p>\n<p>Sample size and selection also matter. An IQR from a few conveniently chosen observations cannot repair a biased sample. If one group excludes busy periods and another includes them, the comparison may reflect collection methods rather than the systems being studied.<\/p>\n<h2>Percentages, percentiles and IQR<\/h2>\n<p>The quartile positions are associated with percentiles, but IQR itself normally retains the measurement&#8217;s units. An IQR of six minutes is not automatically six per cent. A percentage comparison requires a defined reference quantity.<\/p>\n<p>For example, comparing an IQR with a median creates a relative measure, but that measure has limitations, especially when the median is zero or when the scale has no meaningful zero. Earth Site&#8217;s explanation of <a title=\"Percentages\" href=\"https:\/\/www.earth-site.co.uk\/Education\/percentages\/\">percentages<\/a> is useful for keeping the denominator explicit.<\/p>\n<p>Do not confuse the middle half of an ordered distribution with half of the total measured quantity. The central half of households ranked by a measurement does not necessarily account for half of the sum of that measurement.<\/p>\n<h2>A compact reporting checklist<\/h2>\n<p>State the variable, units, sample size, median and quartiles. Give IQR and identify the quartile convention when it matters. If using a box plot, explain the whiskers and any outlier-screening rule.<\/p>\n<p>Describe exclusions and missing values. A blank entry is not automatically a zero, and silently converting missing observations to zero can distort the ordered data. Keep the raw data available where appropriate so calculations can be checked.<\/p>\n<p>Finally, connect the summary to the question. A clear sentence explaining what the spread represents is more useful than a table of statistics without interpretation.<\/p>\n<h2>Conclusion<\/h2>\n<p>Interquartile range gives a focused description of central spread while reducing the influence of extremes. Its usefulness depends on transparent conventions and careful interpretation. Pair it with the median, retain information about unusual observations and remember what it leaves out. A good statistical summary makes a dataset easier to understand without pretending to replace the dataset itself.<\/p>\n<h2>Frequently asked questions<\/h2>\n<h3>What is the formula for IQR?<\/h3>\n<p>IQR = Q3 \u2212 Q1, the upper quartile minus the lower quartile.<\/p>\n<h3>Is IQR the same as the range?<\/h3>\n<p>No. Range uses the maximum and minimum; IQR uses the two quartile boundaries.<\/p>\n<h3>Why does my calculator give another answer?<\/h3>\n<p>It may use a different quantile convention. Check the method before assuming an arithmetic error.<\/p>\n<h3>Should every point outside the fences be deleted?<\/h3>\n<p>No. Fences flag observations for investigation, not automatic removal.<\/p>\n<h3>Does zero IQR mean every value is identical?<\/h3>\n<p>No. The central quartiles can coincide while observations outside that central region differ.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn to calculate and interpret IQR, including quartile conventions, outlier fences, units and zero spread.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_earthsite_chatgtp_hash":["5cf544af9a2806ee92b3806ad50ed0fed2ccb0f594656362226a7528c8ac757f"],"_et_dynamic_cached_shortcodes":["a:0:{}"],"_et_dynamic_cached_attributes":["a:0:{}"]},"categories":[1],"tags":[],"class_list":["post-35643","post","type-post","status-publish","format-standard","hentry","category-generalknowledge"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Interquartile Range: Measuring the Middle Spread of Data - Earth Site Education<\/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.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Interquartile Range: Measuring the Middle Spread of Data - Earth Site Education\" \/>\n<meta property=\"og:description\" content=\"Learn to calculate and interpret IQR, including quartile conventions, outlier fences, units and zero spread.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"Earth Site Education\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/Earth-Site-Education\/61556359432402\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-27T19:00:33+00:00\" \/>\n<meta name=\"author\" content=\"Earth Site Education\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Earth Site Education\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Interquartile Range: Measuring the Middle Spread of Data - Earth Site Education","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.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/","og_locale":"en_GB","og_type":"article","og_title":"Interquartile Range: Measuring the Middle Spread of Data - Earth Site Education","og_description":"Learn to calculate and interpret IQR, including quartile conventions, outlier fences, units and zero spread.","og_url":"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/","og_site_name":"Earth Site Education","article_publisher":"https:\/\/www.facebook.com\/people\/Earth-Site-Education\/61556359432402\/","article_published_time":"2026-11-27T19:00:33+00:00","author":"Earth Site Education","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Earth Site Education","Estimated reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/#article","isPartOf":{"@id":"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/"},"author":{"name":"Earth Site Education","@id":"https:\/\/www.earth-site.co.uk\/Education\/#\/schema\/person\/f028ca91f88fe2e9e578f24056a12819"},"headline":"Interquartile Range: Measuring the Middle Spread of Data","datePublished":"2026-11-27T19:00:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/"},"wordCount":1802,"publisher":{"@id":"https:\/\/www.earth-site.co.uk\/Education\/#organization"},"articleSection":["General Knowledge"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/","url":"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/","name":"Interquartile Range: Measuring the Middle Spread of Data - Earth Site Education","isPartOf":{"@id":"https:\/\/www.earth-site.co.uk\/Education\/#website"},"datePublished":"2026-11-27T19:00:33+00:00","breadcrumb":{"@id":"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.earth-site.co.uk\/Education\/interquartile-range-worked-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.earth-site.co.uk\/Education\/"},{"@type":"ListItem","position":2,"name":"Interquartile Range: Measuring the Middle Spread of Data"}]},{"@type":"WebSite","@id":"https:\/\/www.earth-site.co.uk\/Education\/#website","url":"https:\/\/www.earth-site.co.uk\/Education\/","name":"Earth Site Education","description":"","publisher":{"@id":"https:\/\/www.earth-site.co.uk\/Education\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.earth-site.co.uk\/Education\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.earth-site.co.uk\/Education\/#organization","name":"Earth Site Education","url":"https:\/\/www.earth-site.co.uk\/Education\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.earth-site.co.uk\/Education\/#\/schema\/logo\/image\/","url":"https:\/\/www.earth-site.co.uk\/Education\/wp-content\/uploads\/2024\/06\/LogoYouTube.png","contentUrl":"https:\/\/www.earth-site.co.uk\/Education\/wp-content\/uploads\/2024\/06\/LogoYouTube.png","width":800,"height":800,"caption":"Earth Site Education"},"image":{"@id":"https:\/\/www.earth-site.co.uk\/Education\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/Earth-Site-Education\/61556359432402\/"]},{"@type":"Person","@id":"https:\/\/www.earth-site.co.uk\/Education\/#\/schema\/person\/f028ca91f88fe2e9e578f24056a12819","name":"Earth Site Education","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/93795f5d72a690673db58fc60779e6bb369542d93350bb5432476175ff04c468?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/93795f5d72a690673db58fc60779e6bb369542d93350bb5432476175ff04c468?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/93795f5d72a690673db58fc60779e6bb369542d93350bb5432476175ff04c468?s=96&d=mm&r=g","caption":"Earth Site Education"},"url":"https:\/\/www.earth-site.co.uk\/Education\/author\/keirearthsiteadmin-7\/"}]}},"_links":{"self":[{"href":"https:\/\/www.earth-site.co.uk\/Education\/wp-json\/wp\/v2\/posts\/35643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.earth-site.co.uk\/Education\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.earth-site.co.uk\/Education\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.earth-site.co.uk\/Education\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.earth-site.co.uk\/Education\/wp-json\/wp\/v2\/comments?post=35643"}],"version-history":[{"count":0,"href":"https:\/\/www.earth-site.co.uk\/Education\/wp-json\/wp\/v2\/posts\/35643\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.earth-site.co.uk\/Education\/wp-json\/wp\/v2\/media?parent=35643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.earth-site.co.uk\/Education\/wp-json\/wp\/v2\/categories?post=35643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.earth-site.co.uk\/Education\/wp-json\/wp\/v2\/tags?post=35643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}