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
387 lines
13 KiB
HTML
387 lines
13 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en"><!-- #BeginTemplate "/Templates/Main.dwt" --><!-- DW6 -->
|
||
|
||
<!-- Mirrored from www.mathsisfun.com/data/random-words.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:42:06 GMT -->
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
|
||
|
||
|
||
|
||
<!-- #BeginEditable "doctitle" -->
|
||
<title>Random Words</title>
|
||
<!-- #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="preload" href="../images/style/font-champ-bold.ttf" as="font" type="font/ttf" crossorigin="">
|
||
<link rel="preload" href="../style4.css" as="style">
|
||
<link rel="preload" href="../main4.js" as="script">
|
||
<link rel="stylesheet" href="../style4.css">
|
||
<script src="../main4.js" defer="defer"></script>
|
||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-29771508-1"></script>
|
||
<script>
|
||
window.dataLayer = window.dataLayer || [];
|
||
function gtag(){dataLayer.push(arguments);}
|
||
gtag('js', new Date());
|
||
gtag('config', 'UA-29771508-1');
|
||
</script>
|
||
</head>
|
||
|
||
<body id="bodybg">
|
||
|
||
<div id="stt"></div>
|
||
<div id="adTop"></div>
|
||
<header>
|
||
<div id="hdr"></div>
|
||
<div id="tran"></div>
|
||
<div id="adHide"></div>
|
||
<div id="cookOK"></div>
|
||
</header>
|
||
|
||
<div class="mid">
|
||
|
||
<nav>
|
||
<div id="menuWide" class="menu"></div>
|
||
<div id="logo"><a href="../index.html"><img src="../images/style/logo.svg" alt="Math is Fun"></a></div>
|
||
|
||
<div id="search" role="search"></div>
|
||
<div id="linkto"></div>
|
||
|
||
<div id="menuSlim" class="menu"></div>
|
||
<div id="menuTiny" class="menu"></div>
|
||
</nav>
|
||
|
||
<div id="extra"></div>
|
||
|
||
<article id="content" role="main">
|
||
|
||
<!-- #BeginEditable "Body" -->
|
||
|
||
<h1 class="center">Random Words</h1>
|
||
|
||
<div class="center"><i>Probability and English ... what a mix!</i>
|
||
</div>
|
||
<h2>Random Letters</h2>
|
||
<p>You would think it was easy to create random words ... just pick letters randomly and put them together, and voila! a random word.</p>
|
||
<p>Well, here are 20 words made that way:</p>
|
||
<table align="center" width="80%" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:center;"><font face="Courier New, Courier, mono"><b>tldkl oewkx dmwol vuptg hvwjk naqid avypr zwtip zgnzs bvdhd<br>
|
||
muyfd ighgd xhlng oyecn vjnsl ssjrx gxald tukxj rvfoq yxzxq</b></font></td>
|
||
</tr>
|
||
</tbody></table>
|
||
<p>It turns out that the words are not only nonsense, but quite hard to pronounce!</p>
|
||
<p>(Try saying "<font face="Courier New, Courier, mono"><b>tldkl</b></font>" or "<font face="Courier New, Courier, mono"><b>oewkx</b></font>")</p>
|
||
<p>You see, the <a href="../probability_line.html">probability</a> is <i><b>very unlikely</b></i> ... you would have to try lots of random combinations before getting lucky.</p>
|
||
<p>Why? Well, English has around 200,000 words <i>(228,000 in the Oxford English Dictionary including many words no longer used)</i> ... but how many different words can be made with just 5 letters?</p>
|
||
<p class="center larger">26 × 26 × 26 × 26 × 26 = <b>11,881,376</b> possible 5 letter words!</p>
|
||
<p>And that is just the 5 letter words ...</p>
|
||
<p>Let us guess that there are 40,000 words in English that have 5 letters. So the probability of making a real word just <b>randomly</b> would be:</p>
|
||
<p class="center">40,000 / <b>11,881,376</b> = 0.003, or about 0.3% chance</p>
|
||
<p>So <i><b>real words are rare</b></i>. And we can see that putting random letters together is very unlikely to produce a real word.</p>
|
||
<h2>Vowels</h2>
|
||
<p>We can improve our success by insisting that a word have at least one vowel, since nearly every word in English has one (except <i>fly</i>, <i>by</i> and a few others). Like this:</p>
|
||
<table align="center" width="80%" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:center;"><font face="Courier New, Courier, mono"><b>ectot gjaqv kuifg vzicu zspsu pdidb wqdis uerrs ucgej okimw<br>
|
||
fnevz ewxko ljgew aglgo jpfoq dcytu uwkcj dzioy wekdx xuybk</b></font></td>
|
||
</tr>
|
||
</tbody></table>
|
||
<p>This is a great improvement. More words can be pronounced.</p>
|
||
<p>But there are still lots of strange words like "<font face="Courier New, Courier, mono"><b>zspsu</b></font>" and "<font face="Courier New, Courier, mono"><b>xuybk</b></font>"</p>
|
||
<h2>Letter Frequency</h2>
|
||
<p>So, our next improvement is to use <i>less</i> of the letters like j, x, z and q and <i>more</i> of the letters like e, t and s.</p>
|
||
<p>In fact the <b>frequency of letters</b> in the English Language is well known. Here is how many times you would <i><b>expect</b></i> to see a letter in every 1,000 letters:</p>
|
||
<div class="full">
|
||
|
||
<table style="margin:auto;" border="1">
|
||
<tbody>
|
||
<tr style="text-align:center;">
|
||
<td>a </td>
|
||
<td>b </td>
|
||
<td>c </td>
|
||
<td>d </td>
|
||
<td>e </td>
|
||
<td>f </td>
|
||
<td>g </td>
|
||
<td>h </td>
|
||
<td>i </td>
|
||
<td>j </td>
|
||
<td>k </td>
|
||
<td>l </td>
|
||
<td>m </td>
|
||
<td>n </td>
|
||
<td>o </td>
|
||
<td>p </td>
|
||
<td>q </td>
|
||
<td>r </td>
|
||
<td>s </td>
|
||
<td>t </td>
|
||
<td>u </td>
|
||
<td>v </td>
|
||
<td>w </td>
|
||
<td>x </td>
|
||
<td>y </td>
|
||
<td>z </td>
|
||
</tr>
|
||
<tr style="text-align:center;">
|
||
<td>82</td>
|
||
<td>15</td>
|
||
<td>28</td>
|
||
<td>42</td>
|
||
<td>127</td>
|
||
<td>22</td>
|
||
<td>20</td>
|
||
<td>61</td>
|
||
<td>70</td>
|
||
<td>2</td>
|
||
<td>8</td>
|
||
<td>40</td>
|
||
<td>24</td>
|
||
<td>67</td>
|
||
<td>75</td>
|
||
<td>19</td>
|
||
<td>1</td>
|
||
<td>60</td>
|
||
<td>63</td>
|
||
<td>90</td>
|
||
<td>27</td>
|
||
<td>10</td>
|
||
<td>24</td>
|
||
<td>2</td>
|
||
<td>20</td>
|
||
<td>1</td>
|
||
</tr>
|
||
</tbody></table>
|
||
</div>
|
||
<p>Can you see that "e" is common, but "z" is rare?</p>
|
||
<ul>
|
||
<li>"e" is lkely to occur 127 times in every 1,000, or as a ratio 127/1000 = .127 (=12.7%)</li>
|
||
<li>"z" is lkely to occur only 1 time in every 1,000, or as a ratio 1/1000 = .001 (=0.1%)</li>
|
||
</ul>
|
||
<p>So, by selecting letters based on that frequency (a bit like rolling a 1,000 sided <a href="../geometry/fair-dice.html">die (dice)</a>, where each die has 82 <b>a</b>'s, 15 <b>b</b>'s ... and only one <b>z</b>), we can get output like this:</p>
|
||
<table align="center" width="80%" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:center;"><font face="Courier New, Courier, mono"><b>elnao etgov segty laast aessn siuon oenha eaoas ncoot ctwka<br>
|
||
dmswo dpuoh eewis ebdni laarm syucs idvos lhina igahh soyie</b></font></td>
|
||
</tr>
|
||
</tbody></table>
|
||
<p>Still no real words, but some are close. And most of them can be pronounced. (Great names if you are writing a science fiction novel!)</p>
|
||
<h2>Try For Yourself!</h2>
|
||
<p>You can try all three methods here ... see if you can get lucky and find a real word:</p>
|
||
|
||
|
||
<iframe src="irandwords.html" scrolling="no" style="width:452px; height:252px; overflow:hidden; margin:auto; display:block; border: none;"></iframe>
|
||
|
||
|
||
|
||
<p> </p>
|
||
<h3 align="center">but we can do better ...</h3>
|
||
<h2>2-Letter Frequencies</h2>
|
||
<p>We can take the idea of Letter Frequency one step further by asking</p>
|
||
<p class="center"><b>"what is the frequency of letters that <i>follow</i> another letter"</b></p>
|
||
<p>For example, if we already have a "t", the next letter is <b>very likely</b> to be an "h" (making "th").</p>
|
||
<p>To illustrate this, I built up a <a href="two-letter-frequencies.html">Table of Two-Letter Frequencies</a> (from <i>Alice's Adventures in Wonderland</i>). Here is the line for "t":</p>
|
||
<div class="full">
|
||
|
||
<table style="margin:auto;" border="1">
|
||
|
||
<tbody>
|
||
<tr>
|
||
|
||
<th>Freq</th>
|
||
<th>a</th>
|
||
<th>b</th>
|
||
<th>c</th>
|
||
<th>d</th>
|
||
<th>e</th>
|
||
<th>f</th>
|
||
<th>g</th>
|
||
<th>h</th>
|
||
<th>i</th>
|
||
<th>j</th>
|
||
<th>k</th>
|
||
<th>l</th>
|
||
<th>m</th>
|
||
<th>n</th>
|
||
<th>o</th>
|
||
<th>p</th>
|
||
<th>q</th>
|
||
<th>r</th>
|
||
<th>s</th>
|
||
<th>t</th>
|
||
<th>u</th>
|
||
<th>v</th>
|
||
<th>w</th>
|
||
<th>x</th>
|
||
<th>y</th>
|
||
<th>z</th>
|
||
</tr>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<tr>
|
||
|
||
<th>t</th>
|
||
<td>238</td>
|
||
<td><br></td>
|
||
<td>41</td>
|
||
<td><br></td>
|
||
<td>727</td>
|
||
<td>11</td>
|
||
<td><br></td>
|
||
<td>3197</td>
|
||
<td>459</td>
|
||
<td><br></td>
|
||
<td><br></td>
|
||
<td>275</td>
|
||
<td>18</td>
|
||
<td>12</td>
|
||
<td>990</td>
|
||
<td><br></td>
|
||
<td><br></td>
|
||
<td>149</td>
|
||
<td>153</td>
|
||
<td>333</td>
|
||
<td>125</td>
|
||
<td><br></td>
|
||
<td>65</td>
|
||
<td><br></td>
|
||
<td>54</td>
|
||
<td><br></td>
|
||
</tr>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</tbody></table>
|
||
</div>
|
||
<p>So, "h" occured 3197 times after a "t" ("th") ... but "b" <b>never</b> followed a "t"</p>
|
||
<p>OK, let us start with a "t", and let us say we choose an "h" to make "th", then next we would use the "h"-row to choose another letter (maybe an "e" to make "the"), and so on ... well, here is a sample:</p>
|
||
<table align="center" width="80%" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:center;"><b><font face="Courier New, Courier, mono">the cur the bund hof arytowno d sheromasees asemedosouro f<br>
|
||
soacthake d imon binofowat oaten d heng wa </font></b></td>
|
||
</tr>
|
||
</tbody></table>
|
||
<p>The results are remarkable ... nonsense, but almost like some strange language.</p>
|
||
<p>In fact we are not just making random words now, we are making random <b>sentences</b>!</p>
|
||
<h2>Higher Letter Frequencies</h2>
|
||
<p>Why stop there? We can make tables of three letter frequencies or more ...</p>
|
||
<h3>3 Letter Frequencies</h3>
|
||
<p>How do 3 Letter Frequencies work?</p>
|
||
<p>Well, say I already have two letters (like "ei") ... we then:</p>
|
||
<ul>
|
||
<li>look through the sample text for every time "ei" appears,</li>
|
||
<li>randomly choose one of those</li>
|
||
<li>look for the letter following "ei" (possibly "t").</li>
|
||
<li>then add the "t" to make "eit"</li>
|
||
<li>and start again using "it" (... always the last two letters)</li>
|
||
</ul>
|
||
<p>Here is a sample:</p>
|
||
<table align="center" width="80%" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:center;"><font face="Courier New, Courier, mono"><b>Either great into get very deep welled of it it, and<br>
|
||
to wondere started into the book about hear!</b></font></td>
|
||
</tr>
|
||
</tbody></table>
|
||
<p>Now, <b>that</b> looks good! By sampling from a real source we can get good results.</p>
|
||
<h3>4 Letter Frequencies</h3>
|
||
<p>Using the same method I used groups of 3 Letters to decide on the 4th letter and got:</p>
|
||
<table align="center" width="80%" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
<p><font face="Courier New, Courier, mono"><b>Either the sides or conversations in time to<br>
|
||
</b></font><b><font face="Courier New, Courier, mono"> happen next. First, she look down mind</font></b></p>
|
||
</td>
|
||
</tr>
|
||
</tbody></table>
|
||
<h3>5 Letter Frequencies</h3>
|
||
<p>And with 5 Letter frequencies:</p>
|
||
<table align="center" width="80%" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:center;"><font face="Courier New, Courier, mono"><b>There was just in time it all seemed quite natural);<br>
|
||
but to take out of time as she had not like to do</b></font></td>
|
||
</tr>
|
||
</tbody></table>
|
||
<h2>Try For Yourself!</h2>
|
||
<p>Yes, I wrote something for you to play with. It has the first 6 paragraphs from <i>Alice's Adventures in Wonderland</i>), but <b>you can put you own source text in there</b>.</p>
|
||
<p>Find something from Shakespeare, or a political speech and see what it comes up with ... you could even combine quotes from different authors to see what their children might write.</p>
|
||
|
||
|
||
<iframe src="irandtext.html" scrolling="no" style="width:100%; height:400px; overflow:hidden; margin:auto; display:block; border: none;"></iframe>
|
||
|
||
|
||
<p> </p>
|
||
|
||
<div class="related">
|
||
<a href="../activity/random-add-multiply.html">Random, or Not?</a>
|
||
<a href="index.html">Probability and Statistics Index</a>
|
||
</div>
|
||
<!-- #EndEditable -->
|
||
|
||
</article>
|
||
|
||
<div id="adend" class="centerfull noprint"></div>
|
||
<footer id="footer" class="centerfull noprint"></footer>
|
||
<div id="copyrt">Copyright © 2021 MathsIsFun.com</div>
|
||
|
||
</div>
|
||
</body><!-- #EndTemplate -->
|
||
<!-- Mirrored from www.mathsisfun.com/data/random-words.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:42:07 GMT -->
|
||
</html> |