Editing 2701: Change in Slope

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 6: Line 6:
 
| imagesize = 656x371px
 
| imagesize = 656x371px
 
| noexpand  = true
 
| noexpand  = true
| titletext = Squinting at a graph is fine for getting a rough idea of the answer, but if you want to pretend to know it exactly, you need statistics.
+
| titletext = Squinting at a graph is fine for getting a rough idea of the answer, but if you want to pretend to know it exactly, you neeed statistics.
 
}}
 
}}
  
 
==Explanation==
 
==Explanation==
The comic is a tip for detecting changes in slopes over a {{w|scatter plot}} of data. This is a common requirement in exploratory statistics for comparing trends in a series — finding the cutoff where the slope changes may reveal valuable information about the data.
+
{{incomplete|Created by a SIDEWAYS STATISTIC - Please change this comment when editing this page. Do NOT delete this tag too soon.}}
  
The comic compares two methods. Firstly, a novice method — by 'doing a bunch of statistics'- i.e, applying various statistical tools to analyze the data and figure out the quantitative change in slope. This results in two equations for the trendlines above and below a given value, a box plot, a histogram, and a line chart. It is unknown exactly what methods the novice used to figure out the change in slope in the data. Possibilities include calculating the [https://stackoverflow.com/a/45063636 derivatives] (which probably won't work well on noisy data such as shown), or [https://stackoverflow.com/a/71744293 gradients], or using a [https://stackoverflow.com/a/47522444 Savitzky-Golay filter or piecewise linear smoothing spline fits]. [[Randall]]'s light gray figures may be suggesting [https://colab.research.google.com/drive/1apKDIN5FE32mtGiQew5cE6wK6m6eM_Fr this method.]
+
For subtle effects, such as a the slight inflection of an underlying trend, visually inspecting a graph cannot always do justice to what is there. For data on a graph, such as the scattergraph shown in this comic, the detail hidden within its cloud of points is unclear when looked at normally. The comic shows that by taking the 2D plot and reorientating it in 3D space, introducing foreshortening along the trend, the displacement perpendicular to the possibly straight line is more clearly visible.
  
The other is the so-called 'expert' method, which involves [https://web.archive.org/web/20221122041345/https://cdn.discordapp.com/attachments/525939879805190154/1044395695525875712/xkcd_sideways.png tilting the page the graph is printed on to view changes in slope] better. For small changes in an underlying trend, similar to that apparently shown in the comic, direct visual inspection cannot always identify or even reveal the effect. The comic shows, however, that by taking the page and rotating it in just the right way, the foreshortened perspective can make certain details much more apparent, allowing the 'expert' to see at a glance that there is a change in the slope. Ironically, tilting the comic to make the original roughly resemble the perspective of the 'tilted' version graph shown in the comic shows that the right-hand panel is slightly exaggerated for visual effect. The use of {{w|Perspective (graphical)|perspective}} to make information pop into the audience's view has been used by artists for {{w|The_Ambassadors_(Holbein)|centuries}}.
+
This is very similar to more real-world activities such as polishing, cleaning and/or removing dents from surfaces, where an artisan may take an oblique view of their work, from various angles, to highlight any remaining defects that might need some attention. In mathematical terms, a graph can also be transformed mathematically to produce a squashed version (it could even effectively be the same as a 3D transform to make a 2D plot ''look'' like it is rotated in a 3D-perspective, as in the comic), although this lacks the readiness of a physical object being twisted and turned to examine it from as many angles as might be required.
  
However, applying such an approach to data plots can run into errors — the primary one being parallax error from the oblique viewing angle causing the observer to not necessarily identify or clearly find the point at which the slope changes. It also does not reveal any data about the quantitative value of the change in slope, merely proving the existence of one. Furthermore, noisy data might show an apparent slope change that is not representative of an actual change in the underlying data, so even more advanced [https://www.danielsoper.com/statcalc/calculator.aspx?id=103 statistics testing the hypothesis of whether an apparent slope change is real] may likely be a good idea.
+
The title text then goes on to say that while such a visual inspection can ''reveal'' such a quirk of data distribution, you normally still need to revert to mathematical analysis to properly quantify that quirk – such as to measure the relative likelihood of the change in trend being real, or else well within the randomness of the scattering of datapoints around any actually linear trend.
  
The title text then goes on to say that, while such a trick is useful to identify that there is some change in slope, in order to ''pretend'' to know it exactly one must revert to statistics (the "novice method") to obtain some form of information, defeating some of the premise of the comic. This at least produces a semblance of statistical rigor although, once an answer appears obvious, data could be interpreted to reach an answer that you are now expecting rather than revealing something of more statistically useful significance.
+
==Transcript==
 +
{{incomplete transcript|Do NOT delete this tag too soon.}}
  
==Transcript==
 
 
:How to detect a change in the slope of your data
 
:How to detect a change in the slope of your data
  
Line 34: Line 34:
  
 
{{comic discussion}}
 
{{comic discussion}}
 
[[Category:Charts]]
 
 
[[Category:Scatter plots]]
 
[[Category:Scatter plots]]
 
[[Category:Bar charts]]
 
[[Category:Bar charts]]
 
[[Category:Line graphs]]
 
[[Category:Line graphs]]
[[Category:Statistics]]
 

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)