Lucas Kent e39465ad2f Changes to be committed:
new file:   Files/flashplayer_32_sa.exe
	new file:   favicon.ico
	new file:   globe.gif
	new file:   imgs/download.png
	new file:   imgs/zuck.jpg
	new file:   index.html
	new file:   other.ico
	new file:   script.js
	new file:   site.webmanifest
	new file:   sitemap.html
	new file:   styles/backround.css
	new file:   styles/border.css
	new file:   styles/fonts/Titillium_Web/OFL.txt
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf
	new file:   styles/fonts/webfontkit-20221027-163353/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2
	new file:   styles/fonts/webfontkit-20221027-165950/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2
	new file:   styles/style.css
	new file:   tools/2048/.gitignore
	new file:   tools/2048/.jshintrc
	new file:   tools/2048/CONTRIBUTING.md
	new file:   tools/2048/LICENSE.txt
	new file:   tools/2048/README.md
	new file:   tools/2048/Rakefile
	new file:   tools/2048/favicon.ico
	new file:   tools/2048/index.html
	new file:   tools/2048/js/animframe_polyfill.js
	new file:   tools/2048/js/application.js
	new file:   tools/2048/js/bind_polyfill.js
	new file:   tools/2048/js/classlist_polyfill.js
	new file:   tools/2048/js/game_manager.js
	new file:   tools/2048/js/grid.js
	new file:   tools/2048/js/html_actuator.js
	new file:   tools/2048/js/keyboard_input_manager.js
	new file:   tools/2048/js/local_storage_manager.js
	new file:   tools/2048/js/tile.js
    new file:   tools/2048/meta/apple-touch-icon.png
	new file:   tools/webretro/cores/neocd_libretro.js
	new file:   tools/webretro/cores/neocd_libretro.wasm
	new file:   tools/webretro/cores/nestopia_libretro.js
	new file:   tools/webretro/cores/nestopia_libretro.wasm
	new file:   tools/webretro/cores/o2em_libretro.js
	new file:   tools/webretro/cores/o2em_libretro.wasm
	new file:   tools/webretro/cores/opera_libretro.js
	new file:   tools/webretro/cores/opera_libretro.wasm
2022-11-02 08:40:01 -04:00

294 lines
13 KiB
HTML

