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

378 lines
15 KiB
HTML

<!doctype html>
<html lang="en">
<!-- #BeginTemplate "/Templates/Advanced.dwt" --><!-- DW6 -->
<!-- Mirrored from www.mathsisfun.com/data/random-variables.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:42:21 GMT -->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- #BeginEditable "doctitle" -->
<title>Random Variables</title>
<meta name="description" content="A Random Variable is a set of possible values from a random experiment.">
<!-- #EndEditable -->
<meta name="keywords" content="math, maths, mathematics, school, homework, education">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="HandheldFriendly" content="true">
<meta name="referrer" content="always">
<link rel="stylesheet" type="text/css" href="../style3.css">
<script src="../main3.js"></script>
</head>
<body id="bodybg" class="adv">
<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="advText">Advanced</div>
<div id="gtran">
<script>document.write(getTrans());</script>
</div>
<div id="adTopOuter" class="centerfull noprint">
<div id="adTop">
<script>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>document.write(getMenu(0));</script>
</div>
<div id="linkto">
<div id="linktort">
<script>document.write(getLinks());</script>
</div>
</div>
<div id="search" role="search">
<script>document.write(getSearch());</script>
</div>
<div id="menuSlim" class="menu">
<script>document.write(getMenu(1));</script>
</div>
<div id="menuTiny" class="menu">
<script>document.write(getMenu(2));</script>
</div>
<div id="extra"></div>
</div>
<div id="content" role="main">
<!-- #BeginEditable "Body" -->
<h1 style="text-align:center">Random Variables</h1>
<p>A Random Variable is a set of <b>possible values</b> from a random experiment.</p>
<div class="example">
<h3>Example: Tossing a coin: we could get Heads or Tails. </h3>
<p> Let's give them the values <b>Heads=0</b> and <b>Tails=1</b> and we have a Random Variable "X":</p>
<p>&nbsp;</p>
<p class="center"><img src="images/random-variable-1.svg" alt="random variable 1"></p>
<p>In short:</p>
<p class="center larger">X = {0, 1}</p>
<p>Note: We could choose Heads=100 and Tails=150 or other values if we want! It is our choice.</p>
</div>
<p>So: </p>
<ul>
<li>We have an <b>experiment</b> (such as tossing a coin)</li>
<li>We give <b>values</b> to each event</li>
<li>The <b>set of values</b> is a <b>Random Variable</b></li>
</ul>
<h2>Not Like an Algebra Variable</h2>
<p> In <a href="../algebra/introduction.html">Algebra</a> a variable, like <b>x,</b> is an unknown value: </p>
<div class="example">
<h3>Example: x + 2 = 6</h3>
<p>In this case we can find that x=4</p>
</div>
<p>But a Random Variable is different ... </p>
<div class="center80">
<h3 class="center">A Random Variable has a whole <b>set of values</b> ... </h3>
<h3 class="center">... and it could take on <b>any</b> of those values, randomly.</h3>
</div>
<p>&nbsp;</p>
<div class="example">
<h3>Example: X = {0, 1, 2, 3}</h3>
<p>X could be 0, 1, 2, or 3 <b>randomly</b>.</p>
<p>And they might each have a different probability.</p>
</div>
<h2>Capital Letters</h2>
<p>We use a capital letter, like <b>X</b> or <b>Y</b>, to avoid confusion with the Algebra type of variable.</p>
<h2>Sample Space</h2>
<p>A Random Variable's set of values is the <span style="font-weight:bold"> </span><a href="probability.html">Sample Space.</a></p>
<div class="example">
<p style="float:right; margin: 0 0 5px 10px;"><img src="../geometry/images/single-die.svg" alt="die"></p>
<h3>Example: Throw a die once</h3>
<p>Random Variable <b>X</b> = "The score shown on the top face".</p>
<p><b>X</b> could be 1, 2, 3, 4, 5 or 6</p>
<p>So the Sample Space is {1, 2, 3, 4, 5, 6}</p>
</div>
<h2>Probability</h2>
<p>We can show the probability of any one value using this style:</p>
<p class="center larger">P(X = value) = probability of that value</p>
<div class="example">
<h3>Example (continued): Throw a die once </h3>
<p>X = {1, 2, 3, 4, 5, 6}</p>
<p>In this case they
are all equally likely, so the probability of any one is 1/6 </p>
<ul>
<li>P(X = 1) = 1/6</li>
<li>P(X = 2) = 1/6</li>
<li>P(X = 3) = 1/6</li>
<li>P(X = 4) = 1/6</li>
<li>P(X = 5) = 1/6</li>
<li>P(X = 6) = 1/6</li>
</ul>
<p>Note that the sum of the probabilities = <b>1</b>, as it should be.</p>
</div>
<div class="example">
<div style="float:right; margin: 0 0 5px 10px;"><img src="images/coin-head.jpg" alt="coin head" height="70" width="70"><img src="images/coin-tail.jpg" alt="coin tail" height="70" width="70"><img src="images/coin-head.jpg" alt="coin head" height="70" width="70"></div>
<h3>Example: How many heads when we toss 3 coins?</h3>
<p><b>X</b> = "The number of Heads" is the Random Variable.</p>
<p>In this case, there could be 0 Heads (if all the coins
land Tails up), 1 Head, 2 Heads or 3 Heads.</p>
<p>So the Sample Space = {0, 1, 2, 3}</p>
<p>But this time the outcomes are NOT all equally
likely. </p>
<p>The three coins can land in eight possible ways:</p>
<table align="center" border="0">
<tbody>
<tr>
<td class="large">&nbsp;</td>
<td>&nbsp;</td>
<td colspan="2" class="larger" align="right">X = &nbsp; <br>"Number<br>
of Heads"</td>
</tr>
<tr>
<td class="large">HHH</td>
<td>&nbsp;</td>
<td><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"></td>
<td class="larger" align="center" width="50">3</td>
</tr>
<tr>
<td class="large">HHT</td>
<td>&nbsp;</td>
<td><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"></td>
<td class="larger" align="center">2</td>
</tr>
<tr>
<td class="large">HTH</td>
<td>&nbsp;</td>
<td><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"></td>
<td class="larger" align="center">2</td>
</tr>
<tr>
<td class="large">HTT</td>
<td>&nbsp;</td>
<td><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"></td>
<td class="larger" align="center">1</td>
</tr>
<tr>
<td class="large">THH</td>
<td>&nbsp;</td>
<td><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"></td>
<td class="larger" align="center">2</td>
</tr>
<tr>
<td class="large">THT</td>
<td>&nbsp;</td>
<td><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"></td>
<td class="larger" align="center">1</td>
</tr>
<tr>
<td class="large">TTH</td>
<td>&nbsp;</td>
<td><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"><img src="images/coin-head.jpg" alt="coin head" style="max-width:60px;"></td>
<td class="larger" align="center">1</td>
</tr>
<tr>
<td class="large">TTT</td>
<td>&nbsp;</td>
<td><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"><img src="images/coin-tail.jpg" alt="coin tail" style="max-width:60px;"></td>
<td class="larger" align="center">0</td>
</tr>
</tbody></table>
<p>Looking at the table we see just 1 case of Three Heads, but 3 cases of Two Heads, 3 cases of One Head, and 1 case of Zero Heads. So:</p>
<ul>
<li>P(X = 3) = 1/8</li>
<li>P(X = 2) = 3/8</li>
<li>P(X = 1) = 3/8</li>
<li>P(X = 0) = 1/8</li>
</ul>
</div>
<p>&nbsp;</p>
<div class="example">
<p style="float:left; margin: 0 10px 5px 0;"><img src="../geometry/images/pair-dice2.svg" alt="2 dice"></p>
<h3>Example: Two dice are tossed.</h3>
<p> The Random Variable is <b>X</b> = "The sum of the
scores on the two dice".</p>
<p>Let's make a table of all possible values:</p>
<div style="margin-left:114pt;text-align:left"> </div>
<div class="beach">
<table style="border-collapse:collapse" align="center">
<tbody>
<tr valign="top">
<td colspan="2" rowspan="2"><br>
</td>
<th colspan="6" align="center">1st Die</th>
</tr>
<tr valign="top">
<th width="25" valign="top">1</th>
<th width="25" valign="top">2</th>
<th width="25" valign="top">3</th>
<th width="25" valign="top">4</th>
<th width="25" valign="top">5</th>
<th width="25" valign="top">6</th>
</tr>
<tr valign="top">
<th rowspan="6"><br><br><br>2nd<br>
Die</th>
<th>1</th>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">6</td>
<td align="center">7</td>
</tr>
<tr valign="top">
<th>2</th>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">6</td>
<td align="center">7</td>
<td align="center">8</td>
</tr>
<tr valign="top">
<th>3</th>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">6</td>
<td align="center">7</td>
<td align="center">8</td>
<td align="center">9</td>
</tr>
<tr valign="top">
<th>4</th>
<td align="center">5</td>
<td align="center">6</td>
<td align="center">7</td>
<td align="center">8</td>
<td align="center">9</td>
<td align="center">10</td>
</tr>
<tr valign="top">
<th>5</th>
<td align="center">6</td>
<td align="center">7</td>
<td align="center">8</td>
<td align="center">9</td>
<td align="center">10</td>
<td align="center">11</td>
</tr>
<tr valign="top">
<th>6</th>
<td align="center">7</td>
<td align="center">8</td>
<td align="center">9</td>
<td align="center">10</td>
<td align="center">11</td>
<td align="center">12</td>
</tr>
</tbody></table>
</div>
<p>There are <b>6 &times; 6 = 36</b> possible outcomes, and the Sample Space (which is the sum of the
scores on the two dice) is {2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12} </p>
<p>Let's count how often each value occurs, and work out the probabilities:</p>
<ul>
<li>2 occurs just once, so P(X = 2) = 1/36</li>
<li>3 occurs twice, so P(X = 3) = 2/36 = 1/18</li>
<li>4 occurs three times, so P(X = 4) = 3/36 = 1/12</li>
<li>5 occurs four times, so P(X = 5) = 4/36 = 1/9</li>
<li>6 occurs five times, so P(X = 6) = 5/36 </li>
<li>7 occurs six times, so P(X = 7) = 6/36 = 1/6</li>
<li>8 occurs five times, so P(X = 8) = 5/36</li>
<li>9 occurs four times, so P(X = 9) = 4/36 = 1/9</li>
<li>10 occurs three times, so P(X = 10) = 3/36 = 1/12</li>
<li>11 occurs twice, so P(X = 11) = 2/36 = 1/18</li>
<li>12 occurs just once, so P(X = 12) = 1/36</li>
</ul>
</div>
<h2>A Range of Values</h2>
<p>We could also calculate the probability that a Random
Variable takes on a range of values.</p>
<div class="example">
<h3>Example (continued) What is the probability that the sum of the scores
is 5, 6, 7 or 8?</h3>
<p>In other words: What is <b>P(5 &le; X &le; 8)</b>?</p>
<div class="tbl">
<div class="row"><span class="left">P(5 &le; X &le; 8) =</span><span class="right">P(X=5) + P(X=6) + P(X=7) + P(X=8) </span></div>
<div class="row"><span class="left">=</span><span class="right"> (4+5+6+5)/36 </span></div>
<div class="row"><span class="left">=</span><span class="right"> 20/36 </span></div>
<div class="row"><span class="left">=</span><span class="right"> 5/9</span></div>
</div>
</div>
<h2>Solving</h2>
<p>We can also solve a Random Variable equation.</p>
<div class="example">
<h3>Example (continued) If P(X=x) = 1/12, what is the value of x?</h3>
<p>Looking through the list above we find:</p>
<ul>
<li>P(X=4) = 1/12, and</li>
<li> P(X=10) = 1/12</li>
</ul>
<p>So there are two solutions: x = 4 or x = 10</p>
</div>
<p>Notice the different uses of <b>X</b> and <b>x</b>:</p>
<ul>
<li><b>X</b> is
the Random Variable "The sum of the scores on the two dice".</li>
<li><b>x</b> is a value that <b>X</b> can take.</li>
</ul>
<h2>Continuous </h2>
<p>Random Variables can be either <a href="data-discrete-continuous.html">Discrete
or Continuous</a>:</p>
<ul>
<li>Discrete Data can only take certain values (such as 1,2,3,4,5) </li>
<li>Continuous Data can take any value within a range (such as a person's height)</li>
</ul>
<p>All our examples have been Discrete.</p>
<p>Learn more at <a href="random-variables-continuous.html">Continuous Random Variables</a>.</p>
<h2><span style="text-align:center">Mean, Variance, Standard Deviation</span></h2>
<p>You can also learn how to find the <a href="random-variables-mean-variance.html">Mean, Variance and Standard Deviation of Random Variables</a>.</p>
<p>&nbsp;</p>
<h2>Summary</h2>
<ul class="larger">
<li>A Random Variable is a set of <b>possible values</b> from a random experiment.</li>
<li>The set of possible values is called the <b>Sample Space</b>.</li>
<li>A
Random Variable is given a capital letter, such as X or Z.</li>
<li>Random
Variables can be discrete or continuous.</li>
</ul>
<p>&nbsp;</p>
<div class="questions">
<script>getQ(8858, 8859, 8860, 8861, 8862, 8863, 8864, 8865, 8866, 8867);</script>&nbsp;
</div>
<div class="related">
<a href="random-variables-continuous.html">Continuous Random Variables</a>
<a href="index.html">Data Index</a>
</div>
<!-- #EndEditable -->
</div>
<div id="adend" class="centerfull noprint">
<script>document.write(getAdEnd());</script>
</div>
<div id="footer" class="centerfull noprint">
<script>document.write(getFooter());</script>
</div>
<div id="copyrt">
Copyright &copy; 2020 MathsIsFun.com
</div>
<script>document.write(getBodyEnd());</script>
</body>
<!-- Mirrored from www.mathsisfun.com/data/random-variables.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:42:21 GMT -->
</html>