<!doctype html>
<html lang="en"><!-- #BeginTemplate "/Templates/Main.dwt" --><!-- DW6 -->
<!-- Mirrored from www.mathsisfun.com/data/scatter-xy-plots.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:38:23 GMT -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>Scatter (XY) Plots</title>
<meta name="description" content="Math explained in easy language, plus puzzles, games, quizzes, worksheets and a forum. For K-12 kids, teachers and parents." />
<!-- #EndEditable -->
<meta name="keywords" content="math, maths, mathematics, school, homework, education">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="HandheldFriendly" content="true">
<meta http-equiv="pics-label" content='(PICS-1.1 "http://www.classify.org/safesurf/" L gen true for "http://www.mathsisfun.com" r (SS~~000 1))'>
<link rel="stylesheet" type="text/css" href="../style3.css" />
<script src="../main3.js" type="text/javascript"></script>
</head>
<body id="bodybg">
<div class="bg">
<div id="stt"></div>
<div id="hdr"></div>
<div id="logo"><a href="../index.html"><img src="../images/style/logo.svg" alt="Math is Fun" /></a></div>
<div id="gtran"><script type="text/javascript">document.write(getTrans());</script></div>
<div id="gplus"><script type="text/javascript">document.write(getGPlus());</script></div>
<div id="adTopOuter" class="centerfull noprint">
<div id="adTop">
<script type="text/javascript">document.write(getAdTop());</script>
</div>
</div>
<div id="adHide">
<div id="showAds1"><a href="javascript:showAds()">Show Ads</a></div>
<div id="hideAds1"><a href="javascript:hideAds()">Hide Ads</a><br>
<a href="../about-ads.html">About Ads</a></div>
</div>
<div id="menuWide" class="menu">
<script type="text/javascript">document.write(getMenu(0));</script>
</div>
<div id="linkto">
<div id="linktort"><script type="text/javascript">document.write(getLinks());</script></div>
</div>
<div id="search" role="search"><script type="text/javascript">document.write(getSearch());</script></div>
<div id="menuSlim" class="menu">
<script type="text/javascript">document.write(getMenu(1));</script>
</div>
<div id="menuTiny" class="menu">
<script type="text/javascript">document.write(getMenu(2));</script>
</div>
<div id="extra"></div>
</div>
<div id="content" role="main"><!-- #BeginEditable "Body" -->
<h1 class="center">Scatter Plots</h1>
<p style="float:left; margin: 0 10px 5px 0;"><img src="images/scatter-plot.svg" alt="scatter plot height vs weight" /></p>
<p class="larger">A <span class="center">Scatter (XY) Plot has</span> points that show the relationship between two sets of data. </p>
<p>In this example, each dot shows one person's weight versus their height. </p>
<p>(The data is plotted on the graph as &quot;<a href="cartesian-coordinates.html">Cartesian (x,y) Coordinates</a>&quot;)</p>
<h2>Example: </h2>
<p>The local ice cream shop keeps track of how much ice cream they sell versus the noon temperature on that day. Here are their figures for the last 12 days: </p>
<table border="3" align="center" cellpadding="4">
<tr align="center">
<td colspan="2"><b><em>Ice Cream Sales vs Temperature</em><em></em></b></td>
</tr>
<tr align="center">
<th>Temperature &deg;C</th>
<th>Ice Cream Sales</th>
</tr>
<tr align="center">
<td>14.2&deg;</td>
<td>$215 </td>
</tr>
<tr align="center">
<td>16.4&deg;</td>
<td> $325 </td>
</tr>
<tr align="center">
<td>11.9&deg; </td>
<td>$185 </td>
</tr>
<tr align="center">
<td>15.2&deg; </td>
<td>$332 </td>
</tr>
<tr align="center">
<td>18.5&deg; </td>
<td>$406 </td>
</tr>
<tr align="center">
<td>22.1&deg; </td>
<td>$522 </td>
</tr>
<tr align="center">
<td>19.4&deg; </td>
<td>$412 </td>
</tr>
<tr align="center">
<td>25.1&deg; </td>
<td>$614 </td>
</tr>
<tr align="center">
<td>23.4&deg; </td>
<td>$544 </td>
</tr>
<tr align="center">
<td>18.1&deg;</td>
<td> $421 </td>
</tr>
<tr align="center">
<td>22.6&deg;</td>
<td> $445 </td>
</tr>
<tr align="center">
<td>17.2&deg;</td>
<td>$408</td>
</tr>
</table>
<p>And here is the same data as a <span class="center">Scatter Plot</span>:</p>
<p class="center"><img src="images/scatter-ice-cream1.svg" alt="scatter plot ice cream vs temp" /></p>
<p>It is now easy to see that <b>warmer weather leads to more sales</b>, but the relationship is not perfect. </p>
<h2>Line of Best Fit</h2>
<p>We can also draw a &quot;Line of Best Fit&quot; (also called a &quot;Trend Line&quot;) on our scatter plot:</p>
<p class="center"><img src="images/scatter-ice-cream1a.svg" alt="scatter plot ice cream vs temp with line" /></p>
<p>Try to have the line <b>as close as possible to all points</b>, and as many points above the line as below.</p>
<p>But for better accuracy we can calculate the line using <a href="least-squares-regression.html">Least Squares Regression</a> and the <a href="least-squares-calculator.html">Least Squares Calculator</a>. </p>
<h2>Example: Sea Level Rise</h2>
<table border="0">
<tr>
<td><p>A Scatter Plot of Sea Level Rise:</p></td>
<td><img src="images/mean-sea-level.gif" width="400" height="239" alt="mean sea level" /></td>
</tr>
<tr>
<td>And here I have drawn on a &quot;Line of Best Fit&quot;.</td>
<td><img src="images/mean-sea-level-line.gif" width="400" height="239" alt="mean sea level with line" /></td>
</tr>
</table>
<h2>Interpolation and Extrapolation</h2>
<p><b>Interpolation</b> is where we find a value <b>inside</b> our set of data points.</p><p class="center"><img src="images/interpolate.svg" alt="interpolate" /></p>
<p>Here we use <b>linear interpolation</b> to estimate the sales at 21 &deg;C.</p>
<div style="clear:both"></div><p>&nbsp;</p>
<p><b>Extrapolation</b> is where we find a value <b>outside</b> our set of data points.</p><p class="center"><img src="images/extrapolate.svg" alt="extrapolate" /></p>
<p>Here we use <b>linear extrapolation</b> to estimate the sales at 29 &deg;C (which is higher than any value we have).</p>
<p>Careful: <b>Extrapolation</b> can give misleading results because we are in &quot;uncharted territory&quot;.</p>
<p>&nbsp;</p>
<p>As well as using a graph (like above) we can create a formula to help us.</p>
<div class="example">
<h3>Example: Straight Line Equation</h3>
<p>We can estimate a <a href="../algebra/line-equation-2points.html">straight line equation from two points</a> from the graph above</p>
<p>Let's estimate two points on the line near actual values: <b>(12&deg;, $180)</b> and <b>(25&deg;, $610)</b></p>
<p>First, find the slope:</p>
<table border="0" align="center">
<tr>
<td><span class="center large">slope &quot;m&quot; </span></td>
<td><span class="center large">= <span class="intbl">
<em>change in y</em>
<strong>change in x</strong>
</span></span></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><span class="center large">= <span class="intbl">
<em>$610 &minus; $180</em>
<strong>25&deg; &minus; 12&deg;</strong>
</span> </span></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><span class="center large">=&nbsp; <span class="intbl">
<em>$430</em>
<strong>13&deg;</strong>
</span> &nbsp; </span></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><span class="center large">= 33 (rounded)</span></td>
</tr>
</table>
<p>&nbsp;</p>
<p>Now put the slope and the point <b>(12&deg;, $180)</b> into the <a href="../algebra/line-equation-point-slope.html">&quot;point-slope&quot; formula</a>:</p>
<p class="center larger">y &minus; y<sub>1</sub> = m(x &minus; x<sub>1</sub>)</p>
<p class="center">y &minus; 180 = 33(x &minus; 12)</p>
<p class="center"><span class="center larger">y = 33(x &minus; 12)</span> + 180</p>
<p class="center">y = <span class="center larger">33x</span> <span class="center larger">&minus;</span> 396 + 180</p>
<p align="center" class="larger"><b>y = <span class="center larger">33x</span> <span class="center larger">&minus;</span> 216</b></p>
<h4>&nbsp;</h4>
<h4>INTERpolating</h4>
<p>Now we can use that equation to <b>interpolate</b> a sales value at 21&deg;:</p>
<p align="center" class="larger">y = <span class="center larger">33&times;21</span>&deg; <span class="center larger">&minus;</span> 216 = <b>$477</b></p>
<h4>&nbsp;</h4>
<h4>EXTRApolating</h4>
<p>And to <b>extrapolate</b> a sales value at 29&deg;:</p>
<p align="center" class="larger">y = <span class="center larger">33&times;29&deg;</span> <span class="center larger">&minus;</span> 216 = <b>$741</b></p>
<p>The values are close to what we got on the graph. But that doesn't mean they are more (or less) accurate. They are all just estimates.</p>
<p>Don't use extrapolation too far! What sales would you expect at 0&deg; ?</p>
<p align="center" class="larger">y = <span class="center larger">33&times;0</span>&deg; <span class="center larger">&minus;</span> 216 = <span class="center larger"><b>&minus;</b></span><b>$216</b></p>
<p>Hmmm... <b>Minus $216</b>? We extrapolated too far! </p>
</div>
<p>Note: we used <b>linear</b> (based on a <b>line</b>) interpolation and extrapolation, but there are many other types, for example we could use polynomials to make curvy lines, etc.</p>
<h2>Correlation</h2>
<p>When the two sets of data are strongly linked together we say they have a <b>High Correlation</b>.</p>
<div class="words">
<p>The word Correlation is made of <b>Co-</b> (meaning &quot;together&quot;), and <b>Relation</b></p>
</div>
<ul>
<li>Correlation is <b>Positive</b> when the values <b>increase</b> together, and </li>
<li>Correlation is <b>Negative</b> when one value <b>decreases</b> as the other increases</li>
</ul>
<p>Like this:</p>
<p><img src="images/correlation-examples.svg" alt="correlation levels" width="100%" /></p>
<p class="center">(Learn <a href="correlation.html">More About Correlation</a>)</p>
<h2>Negative Correlation</h2><p>Correlations can be negative, which means there <b>is</b> a correlation but one value goes down as the other value increases.</p>
<table border="0" align="center">
<tr>
<td>
<h3>Example : Birth Rate vs Income </h3>
<p>The birth rate tends to be <b>lower</b> in richer countries.</p>
<p>&nbsp;</p>
<p>Below is a scatter plot for about 100 different countries.</p></td>
<td><div class="simple">
<table border="0">
<tr>
<td>Country</td>
<td align="right">Yearly<br />
Production<br />
per Person</td>
<td align="right">Birth<br />
Rate</td>
</tr>
<tr>
<td>Madagascar</td>
<td align="right"> $800 </td>
<td align="right">5.70 </td>
</tr>
<tr>
<td>India </td>
<td align="right">$3,100 </td>
<td align="right">2.85 </td>
</tr>
<tr>
<td>Mexico </td>
<td align="right">$9,600 </td>
<td align="right">2.49 </td>
</tr>
<tr>
<td>Taiwan </td>
<td align="right">$25,300 </td>
<td align="right">1.57 </td>
</tr>
<tr>
<td>Norway </td>
<td align="right">$40,000 </td>
<td align="right">1.78 </td>
</tr>
</table>
</div></td>
</tr>
</table>
<p class="center"><img src="images/gdp-vs-birth-rate.gif" width="434" height="200" alt="gdp vs birth rate" /></p>
<p align="center">It has a <b>negative correlation</b> (the line slopes down)</p>
<p>Note: I tried to fit a straight line to the data, but maybe a <b>curve</b> would work better, what do you think?</p>
<p>&nbsp;</p>
<div class="questions">
<script type="text/javascript">getQ(3773, 3775, 8669, 8671, 8673, 8675, 8677, 8678, 8701, 8702, 8703, 8704);</script>&nbsp;
</div>
<div class="related"><a href="cartesian-coordinates.html">Cartesian (x,y) Coordinates</a><a href="least-squares-regression.html">Least Squares Regression</a>
<a href="index.html">Data Index</a>
</div>
<!-- #EndEditable --></div>
<div id="adend" class="centerfull noprint">
<script type="text/javascript">document.write(getAdEnd());</script>
</div>
<div id="footer" class="centerfull noprint">
<script type="text/javascript">document.write(getFooter());</script>
</div>
<div id="copyrt">
Copyright &copy; 2017 MathsIsFun.com
</div>
<script type="text/javascript">document.write(getBodyEnd());</script>
</body>
<!-- #EndTemplate -->
<!-- Mirrored from www.mathsisfun.com/data/scatter-xy-plots.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:38:24 GMT -->
</html>