<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>oscarbonilla.com</title>
	<atom:link href="http://oscarbonilla.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://oscarbonilla.com</link>
	<description></description>
	<lastBuildDate>Thu, 15 Dec 2011 18:43:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mersenne Primes</title>
		<link>http://oscarbonilla.com/2011/06/mersenne-primes/</link>
		<comments>http://oscarbonilla.com/2011/06/mersenne-primes/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 01:18:23 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=888</guid>
		<description><![CDATA[In 1653, Marin Mersenne, of Mersenne Primes fame, made the bold claim that was a prime number. That claim remained unchallenged for 250 years – no computers back then – until... ...in 1903, Frank Nelson Cole of Columbia University delivered a talk with the unassuming title "On the Factorization of Large Numbers" at a meeting of [...]]]></description>
			<content:encoded><![CDATA[<p>In 1653, <a title="Marin Mersenne" href="http://en.wikipedia.org/wiki/Marin_Mersenne">Marin Mersenne</a>, of <a title="Mersenne Primes" href="http://en.wikipedia.org/wiki/Mersenne_prime">Mersenne Primes</a> fame, made the bold claim that <img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_991875fe3cd0414ee4e0112c974c26e6.png" title="2^{67}-1" style="vertical-align:-20%;" class="tex" alt="2^{67}-1" /> was a prime number. That claim remained unchallenged for 250 years – no computers back then – until...</p>
<blockquote><p>...in 1903, Frank Nelson Cole of Columbia University delivered a talk with the unassuming title "On the Factorization of Large Numbers" at a meeting of the American Mathematical Society.  "Cole – who was always a man of very few words – walked to the board and, saying nothing, proceeded to chalk up the arithmetic for raising 2 to the sixty-seventh power," recalled Eric Temple Bell, who was in the audience. "Then he carefully sustracted 1 [getting the 21-digit monstrosity 147,573,952,589,676,412,927]. Without a word he moved over to a clear space on the board and multiplied out, by longhand,</p>
<p style="text-align: center;"><img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_c334febd8951685d7d4a6f67a8280ef5.png" title="193,707,721 \times 761,838,257,287" style="vertical-align:-20%;" class="tex" alt="193,707,721 \times 761,838,257,287" /></p>
<p style="text-align: left;">"The two calculations agreed. Mersenne's conjecture – if such it was – vanished into the limbo of mathematical mythology. For the first...time on record, an audience of the American Mathematical Society vigorously applauded the author of a paper delivered before it. Cole took his seat without having uttered a word. Nobody asked him a question."[<a href="http://oscarbonilla.com/2011/06/mersenne-primes/#footnote_0_888" id="identifier_0_888" class="footnote-link footnote-identifier-link" title="The Man Who Loved Only Numbers by Paul Hoffman">1</a>]</p>
</blockquote>
<p>Now I know where Professor Felton found his inspiration.</p>
<blockquote><p>You've probably heard of Felton (National Academy of Science, IEEE Past President, NRA sustaining member).  My advisor told me later that Felton's academic peak had come at that now-infamous 1982 Symposium on Data Encryption, when he presented the plaintext of the encrypted challenge message that Rob Merkin had published earlier that year using his "phonebooth packing" trap-door algorithm.  According to my advisor, Felton wordlessly walked up to the chalkboard, wrote down the plaintext, cranked out the multiplies and modulus operations by hand, and wrote down the result, which was obviously identical to the encrypted text Merkin had published in CACM.  Then, still without saying a word, he tossed the chalk over his shoulder, spun around, drew and put a 158grain semi-wadcutter right between Merkin's eyes.  As the echoes from the shot reverberated through the room, he stood there, smoke drifting from the muzzle of his .357 Magnum, and uttered the first words of the entire presentation: "Any questions?" There was a moment of stunned silence, then the entire conference hall erupted in wild applause.  God, I wish I'd been there.[<a href="http://oscarbonilla.com/2011/06/mersenne-primes/#footnote_1_888" id="identifier_1_888" class="footnote-link footnote-identifier-link" title="Auto-weapons by Olin Shivers.">2</a>]</p></blockquote>
<p>&nbsp;</p>
<ol class="footnotes"><li id="footnote_0_888" class="footnote"><a href="http://www.amazon.com/gp/product/0786863625/ref=as_li_ss_tl?ie=UTF8&amp;tag=obonilswebsit-20&amp;linkCode=as2&amp;camp=217153&amp;creative=399349&amp;creativeASIN=0786863625">The Man Who Loved Only Numbers</a> by Paul Hoffman</li><li id="footnote_1_888" class="footnote"><a href="http://www.ccs.neu.edu/home/shivers/autoweapons.html">Auto-weapon</a>s by Olin Shivers.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2011/06/mersenne-primes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Radiation</title>
		<link>http://oscarbonilla.com/2011/04/radiation/</link>
		<comments>http://oscarbonilla.com/2011/04/radiation/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 00:11:58 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Physics]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=854</guid>
		<description><![CDATA[In light of the events at the Fukushima-daishi nuclear plant I had to go revisit my notes on nuclear physics to make sense of the news. I thought I'd share my notes here in case they prove useful to somebody else. Dear physicist friends, please critique away. Just what exactly is radiation? Let's start with [...]]]></description>
			<content:encoded><![CDATA[<p>In light of the events at the Fukushima-daishi nuclear plant I had to go revisit my notes on nuclear physics to make sense of the news. I thought I'd share my notes here in case they prove useful to somebody else. Dear physicist friends, please critique away.</p>
<h2>Just what exactly is radiation?</h2>
<p>Let's start with the classic model of the atom: we have a nucleus composed of protons and neutrons and a cloud of electrons surrounding the nucleus. The charge of the atom is balanced because the number of protons is the same as the number of electrons. How many protons the nucleus has determines the kind of element you have.</p>
<p>&nbsp;</p>
<p><a href="http://oscarbonilla.com/wp-content/uploads/2011/04/periodictable.gif" class="lightview" data-lightview-group="group-854" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="Periodic Table"><img class="aligncenter size-large wp-image-860" title="Periodic Table" src="http://oscarbonilla.com/wp-content/uploads/2011/04/periodictable-1024x677.gif" alt="Periodic Table of Elements" width="550" height="363" /></a></p>
<p>See those numbers at the top of each box? That's the number of protons in the nucleus. Note however that since neutrons have no charge, their number can vary and the atom's electric charge will still be balanced. Chemically, it will behave the same. But atomically it is different. These atoms that have a different number of neutrons in the nucleus are called isotopes.</p>
<p>You might recall that electrically, like charges repel and different charges attract. Since all protons are positively charged, why doesn't the nucleus disintegrate? The answer has to do with a force much more powerful than the electromagnetic force that makes protons repel each other, but that acts only over very short distances, the strong-nuclear force.</p>
<p>All those neutrons inside the nucleus act like a kind of cement, binding the protons together. Also the protons both attract each other (strong nuclear force) and repel each other (electromagnetic force) and both forces diminish rapidly the farther apart the protons are. However, the strong nuclear force diminishes much, much faster than the electromagnetic force. Move the protons too far apart and the strong nuclear force starts losing out to the electromagnetic force. That is exactly what happens when you have too many neutrons in the nucleus. They push the protons farther apart, to the point that the strong nuclear is not enough to keep the nucleus together since the electromagnetic force is pushing the protons apart. This is along way of saying that most nuclei with too many neutrons turn out to not be very stable.</p>
<p>So what happens with an unstable isotope? It emits particles from the nucleus to stabilize itself. These particles can be one of two kinds:</p>
<ol>
<li>Two protons and two neutrons (a Helium nucleus) shoot out from the nucleus of the isotope. This is called an Alpha particle, and it has a positive charge (two protons and no electrons).</li>
<li>A neutron emits an electron (the neutron turns into a proton) or a proton emits an anti-electron (positron) and turns into a neutron. These electrons or positrons emitted from the nucleus are what are called beta particles.</li>
</ol>
<p>Once an unstable nucleus has emitted alpha or beta particles, it remains in an excited state (at a higher than normal energy level), but this doesn't last very long. What happens is that this extra energy is released in the form of gamma rays, which are very high energy photons.</p>
<p>And what happens to the nucleus? Well, since each alpha particle emitted makes it lose two protons, it drops by two squares in the periodic table. Uranium-238 becomes Thorium-234 by emitting an alpha particle and some gamma rays. And since each beta emission either turns a neutron into a proton or viceversa, the element can "decay up" to the next element inthe periodic table or "decay down" to the previous element. Thorium-234 becomes Protactinium-234 by the emission of a negatively charged beta particle. Here is the full decay chart of Uranium-238.</p>
<p><a href="http://oscarbonilla.com/wp-content/uploads/2011/04/trans90.jpg" class="lightview" data-lightview-group="group-854" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="U-238 Decay Chart"><img class="aligncenter size-full wp-image-858" title="U-238 Decay Chart" src="http://oscarbonilla.com/wp-content/uploads/2011/04/trans90.jpg" alt="Decay Chart for Uranium 238" width="622" height="491" /></a></p>
<p>So what is radioactivity? It is the emission of alpha and beta particles plus some gamma rays from unstable isotopes that are decaying into more stable isotopes.</p>
<p>Now, we don't know exactly <em>when</em> a particular nucleus will decay, it has about equal probability of decaying or not decaying at any particular time (Hi Schrödinger!), but we do know that if we have a certain amount of material, eventually enough of the nuclei will decay that we are going to be left with about half of the original material and half of whatever it decays to. How long will this process take? It depends on the specific isotope, but this is what is called the half-life or the isotope.</p>
<div id='stb-box-4459' class='stb-custom_box' >Elements have 'isotopes', which are atoms with the same number of protons in the nucleus but with a different number of neutrons. These isotopes are often unstable, decaying into other more stable isotopes by emmitting alpha particles, beta particles, and gamma rays. For any given amount of material, how long it takes for half of the nuclei to decay is called the half-life of the isotope.</div>
<h2>Why is Radiation Dangerous?</h2>
<p>You might have heard the term 'ionizing radiation'. What is ionizing radiation? Well, remember those alpha particles, beta particles, and gamma rays? They have a lot of energy. In fact, they have so much energy that if they collide with another atom, they can easily knock out an electron from it. This leaves the atom positively charged or 'ionized'. The problem with ionized atoms is that since they are no longer electrically neutral, they tend to combine with other atoms forming ionic bonds.</p>
<p>So what does ionizing radiation do to the body? Well, DNA's amino acids are mostly composed of Hydrogen, Oxygen, Nitrogen, Carbon, and Phosphorous. If one of these lose particles goes knocking off electrons from atoms,  the electrical properties of said atoms change, altering the chemical properties of the molecules they belong to, which can damage the DNA.</p>
<p><a href="http://oscarbonilla.com/wp-content/uploads/2011/04/DNA_Structure+Key+Labelled.png"><img class="aligncenter size-large wp-image-871" title="DNA Structure" src="http://oscarbonilla.com/wp-content/uploads/2011/04/DNA_Structure+Key+Labelled-1024x999.png" alt="DNA Structure" width="550" height="536" /></a></p>
<p>Damaged DNA can result on one of three outcomes:</p>
<ol>
<li>The injured cell can repair itself, resulting in no residual  damage.</li>
<li>The injured cell dies. Not much different than millions of cells  that die and get replenished every day.</li>
<li>The injured cell incorrectly repairs itself, resulting in a  mutation.</li>
</ol>
<p>It's this third case that we are generally worried about.</p>
<p>Now, remember that in order to damage the cell, a given particle needs to actually hit it. Let's take a look at the particles and have some idea of their energy levels.</p>
<h3>Alpha particles</h3>
<p>Remember that these are Helium nucleus, so two protons and two neutrons. What this means is that they are big (compared to beta particles which are electrons and gamma rays which are photons). The energy an alpha particle carries depends on the kind of isotope that emitted it. The heavier elements emit higher energy alpha particles. In general they have between 3 and 7 MeV (Mega-electron-volts). Even though this is a lot of energy for a single particle, they are also pretty massive (a proton has roughly 2,000 times the mass of an electron) so they don't go that fast. They are also positively charged, which means they get deflected by magnetic fields.</p>
<p>Because of all these reasons, alpha particles are not particularly dangerous unless you ingest the isotope producing them. If you just happen to be around them, they won't even penetrate your skin, and they can be blocked using a sheet of paper (so much for an alpha-particle death ray).</p>
<p>However, if you <em>do</em> ingest them, they are pretty nasty as alpha radiation is one of the most destructive forms of ionizing radiation. The damage it can cause is calculated to be between 10 to 1000 greater than beta or gamma radiation. One example of this is polonium-210, which is typically found in cigarettes. You smoke it, it generates alpha radiation inside your lungs, you get cancer. That's how they whacked Alexander Litvinenko, they poisoned him with Polonium-210.</p>
<h3>Beta Particles</h3>
<p>Beta particles are much less massive than alpha particles, so they are about 100 times more penetrating. Beta radiation can be blocked using a piece of aluminum (get out the tinfoil hats!). They are typically used in medicine precisely because they penetrate the human body so well. For instance, PET scans use a radioactive tracer isotope as a source of positrons. So yeah, you get irradiated with them for medical reasons.</p>
<h3>Gamma Rays</h3>
<p>Gamma rays are a bit nastier than both alpha and beta particles because they are electrically neutral, they are much more penetrating (what <em>stops</em> a particle other than colliding is the electromagnetic fields). They tend to cause more cell damage when they have about the same energy as an alpha particle (between 3 and 5 MeV).</p>
<h2>Measuring Radiation</h2>
<p>So how do we measure radiation? This is where the story gets complicated. Radiation is measured using a mishmash of different units, depending on what exactly you are measuring.</p>
<p>At the most basic level, you measure <strong><em>radioactivity</em></strong>. Namely the amountof ionizing radiation released by a material. This measure doesn'tmake a distinction between alpha or beta particles or gamma rays. It just measures how many nuclei are decaying per unit of time (usually seconds). The old unit of measurement was the Curie (Ci) and the new one is the Becquerel (Bq). One Curie is equal to 37 billion (3.7 x10^10) disintegrations per second. One Becquerel is one disintegration per second. It follows that one Curie is equal to 37 billion Becquerels.</p>
<p>The other measurement is <strong><em>exposure</em></strong>: the amount of radiation traveling through the air. The units of exposure are the Roentgen (R) and Coulomb/Kilogram (C/kg). One Roentgen is the amount of radiation necessary to produce a charge of 0.000258 C/kg under standard conditions.</p>
<p>The<strong> <em>absorbed dose</em></strong> is the amount of radiation absorbed by an object. I.e. the amount of energy deposited in the object through which the radiation passed. The units are radiation absorbed dose (rad) and gray (Gy). An absorbed dose of 1 rad means that 1 gram ofmaterial absorbed 100 ergs of energy. One gray is equivalent to 100 rad.</p>
<p>Finally, the <strong><em>effective dose</em></strong> combines the absorbed dose and the medical effects of abosorbing that type of radiation. This is because living cells respond different to alpha particles than to beta particles or gamma radiation. Alpha particles tend to be more damaging than beta particles or gamma rays. The units for the effective does are the Roentgen equivalent man (rem) and the Sievert. The rem is just the  roentgen adjusted by the amount of damage the specific type of radiation does the to body. For instance, the weighting factor for beta particles and gamma rays is one. For alpha particles it is 20. The Sievert is equivalent to 100 rem.</p>
<p>For healt and risk purposes, the only measure we care about is the Sievert (or rem). Getting sprayed with alpha particles is much more damaging than getting sprayed with beta particles (in fact, 20 times  more damaging).</p>
<p>On average we receive a dosis of 0.62 rem (6.2 mSv) every year. About half of it comes from natural background radiation, and the other half from man-made sources (X-Rays for instance).</p>
<p>Randall Munroe has helpfully created <a href="http://xkcd.com/radiation/">a chart</a> of typical amounts of the effective dose of radiation measured in Sieverts. I suggest you take a look.</p>
<div id='stb-box-3372' class='stb-custom_box' >Don't pay attention to Becquerels, rems or any other unit. Sieverts is what you care about. Look at Randall Munroe's chart to get a sense about how much is too much.</div>
<h2>Radioactive Fallout</h2>
<p>Inside a nuclear reactor, there are all sorts of isotopes being created and decaying. The ones you will mostly read about are Iodine-131, Caesium-137, and Strontium-90.</p>
<h3>Iodine-131</h3>
<p>This isotope has been on the news as of lately. Its half-life is just about 8 days, and it typically decays by emitting beta particles and gamma rays. It tends to enter the food chain and if you eat it it accumulates in the thyroid gland. That's why they give you iodine tablets for radiation sickness, not because it does anything to stop the radiation, but because it saturates your body with non-radiactive iodine so your thyroid gland doesn't accumulate the radioactive one.</p>
<h3>Caesium-137</h3>
<p>Caesium-137 has a half-life of about 30 years, so it is more problematic than Iodine-131 which decays rapidly. However, once it has enter the human body, it gets uniformly distributed and has a biological half-life of about 70 days. Like Iodine-131 it decays by emitting beta and gamma radiation.</p>
<h3>Strontium-90</h3>
<p>Strontium-90 has a half-life of about 28 years and it is normally referred to as a "bone seeker". This is because it is biochemically similar to calcium, so after entering the organism, about 30% of it gets accumulated in the bones and bone marrow. The rest gets excreted.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2011/04/radiation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Distrust</title>
		<link>http://oscarbonilla.com/2011/03/distrust/</link>
		<comments>http://oscarbonilla.com/2011/03/distrust/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 17:54:55 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=851</guid>
		<description><![CDATA[In light of recent news: The hacker, whose March 15 attack was traced to an IP address in Iran, compromised a partner account at the respected certificate authority Comodo Group, which he used to request eight SSL certificates for six domains: mail.google.com, www.google.com, login.yahoo.com, login.skype.com, addons.mozilla.org and login.live.com. The certificates would have allowed the attacker [...]]]></description>
			<content:encoded><![CDATA[<p>In light of <a href="http://www.wired.com/threatlevel/2011/03/comodo-compromise/">recent news</a>:</p>
<blockquote><p>The hacker, whose March 15 attack was traced to an IP address in Iran, compromised a partner account at the respected certificate authority Comodo Group, which he used to request eight SSL certificates for six domains: mail.google.com, www.google.com, login.yahoo.com, login.skype.com, addons.mozilla.org and login.live.com.</p>
<p>The certificates would have allowed the attacker to craft fake pages that would have been accepted by browsers as the legitimate websites. The certificates would have been most useful as part of an attack that redirected traffic intended for Skype, Google and Yahoo to a machine under the attacker's control. Such an attack can range from small-scale Wi-Fi spoofing at a coffee shop all the way to <a href="http://www.wired.com/threatlevel/2008/08/revealed-the-in/" target="_blank">global hijacking of internet routes</a>.</p>
<p>At a minimum, the attacker would then be able to steal login credentials from anyone who entered a username and password into the fake page, or perform a "man in the middle" attack to eavesdrop on the user's session.</p></blockquote>
<p>And because it is not the first time COMODO has screwed up, I've decided to turn off their root certificate from my browser (Safari). Here's how you do that.</p>
<ol>
<li>Open Keychain Preferences (in /Applications/Utilities).</li>
<li>Click on "System Roots" on the left pane.</li>
<li>Seach for "COMODO".</li>
<li>Rigth-click on the certificat and select "Get Info".</li>
<li>Select "Never Trust".</li>
</ol>
<p style="text-align: center;"><a href="http://oscarbonilla.com/wp-content/uploads/2011/03/Screen-shot-2011-03-31-at-10.48.05-AM.png" class="lightview" data-lightview-group="group-851" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="Screen shot 2011-03-31 at 10.48.05 AM"><img class="alignnone size-medium wp-image-852" title="Screen shot 2011-03-31 at 10.48.05 AM" src="http://oscarbonilla.com/wp-content/uploads/2011/03/Screen-shot-2011-03-31-at-10.48.05-AM-300x259.png" alt="" width="300" height="259" /></a></p>
<p>I've just done this so we'll see if it has any effect on my general surfing experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2011/03/distrust/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Harry Potter and the Methods of Rationality</title>
		<link>http://oscarbonilla.com/2010/12/harry-potter-and-the-methods-of-rationality/</link>
		<comments>http://oscarbonilla.com/2010/12/harry-potter-and-the-methods-of-rationality/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 08:42:08 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=802</guid>
		<description><![CDATA[Have you ever wondered whether some books would be better if the author had rewritten them after they were done? I have wondered that about the Harry Potter books. I read the original Harry Potter books back when they came out, and even though I found them quite entertaining, they have many flaws. They got progressively [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wondered whether some books would be better if the author had rewritten them after they were done? I have wondered that about the Harry Potter books.</p>
<p>I read the original Harry Potter books back when they came out, and even though I found them quite entertaining, they have <a href="http://www.reddit.com/r/AskReddit/comments/cpqsd/have_you_ever_had_a_book_change_your_life/c0ubm48">many flaws</a>. They got progressively worse as their universe became more complicated and they tried to have a deeper story. But it definitely shows in the books that J.K. Rowling did not have a "grand plan" and was basically just making stuff up as she went. In the words of <a href="http://www.reddit.com/user/nexes300">nexes300</a>:</p>
<blockquote><p>Rowling showed absolutely no planning of the universe past the third book and added things as she liked. Also, Hogwarts is a failure of a school, and Harry and his friends are terrible magic users.</p></blockquote>
<p>I also disliked the unidimensional characters. In Harry Potter's universe you are either good or evil, there are no in betweens. Still, the books are entertaining.</p>
<p>Last weekend I had a cold, and I serendipitously got a tip from <a href="http://the-brown-dragon.com/harrypotter.htm">the brown dragon</a> about a new fan fiction Harry Potter book.</p>
<blockquote><p>...if you are the type of person who read <a href="http://en.wikipedia.org/wiki/Harry_Potter">Harry Potter</a> and thought:</p>
<ul>
<li>Set up experiments to test magic</li>
<li>Witches turn into <em>CATS</em>? ...<em>But_..._but_..._but</em>... What about <em>conservation of mass</em>?</li>
<li>Gringots deals in gold? There are arbitrage opportunities between muggles and the wizarding world!</li>
<li>I have a Time turner? I can try to prove that P == NP</li>
</ul>
</blockquote>
<p>And when I saw who <a href="http://yudkowsky.net/">the author</a>[<a href="http://oscarbonilla.com/2010/12/harry-potter-and-the-methods-of-rationality/#footnote_0_802" id="identifier_0_802" class="footnote-link footnote-identifier-link" title="Yeah,&nbsp;that Yudkowsky,&nbsp;&nbsp;perhaps you remember him from&nbsp;here.">1</a>] was, I had to read it.</p>
<p><a href="http://www.fanfiction.net/s/5782108/1/Harry_Potter_and_the_Methods_of_Rationality">Harry Potter and the Methods of Rationality</a> is the best Harry Potter book that I've read. If you enjoyed the original series and you like science I cannot recommend it enough[<a href="http://oscarbonilla.com/2010/12/harry-potter-and-the-methods-of-rationality/#footnote_1_802" id="identifier_1_802" class="footnote-link footnote-identifier-link" title="With just one caveat, the work isn&#039;t finished. Don&#039;t expect the story to end.">2</a>] .</p>
<ol class="footnotes"><li id="footnote_0_802" class="footnote">Yeah, <a href="http://yudkowsky.net/rational/bayes"><em>that</em> </a>Yudkowsky,  perhaps you remember him from <a href="http://oscarbonilla.com/2009/05/visualizing-bayes-theorem/">here</a>.</li><li id="footnote_1_802" class="footnote">With just one caveat, the work isn't finished. Don't expect the story to end.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/12/harry-potter-and-the-methods-of-rationality/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Doing it wrong</title>
		<link>http://oscarbonilla.com/2010/09/doing-it-wrong/</link>
		<comments>http://oscarbonilla.com/2010/09/doing-it-wrong/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 17:14:50 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=786</guid>
		<description><![CDATA[Couldn't resist posting this one from xkcd:]]></description>
			<content:encoded><![CDATA[<p>Couldn't resist posting this one from <a href="http://xkcd.com">xkcd</a>:</p>
<p><a href="http://xkcd.com/795/"><img class="alignnone" title="'Dude, wait -- I'm not American! So my risk is basically zero!'" src="http://imgs.xkcd.com/comics/conditional_risk.png" alt="'Dude, wait -- I'm not American! So my risk is basically zero!'" width="543" height="460" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/09/doing-it-wrong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A neat trick for emailing web pages</title>
		<link>http://oscarbonilla.com/2010/07/a-neat-trick-for-emailing-web-pages/</link>
		<comments>http://oscarbonilla.com/2010/07/a-neat-trick-for-emailing-web-pages/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 21:25:06 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=771</guid>
		<description><![CDATA[I tend to email interesting articles to my wife, who normally does all her reading on her iPhone. I've found that if I send her a link, she will rarely click on it to read it, but if I email her the actual text of the article, she will read it. Since I do most [...]]]></description>
			<content:encoded><![CDATA[<p>I tend to email interesting articles to my wife, who normally does all her reading on her iPhone. I've found that if I send her a link, she will rarely click on it to read it, but if I email her the actual text of the article, she will read it. Since I do most of my browsing in Safari, I use the handy ⌘I shortcut ("File | Mail Contents of This Page" on the menu).</p>
<p>This is how it works. Say I'm reading this cool explanation of Bayes Theorem:</p>
<p><a href="http://oscarbonilla.com/wp-content/uploads/2010/07/Screen-shot-2010-07-26-at-2.17.17-PM.png" class="lightview" data-lightview-group="group-771" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="safari-bayes"><img class="alignnone size-medium wp-image-772" title="safari-bayes" src="http://oscarbonilla.com/wp-content/uploads/2010/07/Screen-shot-2010-07-26-at-2.17.17-PM-283x300.png" alt="" width="283" height="300" /></a></p>
<p>I hit ⌘I, and this is what I get:</p>
<p><a href="http://oscarbonilla.com/wp-content/uploads/2010/07/Screen-shot-2010-07-26-at-2.17.37-PM.png" class="lightview" data-lightview-group="group-771" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="Mail-bayes"><img class="alignnone size-medium wp-image-773" title="Mail-bayes" src="http://oscarbonilla.com/wp-content/uploads/2010/07/Screen-shot-2010-07-26-at-2.17.37-PM-250x300.png" alt="" width="250" height="300" /></a></p>
<p>I just discover that if you are in Safari Reader mode (⇧⌘R) when you are reading the page:</p>
<p><a href="http://oscarbonilla.com/wp-content/uploads/2010/07/Screen-shot-2010-07-26-at-2.17.49-PM.png" class="lightview" data-lightview-group="group-771" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="safari-reader"><img class="alignnone size-medium wp-image-774" title="safari-reader" src="http://oscarbonilla.com/wp-content/uploads/2010/07/Screen-shot-2010-07-26-at-2.17.49-PM-300x291.png" alt="" width="300" height="291" /></a></p>
<p>and hit ⌘I without leaving Reader mode, this is what you get:</p>
<p><a href="http://oscarbonilla.com/wp-content/uploads/2010/07/Screen-shot-2010-07-26-at-2.18.05-PM1.png" class="lightview" data-lightview-group="group-771" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="Mail-reader"><img class="alignnone size-medium wp-image-776" title="Mail-reader" src="http://oscarbonilla.com/wp-content/uploads/2010/07/Screen-shot-2010-07-26-at-2.18.05-PM1-250x300.png" alt="" width="250" height="300" /></a></p>
<p>Ah, much better. Thank you Apple.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/07/a-neat-trick-for-emailing-web-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Think, don&#8217;t Blink!</title>
		<link>http://oscarbonilla.com/2010/06/think-dont-blink/</link>
		<comments>http://oscarbonilla.com/2010/06/think-dont-blink/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 16:45:45 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=760</guid>
		<description><![CDATA[I'm a big fan of Malcolm Gladwell, but I classify his books more as fiction than science. My problem with Gladwell as a science writer is that he always seems to be very selective on the research he presents to his readers. Thus he presents half the issue and makes it up to be "proven" [...]]]></description>
			<content:encoded><![CDATA[<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/2pK0BQ9CUHk'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/2pK0BQ9CUHk' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span></p>
<p>I'm a big fan of <a href="http://en.wikipedia.org/wiki/Malcolm_Gladwell">Malcolm Gladwell</a>, but I classify his books more as fiction than science. My problem with Gladwell as a science writer is that he always seems to be very selective on the research he presents to his readers. Thus he presents half the issue and makes it up to be "proven" by science. I've meant to write some thoughts on <a href="http://www.amazon.com/Blink-Power-Thinking-Without/dp/0316172324">Blink!</a>, which I read a while ago, but never finished writing them. Now Daniel J. Simons and Christopher F. Chabris have beaten me to it with "<a href="http://chronicle.com/article/The-Trouble-With-Intuition/65674/">The Trouble With Intuition</a>"[<a href="http://oscarbonilla.com/2010/06/think-dont-blink/#footnote_0_760" id="identifier_0_760" class="footnote-link footnote-identifier-link" title="Which proves once again my maxim that if you wait long enough to do something, either somebody else does it or it becomes irrelevant.">1</a>]. Here are some good parts:</p>
<blockquote><p>The most troublesome aspect of intuition may be the misleading role it plays in how we perceive patterns and identify causal relationships. When two events occur in close temporal proximity, and the first one plausibly could have caused the second one, we tend to infer that this is what must have happened.</p></blockquote>
<p>I have found that even after constantly repeating "correlation does not imply causation", I still botch it all the time unless I'm actively reminding myself to NOT jump to conclusions before analyzing. The sweet temptation to go with intuition is just too, uh, sweet... and... tempting? Hmm.. okay, let's move along.</p>
<blockquote><p>Take the case of the perceived link between childhood vaccinations and autism. Nowadays children receive several vaccines before age 2, and autism is often diagnosed in 2- and 3-year-olds. When a child is diagnosed with autism, parents naturally and understandably seek possible causes. Vaccination involves the introduction of unusual foreign substances (dead viruses, attenuated live viruses, and preservative chemicals) into the body, so it's easy to imagine that those things could profoundly affect a child's behavior. But more than a dozen large-scale epidemiological studies, involving hundreds of thousands of subjects, have shown that children who were vaccinated are no more likely to be diagnosed with autism than are children who were not vaccinated. In other words, there is no association between vaccination and autism. And in the absence of an association, there cannot be a causal link.</p></blockquote>
<p>I've always been baffled at that "vaccination causes autism" debate. In the scientific community there seems to be no debate. And even if "correlation does not imply causation", correlation is a necessary condition for causation. And later on, we find this gem:</p>
<blockquote><p>In a way, intuition and statistics are like oil and water: They can easily coexist in our minds without ever interacting.</p></blockquote>
<p>This is a fantastic analogy, and I have many times been seduced by intuition only to find myself on wild goose chases. The whole piece is worth reading.</p>
<ol class="footnotes"><li id="footnote_0_760" class="footnote">Which proves once again my maxim that if you wait long enough to do something, either somebody else does it or it becomes irrelevant.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/06/think-dont-blink/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone killer? Again?</title>
		<link>http://oscarbonilla.com/2010/05/iphone-killer-again/</link>
		<comments>http://oscarbonilla.com/2010/05/iphone-killer-again/#comments</comments>
		<pubDate>Mon, 24 May 2010 19:04:59 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[rants]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=752</guid>
		<description><![CDATA[Here is a mistake that I've seen companies competing with the iPhone make more than once. Comparing the currently shipping version of the iPhone with their not-quite-shipping-yet phone. Palm did it. They put out a kick-ass product that would've blown the original iPhone out of the water or at least given it a run for [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a mistake that I've seen companies competing with the iPhone make more than once. Comparing the currently shipping version of the iPhone with their not-quite-shipping-yet phone.</p>
<p>Palm did it. They put out a kick-ass product that would've blown the original iPhone out of the water or at least given it a run for its money. Unfortunately they did it about a year and a half too late. The world had moved on and the reaction was "meh". Then they ran out of money.</p>
<p>Google is doing it right now. They announced Froyo running on the Nexus One and it kicks the iPhone 3GS sorry little ass. Except the 3GS has been shipping for over a year. Do they think Apple has spent a year doing nothing? Of course not, we've seen the leaks of the new iPhone. The new iPhone will be based on the A4 CPU and my prediction is that it will be faster than the Nexus One.</p>
<p>If you want to compete with Apple, don't copy last years products. Look AHEAD, to what's coming.</p>
<p>P.S. I'm no longer reading any articles that have the phrase "iPhone Killer" in them (including this one ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/05/iphone-killer-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lucia de Berk</title>
		<link>http://oscarbonilla.com/2010/04/lucia-de-berk/</link>
		<comments>http://oscarbonilla.com/2010/04/lucia-de-berk/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 23:19:09 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=741</guid>
		<description><![CDATA[This is infuriating. In June 2004, Lucia was convicted of 7 murders and 3 attempted murders by the Court of Appeal in The Hague. She was given a life sentence; in view of the lack of evidence, a perplexing sentence. There are no eye witnesses, there is no direct incriminating evidence. Lucia was never seen [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://luciadeb.nl/english/summary.html">This</a> is infuriating.</p>
<blockquote><p>In June 2004, Lucia was convicted of 7 murders and 3 attempted murders by the Court of Appeal in The Hague. She was given a life sentence; in view of the lack of evidence, a perplexing sentence. There are no eye witnesses, there is no direct incriminating evidence. Lucia was never seen in a suspicious situation. She was never found in possession of any of the poisons she was alleged to have used.</p></blockquote>
<p>So how did they catch this supposed murderer? Why were they even investigating her?</p>
<blockquote><p>Everything started with an at first glance striking number of incidents (deaths or resuscitations) during Lucia’s shifts at the Juliana Children’s Hospital in the Hague: the JKZ. The run drew attention to her. Seven incidents in a row all in the shifts of one nurse could not possibly be a matter of chance! The services of a former statistician, now professor of Psychology of Law, Henk Elffers, were called in, and the number he came up with must have wiped out all remaining doubt. He figured that the probability that all of seven incidents could have happened during Lucia’s shifts by pure chance was 1 in 6,000,000,000.</p></blockquote>
<p>So instead of looking at the data to support a theory, they looked at the data to <em>form</em> a theory. This is totally the wrong approach. You can find all sorts of patterns given a large enough data set. That is why seasoned researchers form a theory first and then analyze or gather data in order to test the theory. If you have no theory you're just doing <a href="http://en.wikipedia.org/wiki/Cargo_cult_science">cargo cult science</a>. As for the 1 in 6,000,000,000 chance, it looks like a case of the <a href="http://en.wikipedia.org/wiki/Birthday_problem">Birthday Paradox</a>. Given enough deaths and nurses, the probability of <em>some</em> nurse being present in 7 consecutive deaths <a href="http://www.math.leidenuniv.nl/~gill/hetero2.pdf">is pretty high</a>. Ben Goldacre has <a href="http://www.badscience.net/2010/04/lucia-de-berk-a-martyr-to-stupidity/">more</a>.</p>
<blockquote><p>Even more bizarre was the staggering foolishness by some of the statistical experts used in the court. One, Henk Elffers, a professor of law, combined individual statistical tests by taking p-values – a mathematical expression of statistical significance – and multiplying them together. This bit is for the nerds: you do not just multiply p-values together, you weave them with a clever tool, like maybe ‘Fisher’s method for combination of independent p-values’. If you multiply p-values together, then chance incidents will rapidly appear to be vanishingly unlikely. Let’s say you worked in twenty hospitals, each with a pattern of incidents that is purely random noise: let’s say p=0.5. If you multiply those harmless p-values, of entirely chance findings, you end up with a final p-value of p &lt; 0.000001, falsely implying that the outcome is extremely highly statistically significant. With this mathematical error, by this reasoning, if you change hospitals a lot, you automatically become a suspect.</p></blockquote>
<p>Multiplying p-values? Really?</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/04/lucia-de-berk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pigeons Beat Students at Probabilities</title>
		<link>http://oscarbonilla.com/2010/04/pigeons-beat-students-at-probabilities/</link>
		<comments>http://oscarbonilla.com/2010/04/pigeons-beat-students-at-probabilities/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 18:05:38 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=737</guid>
		<description><![CDATA[Interesting. Pigeons outperform humas at the Monty Hall problem. First the pigeons: Each pigeon was faced with three lit keys, one of which could be pecked for food. At the first peck, all three keys switched off and after a second, two came back on including the bird’s first choice. The computer, playing the part [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.discovermagazine.com/notrocketscience/2010/04/02/pigeons-outperform-humans-at-the-monty-hall-dilemma/">Interesting</a>. Pigeons outperform humas at the <a href="http://en.wikipedia.org/wiki/Monty_Hall_problem">Monty Hall problem</a>. First the pigeons:</p>
<blockquote><p>Each pigeon was faced with three lit keys, one of which could be pecked for food. At the first peck, all three keys switched off and after a second, two came back on including the bird’s first choice. The computer, playing the part of Monty Hall, had selected one of the unpecked keys to deactivate. If the pigeon pecked the right key of the remaining two, it earned some grain. On the first day of testing, the pigeons switched on just a third of the trials. But after a month, all six birds switched almost every time, earning virtually the maximum grainy reward.</p></blockquote>
<p>Then the students:</p>
<blockquote><p>At first, they were equally likely to switch or stay. By the final trial, they were still only switching on two thirds of the trials. They had edged towards the right strategy but they were a long way from the ideal approach of the pigeons. And by the end of the study, they were showing no signs of further improvement.</p></blockquote>
<p>There is something to be said about our preconceptions and how biased we can be when looking at data. Pigeons are immune to this.</p>
<blockquote><p>Despite our best attempts at reasoning, most of us arrive at the wrong answer.</p></blockquote>
<blockquote><p>Pigeons, on the other hand, rely on experience to work out probabilities. They have a go, and they choose the strategy that seems to be paying off best.</p></blockquote>
<p>I've written about the Monty Hall Problem <a href="http://oscarbonilla.com/2009/05/the-monty-hall-problem/">here</a>.</p>
<p>P.S. In case you missed the joke, look <a href="http://theprez98.blogspot.com/2010/03/template-for-how-to-write-bruce.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/04/pigeons-beat-students-at-probabilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Probabilities</title>
		<link>http://oscarbonilla.com/2010/04/probabilities/</link>
		<comments>http://oscarbonilla.com/2010/04/probabilities/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 05:17:15 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=706</guid>
		<description><![CDATA[Introduction For the past couple of weeks I've been trying to write an article explaining briefly what p-values are and what they really measure. Turns out there are enough subtleties involved that I keep writing and writing and haven't published anything. So I've decided that it's time for a change of tactic. I'm going to [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p style="text-align: left;">For the past couple of weeks I've been trying to write an article explaining briefly what p-values are and what they really measure. Turns out there are enough subtleties involved that I keep writing and writing and haven't published anything. So I've decided that it's time for a change of tactic.</p>
<p style="text-align: left;">I'm going to work my way up to p-values, explaining in detail each of the pieces. Then, when I'm done, I will write a summary that just links back to the longer explanations and hopefully I'll be able then to summarize the journey and write a more succinct explanation.</p>
<p style="text-align: left;">This is the first installment of the series, and it deals with the basic idea of probabilities.</p>
<p style="text-align: left;"><div id='stb-container-8082' class='stb-container'><div id='stb-caption-box-8082' class='stb-info-caption_box stb_caption' style="color:#000000; border-top-color: #bbbbbb; border-left-color: #bbbbbb; border-right-color: #bbbbbb; border-bottom-color: #bbbbbb; background-color: #bbbbbb; ">For Math Geeks</div><div id='stb-body-box-8082' class='stb-info-body_box stb_body' style="border-top-color: #bbbbbb; border-left-color: #bbbbbb; border-right-color: #bbbbbb; border-bottom-color: #bbbbbb; background-color: #ffffff; ">In these boxes you'll find formal definitions that are intended to complement the main text. If you are <strong>not</strong> a math geek, you can safely ignore these.</div></div></p>
<p style="text-align: right;">Let's start at the very beginning,<br />
a very good place to start.<br />
<em>– Maria (The Sound of Music)</em></p>
<h2>In the beginning there were probabilities</h2>
<p>The idea behind naïve probabilities is simple. You have a Universe of all possible outcomes of some experiment (sometimes called a sample space and denoted by the greek letter Omega:<img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_e948798df2a34079920cab333c54a490.png" title="\Omega" style="vertical-align:-20%;" class="tex" alt="\Omega" />), and you are interested in some subset of them, namely some event (denoted by <img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_9e021374aed36323cad429d5234ddd96.png" title="E" style="vertical-align:-20%;" class="tex" alt="E" />). The probability of event <img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_9e021374aed36323cad429d5234ddd96.png" title="E" style="vertical-align:-20%;" class="tex" alt="E" /> occurring is the cardinality (number of elements) of <img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_9e021374aed36323cad429d5234ddd96.png" title="E" style="vertical-align:-20%;" class="tex" alt="E" /> over all the possible outcomes (cardinality of <img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_e948798df2a34079920cab333c54a490.png" title="\Omega" style="vertical-align:-20%;" class="tex" alt="\Omega" />).</p>
<p><center><img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_f3fafe77cad4008a513a15262e512c9d.png" title="P(E)=\displaystyle\frac{|E|}{|\Omega|}" style="vertical-align:-20%;" class="tex" alt="P(E)=\displaystyle\frac{|E|}{|\Omega|}" /></center></p>
<p>Say you are throwing a pair of dice. How many possible outcomes of this experiment can there be? If you ignore the possible but unlikely event that one of the die will land on its edge, there are 36 possible outcomes. That means that the probability of getting snake eyes (two ones) is 1/36. You could even enumerate all the outcomes and construct a set like {(1, 1), (1, 2), ... (6, 6)} where each pair (x, y) represents die 1 landing on x and die 2 landing on y.</p>
<p>I said naïve before because this assignment of probabilities makes a couple of implicit assumptions about the sample space and the events. First of all, it assumes that the sample space is finite. I'm going to completely ignore infinite sample spaces and instead focus on the second implicit assumption: that each outcome is equally likely.</p>
<p>What if some outcomes are more likely than others? For example, what if the dice are loaded? All of a sudden 1/36 doesn't look like such a good probability assignment for snake eyes.</p>
<p>In the general sense, you don't <em>have to</em> assign equal probabilities to each of the outcomes. It's usually just a good starting point to assume that this is the case. But if you <strong>know</strong> that this is not the case, then starting with equal probabilities is not very smart.</p>
<p>As an example, in the <a href="http://oscarbonilla.com/2009/05/the-monty-hall-problem/">Monty Hall problem</a>, if you second cousin thrice removed is part of the staff and he lets you in that the car is not in door number three, that completely changes the problem. You would never assign P = 1/3 to each of the doors. You know for a fact that the probability of the car being behind door number three is exactly zero.</p>
<p>In a general sense then, probabilities can't be defined by just counting possible outcomes. They must be defined as general functions that map a set of outcomes to numbers between zero and one. They must, of course, satisfy some special properties.</p>
<p><div id='stb-container-4528' class='stb-container'><div id='stb-caption-box-4528' class='stb-info-caption_box stb_caption' style="color:#000000; border-top-color: #bbbbbb; border-left-color: #bbbbbb; border-right-color: #bbbbbb; border-bottom-color: #bbbbbb; background-color: #bbbbbb; ">For Math Geeks</div><div id='stb-body-box-4528' class='stb-info-body_box stb_body' style="border-top-color: #bbbbbb; border-left-color: #bbbbbb; border-right-color: #bbbbbb; border-bottom-color: #bbbbbb; background-color: #ffffff; ">A probability function <img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_7377fea273cbc192f883469992265332.png" title="P" style="vertical-align:-20%;" class="tex" alt="P" /> maps a sample space (<img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_7f96f6b17bfb3e8e80c88592d4d0a7a4.png" title=" \Omega" style="vertical-align:-20%;" class="tex" alt=" \Omega" />) to a number in the interval <img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_fa1c7732213579436cabb32ba36abbdb.png" title="[0,1]" style="vertical-align:-20%;" class="tex" alt="[0,1]" />, and satisfies the following three properties:</p>
<ol>
<li><img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_635bdb5bf787b9836781109afd284126.png" title=" P(E) \ge 0 \textrm{ for every } E" style="vertical-align:-20%;" class="tex" alt=" P(E) \ge 0 \textrm{ for every } E" /></li>
<li><img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_fed5322425ff62d35aac743fb36dda29.png" title=" P(\Omega) = 1" style="vertical-align:-20%;" class="tex" alt=" P(\Omega) = 1" /></li>
<li><img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_86e1dfe335704714907f18c2d43fae03.png" title="\textrm{if }E_1, E_2, \ldots \textrm{ are disjoint, then }" style="vertical-align:-20%;" class="tex" alt="\textrm{if }E_1, E_2, \ldots \textrm{ are disjoint, then }" /> <center><img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_34d0524c534af9bd26fa3642966999b7.png" title=" P\left(\displaystyle\bigcup_{i=1}^{\infty}E_i\right) = \displaystyle\sum_{i=1}^{\infty}P(E_i)" style="vertical-align:-20%;" class="tex" alt=" P\left(\displaystyle\bigcup_{i=1}^{\infty}E_i\right) = \displaystyle\sum_{i=1}^{\infty}P(E_i)" /></center></div></div></li>
</ol>
<p>But notice that the previous definition of probabilities (<img src="http://oscarbonilla.com/wp-content/plugins/easy-latex/cache/tex_85f627b2b1e4a6691aa96921630e6e11.png" title="|E|/|\Omega|" style="vertical-align:-20%;" class="tex" alt="|E|/|\Omega|" />) was very handy in the sense that just by knowing the cardinalities we had the appropriate probabilities. If we assign the probabilities unevenly, how do we describe them without having to enumerate each one individually?</p>
<p>This is where probability distributions help. And that will be the subject of the next post.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/04/probabilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mandoline my ass&#8230;</title>
		<link>http://oscarbonilla.com/2010/02/mandoline-my-ass/</link>
		<comments>http://oscarbonilla.com/2010/02/mandoline-my-ass/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 04:10:10 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Food]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=452</guid>
		<description><![CDATA[...all you need is a sharp knife. I just got The French Laundry Cookbook. It's awesome.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://oscarbonilla.com/wp-content/uploads/2010/02/IMG_6499.jpg" class="lightview" data-lightview-group="group-452" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="Strawberry"><img class="size-medium wp-image-453 aligncenter" title="Strawberry" src="http://oscarbonilla.com/wp-content/uploads/2010/02/IMG_6499-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p style="text-align: left;">...all you need is a <a href="http://www.amazon.com/gp/product/B00005OL44?ie=UTF8&amp;tag=obonilswebsit-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00005OL44" target="_blank">sharp knife</a>.</p>
<p style="text-align: left;">I just got <a href="http://www.amazon.com/gp/product/1579651267?ie=UTF8&amp;tag=obonilswebsit-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1579651267" target="_blank">The French Laundry Cookbook</a>. It's awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/02/mandoline-my-ass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unleash the power of the atom&#8230; to boil water?</title>
		<link>http://oscarbonilla.com/2010/02/unleash-the-power-of-the-atom-to-boil-water/</link>
		<comments>http://oscarbonilla.com/2010/02/unleash-the-power-of-the-atom-to-boil-water/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 05:14:45 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Stuff I Know Nothing About]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=446</guid>
		<description><![CDATA[I'm going to go off on a limb and blog about something I know absolutely nothing about. Power generation. So I'm reading the news recently and I read that the U.S. is going to invest in building a couple of nuclear power plants. Now, I don't know much about nuclear power plants or power generation [...]]]></description>
			<content:encoded><![CDATA[<p>I'm going to go off on a limb and blog about something I know absolutely nothing about. Power generation.</p>
<p>So I'm reading the news recently and I read that the U.S. is going to invest in building a couple of nuclear power plants. Now, I don't know much about nuclear power plants or power generation in general. But I know how to use the googles for finding out about stuff I don't know much about. So I hit wikipedia and all those other websites and I find about all of these wonderful methods of generating power.</p>
<p><strong>Fossil Fuels:</strong> Coal for instance. Oil and natural gas too. The main idea is to burn these fossil fuels in order to boil water so that the steam can make a turbine spin and generate electricity using a big electromagnet.</p>
<p><strong>Nuclear Fission:</strong> Create a controlled nuclear reaction so that we can heat up water and produce steam to spin a turbine hooked up to a huge electromagnet.</p>
<p><strong>Geothermal Power:</strong> Drill a very, very deep hole to reach the hot granite that underlies the earth's crust. This granite is so hot we can use it to... boil water... steam... turbine... electromagnet.</p>
<p><strong>Hydroelectric:</strong> Just avoid the whole boiling water bit and spin the turbine directly from a river.</p>
<p><strong>Tidal Power:</strong> Make a dam in the ocean and put the turbine there.</p>
<p><strong>Wind Power:</strong> Instead of boiling water and using steam, use wind to spin the turbine.</p>
<p><strong>Solar power: </strong>At this point, if I had read that we were using solar to boil water I would've just given up hope for humanity. But no, at least with solar we actually just use the energy... no turbine involved.</p>
<p>So my question for more informed readers is: uh, how about <strong>not</strong> needing the turbine and using some other method of gathering the released energy? Especially in the case of Nuclear Fission. It seems somewhat wasteful to fire up an atomic bomb just to boil some water...</p>
]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/02/unleash-the-power-of-the-atom-to-boil-water/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enjoying Life (a little more)</title>
		<link>http://oscarbonilla.com/2010/01/enjoying-life-a-little-more/</link>
		<comments>http://oscarbonilla.com/2010/01/enjoying-life-a-little-more/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 05:24:42 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=339</guid>
		<description><![CDATA[This is a post about a simple trick you can use to enjoy the things you like a little more and/or make them enjoyable to others. But first, let's try a little experiment. Please listen to this piece of classical music. It's only 47 seconds long. Now write down some measure of how much you enjoyed [...]]]></description>
			<content:encoded><![CDATA[<p>This is a post about a simple trick you can use to enjoy the things you like a little more and/or make them enjoyable to others. But first, let's try a little experiment. Please listen to this piece of classical music. It's only 47 seconds long.</p>
<p style="text-align: left;"><!-- degradable html5 audio and video plugin --><div class="audio_wrap html5audio"><div style="display:none;"><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/2-09-Musical-Offering-BWV-1079_-Canon-a-2.mp3" title="Click to open" id="f-html5audio-0">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-0", {soundFile: "http://oscarbonilla.com/wp-content/uploads/2010/01/2-09-Musical-Offering-BWV-1079_-Canon-a-2.mp3"});</script></div><audio controls autobuffer id="html5audio-0" class="html5audio"><source src="http://oscarbonilla.com/wp-content/uploads/2010/01/2-09-Musical-Offering-BWV-1079_-Canon-a-2.mp3" type="audio/mpeg" /><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/2-09-Musical-Offering-BWV-1079_-Canon-a-2.mp3" title="Click to open" id="f-html5audio-0">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-0", {soundFile: "http://oscarbonilla.com/wp-content/uploads/2010/01/2-09-Musical-Offering-BWV-1079_-Canon-a-2.mp3"});</script></audio></div><script type="text/javascript">if (jQuery.browser.mozilla) {tempaud=document.getElementsByTagName("audio")[0]; jQuery(tempaud).remove(); jQuery("div.audio_wrap div").show()} else jQuery("div.audio_wrap div *").remove();</script></p>
<p style="text-align: left;">Now write down some measure of how much you enjoyed it on whatever scale you want. Five stars, a number from one to ten, whatever. Ready? Okay, now read the following story.</p>
<p style="text-align: center;"><img class="aligncenter size-medium wp-image-403" src="http://oscarbonilla.com/wp-content/uploads/2010/01/Bach_Seal_wide-300x134.jpg" alt="" width="108" height="48" /></p>
<p style="text-align: left;">On the evening of May 7, 1747  in the grounds of the just finished <a href="http://en.wikipedia.org/wiki/Sanssouci">Sansoucci</a> palace of <a href="http://en.wikipedia.org/wiki/Frederick_II_of_Prussia">Frederick the Great</a>, King of <a href="http://en.wikipedia.org/wiki/Kingdom_of_Prussia">Prussia</a>, a 62-year old man arrives by carriage. As was the custom in those days, an officer writes his name in a list of visitors which is usually reviewed by the King.</p>
<p>Inside the palace, through the Entrance Hall and to the left, King Frederick is in an exquisitely decorated room, getting his flute ready for the nightly concert while the rest of the musicians tune up. The officer enters the room and gives the King the list of strangers who have arrived to the palace.</p>
<p style="text-align: left;">With his flute in his hand, Frederick runs down the list and immediately turns to the assembled musicians, exclaiming with a kind of agitation, “Gentlemen, old Bach is come.” He lays his flute aside, and announces to the other musicians and the rest of the people of the court that there will be no concert tonight.</p>
<div id="attachment_405" class="wp-caption aligncenter" style="width: 535px"><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/800px-Flötenkonzert1.jpg"><img class="size-full wp-image-405    " title="800px-Flötenkonzert" src="http://oscarbonilla.com/wp-content/uploads/2010/01/800px-Flötenkonzert1.jpg" alt="" width="525" height="358" /></a><p class="wp-caption-text">Das Flötenkonzert Friedrich des Großen in Sanssouci by Adolph von Menzel</p></div>
<p><a href="http://en.wikipedia.org/wiki/Bach">Johann Sebastian Bach</a> has just arrived for a visit to his son <a href="http://en.wikipedia.org/wiki/Carl_Philipp_Emanuel_Bach">Carl Philip Emanuel Bach</a>, the court’s Capellmeister. The King had wanted to meet with J.S. Bach, and his wish had just been realized. So without even giving Bach time to change from his traveling clothes to a more formal black chanter's gown, the King summons him to appear before his Highness. Frederick, after listening to Bach’s apology for his appearance, invites him to try his collection of <a href="http://en.wikipedia.org/wiki/Fortepiano#Silbermann_fortepianos">Silbermann fortepianos</a>, which are scattered throughout the palace.</p>
<p>The musicians follow them from room to room, and Bach is invited everywhere to try the fortepianos and play unpremeditated compositions. After going on for some time, Bach asks the King, “Would Your Highness be so kind as to honor me with a subject for a Fuge, so that I can execute it immediately and without any preparation?” The King, desiring to give such a learned musician a challenge, picks up his flute and plays the following tune:</p>
<p style="text-align: left;"><!-- degradable html5 audio and video plugin --><div class="audio_wrap html5audio"><div style="display:none;"><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/01-Thema-Regium-Traverso-Solo-Bach-1.mp3" title="Click to open" id="f-html5audio-1">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-1", {soundFile: "http://oscarbonilla.com/wp-content/uploads/2010/01/01-Thema-Regium-Traverso-Solo-Bach-1.mp3"});</script></div><audio controls autobuffer id="html5audio-1" class="html5audio"><source src="http://oscarbonilla.com/wp-content/uploads/2010/01/01-Thema-Regium-Traverso-Solo-Bach-1.mp3" type="audio/mpeg" /><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/01-Thema-Regium-Traverso-Solo-Bach-1.mp3" title="Click to open" id="f-html5audio-1">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-1", {soundFile: "http://oscarbonilla.com/wp-content/uploads/2010/01/01-Thema-Regium-Traverso-Solo-Bach-1.mp3"});</script></audio></div><script type="text/javascript">if (jQuery.browser.mozilla) {tempaud=document.getElementsByTagName("audio")[0]; jQuery(tempaud).remove(); jQuery("div.audio_wrap div").show()} else jQuery("div.audio_wrap div *").remove();</script></p>
<div id="attachment_411" class="wp-caption aligncenter" style="width: 510px"><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/500px-The_Musical_Offering_theme.svg_.png" class="lightview" data-lightview-group="group-339" data-lightview-options="background: { color: '', opacity: 0.00 }, skin: '', border: { color: '', opacity: 0.00, size: 0 }, controls: '', overlay: { background: '', opacity: 0.00, close: true }, radius: { size: 0, position: 'border' }, shadow: false" data-lightview-title="500px-The_Musical_Offering_theme.svg"><img class="size-full wp-image-411" title="500px-The_Musical_Offering_theme.svg" src="http://oscarbonilla.com/wp-content/uploads/2010/01/500px-The_Musical_Offering_theme.svg_.png" alt="" width="500" height="42" /></a><p class="wp-caption-text">The King&#39;s Theme</p></div>
<p>This is quite a complex melody! One of which Michelle Rasmussen says:</p>
<blockquote><p>The King’s theme begins with a C minor triad, (“c - e flat – g”), is raised to the next half-note above that, “a flat,” and then takes a dramatic downward leap of a seventh from the "a flat" down to “B,” not included in C minor, but found in C major. This creates musical tension between two pairs of half-step intervals: from the ”B”  back to the beginning “C,” and the “g - a flat” interval.</p>
<p>Picking up on these half-steps from the first part, the second part of the Royal theme is a revolutionary ambiguous step-wise descent from the top of the triad, “g” one octave down to "G," comprised of a chromatic descent from "g" to "B", and then, down by major scale steps to  “G.” The concluding section hops up through "c" to "f," and ends with a stepwise journey down the C-minor scale from f, through "e flat," to end where it began on "c."</p></blockquote>
<p>Bach is silent for a couple of seconds, but he accepts the King's challenge. He plays the King's theme three times before proceeding to play a beautiful three-voice Fugue. Please listen to the first minute of it:</p>
<p style="text-align: left;"><!-- degradable html5 audio and video plugin --><div class="audio_wrap html5audio"><div style="display:none;"><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/Ricercar-3.mp3" title="Click to open" id="f-html5audio-2">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-2", {soundFile: "http://oscarbonilla.com/wp-content/uploads/2010/01/Ricercar-3.mp3"});</script></div><audio controls autobuffer id="html5audio-2" class="html5audio"><source src="http://oscarbonilla.com/wp-content/uploads/2010/01/Ricercar-3.mp3" type="audio/mpeg" /><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/Ricercar-3.mp3" title="Click to open" id="f-html5audio-2">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-2", {soundFile: "http://oscarbonilla.com/wp-content/uploads/2010/01/Ricercar-3.mp3"});</script></audio></div><script type="text/javascript">if (jQuery.browser.mozilla) {tempaud=document.getElementsByTagName("audio")[0]; jQuery(tempaud).remove(); jQuery("div.audio_wrap div").show()} else jQuery("div.audio_wrap div *").remove();</script></p>
<p>The King, impressed by the three-voice Fuge improvised by Bach, and to see how far such art could be carried, requests to hear a Fuge with six voices. Fearing he cannot, without preparation, invent such a complex Fuge based on the King's theme, Bach asks permission of the King to pick his own subject, which the King gently concedes. Bach proceeds then to execute it to the astonishment of all present in the same magnificent and learned manner as he had done that of the King.</p>
<p>After returning home to Leipzig, Bach composes a three-voiced and a six-voiced <a href="http://en.wikipedia.org/wiki/Fugue">fugue</a>, ten <a href="http://en.wikipedia.org/wiki/Canon_(music)">canons</a>, and a <a href="http://en.wikipedia.org/wiki/Sonata">sonata</a> for flute, violin, and piano. All based on the King's theme. This work has become known as the <a href="http://en.wikipedia.org/wiki/The_Musical_Offering">Musikalisches Opfer</a> (Musical Offering), after a phrase from Bach’s dedication to King Frederick[<a href="http://oscarbonilla.com/2010/01/enjoying-life-a-little-more/#footnote_0_339" id="identifier_0_339" class="footnote-link footnote-identifier-link" title="This is the letter of dedication that Bach sent to the King (quoted from&nbsp;The New Bach Reader, p. 226-8):
MOST GRACIOUS KING!
In deepest humility I dedicate herewith to Your Majesty a&nbsp;musical offering, the noblest part of which derives from Your Majesty&#039;s own august hand. With awesome pleasure I still remember the very special Royal grace when, some time ago, during my visit in Potsdam, Your Majesty&rsquo;s Self deigned to play to me a theme for a fugue upon the clavier, and at the same time charged me most graciously to carry it out in Your Majesty&rsquo;s most august presence. To obey Your Majesty&rsquo;s command was my most humble duty. I noticed very soon, however, that, for lack of necessary preparation, the execution of the task did not fare as well as such an excellent theme demanded. I resolved therefore and promptly pledged myself to work out this right Royal theme more fully and then make it known to the world. This resolve has now been carried out as well as possible, and it has none other that this irreproachable intent, to glorify, if only in a small point, the fame of a monarch whose greatness and power,&nbsp;as in all the sciences of war and peace, so especially in music, everyone must admire and revere. I make bold to&nbsp;add this most humble request: may Your Majesty deign to dignify the&nbsp;present modest labor with a gracious acceptance, and continue to grant Your Majesty&rsquo;s most august Royal grace to
Your Majesty&rsquo;s most humble and obedient servant
Leipzig, July 7, 1747&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Author
">1</a>].</p></blockquote>
<p>Bach sends this <em>Musical Offering</em> to King Frederick, and on the page preceding the first sheet of music, he inscribes: <em>Regis Iussu Cantio Et Reliqua Canonica Arte Resoluta,</em> meaning "At the King's Command, the Song and the Remainder Resolved with Canonic Art." an acrostic spelling "<a href="http://en.wikipedia.org/wiki/Ricercar">RICERCAR</a>," the original name for the musical form now known as the Fuge. Bach also uses this title for the two fugues. Ricercar is also an Italian word meaning "to seek", which is appropriate since Bach doesn't quite write <em>all</em> the music. He leaves hints on how to complete the scores as musical puzzles for the King to solve.</p>
<p>One example of these puzzles is the work entitled "Canon a 2 (Cancrizans)". The original score looks like this:</p>
<div id="attachment_412" class="wp-caption aligncenter" style="width: 382px"><img class="size-full wp-image-412" title="Canon-2a-Cancrizans" src="http://oscarbonilla.com/wp-content/uploads/2010/01/Canon-2a-Cancrizans.gif" alt="" width="372" height="151" /><p class="wp-caption-text">Canon a 2 (Cancrizans)</p></div>
<p>The title "Canon a 2" implies it's a two-voice canon, but the score only shows one voice. There are hints in the score for solving the puzzle of the second voice:</p>
<ul>
<li><em>Cancrizan</em> is Medieval-Latin meaning "to move backwards" literally <em>crab-like</em>.</li>
<li>There is an extra clef at the end of the score, and it is backwards.</li>
<li>The three flats at the end of the score are also facing backwards.</li>
</ul>
<p>All of these hints strongly imply that the second voice (the follower) is the same as the first voice (the leader) only played backwards. What you listened to in the beginning was Canon a 2 (Cancrizan) as performed by the <a href="http://www.stuttgarter-kammerorchester.de/">Stuttgarter Kammerorchester</a> under the direction of <a href="http://en.wikipedia.org/wiki/Karl_Münchinger">Karl Münchinger</a>. Listen to it again:</p>
<p style="text-align: center;"><!-- degradable html5 audio and video plugin --><div class="audio_wrap html5audio"><div style="display:none;"><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/2-09-Musical-Offering-BWV-1079_-Canon-a-2.mp3" title="Click to open" id="f-html5audio-3">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-3", {soundFile: "http://oscarbonilla.com/wp-content/uploads/2010/01/2-09-Musical-Offering-BWV-1079_-Canon-a-2.mp3"});</script></div><audio controls autobuffer id="html5audio-3" class="html5audio"><source src="http://oscarbonilla.com/wp-content/uploads/2010/01/2-09-Musical-Offering-BWV-1079_-Canon-a-2.mp3" type="audio/mpeg" /><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/2-09-Musical-Offering-BWV-1079_-Canon-a-2.mp3" title="Click to open" id="f-html5audio-3">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-3", {soundFile: "http://oscarbonilla.com/wp-content/uploads/2010/01/2-09-Musical-Offering-BWV-1079_-Canon-a-2.mp3"});</script></audio></div><script type="text/javascript">if (jQuery.browser.mozilla) {tempaud=document.getElementsByTagName("audio")[0]; jQuery(tempaud).remove(); jQuery("div.audio_wrap div").show()} else jQuery("div.audio_wrap div *").remove();</script></p>
<p>But note that since the second voice is the same as the first voice, only played backwards. We should be able to reverse the recording and the canon should still sound the same! Listen to the same canon being played backwards:</p>
<!-- degradable html5 audio and video plugin --><div class="audio_wrap html5audio"><div style="display:none;"><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/Canon-a-2-07-invertido.mp3" title="Click to open" id="f-html5audio-4">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-4", {soundFile: "http://oscarbonilla.com/wp-content/uploads/2010/01/Canon-a-2-07-invertido.mp3"});</script></div><audio controls autobuffer id="html5audio-4" class="html5audio"><source src="http://oscarbonilla.com/wp-content/uploads/2010/01/Canon-a-2-07-invertido.mp3" type="audio/mpeg" /><a href="http://oscarbonilla.com/wp-content/uploads/2010/01/Canon-a-2-07-invertido.mp3" title="Click to open" id="f-html5audio-4">Audio MP3</a><script type="text/javascript">AudioPlayer.embed("f-html5audio-4", {soundFile: "http://oscarbonilla.com/wp-content/uploads/2010/01/Canon-a-2-07-invertido.mp3"});</script></audio></div><script type="text/javascript">if (jQuery.browser.mozilla) {tempaud=document.getElementsByTagName("audio")[0]; jQuery(tempaud).remove(); jQuery("div.audio_wrap div").show()} else jQuery("div.audio_wrap div *").remove();</script>
<p>Now listen to the original canon once again. How much, on your same scale, did you enjoy it this time? Was it more? Significantly more? How likely are you to want to listen to the rest of the Musical Offering? For example by buying one of these two CDs?</p>
<p style="text-align: center;"><a style="border: none;" href="http://www.amazon.com/gp/product/B000VHKJSU?ie=UTF8&amp;tag=obonilswebsit-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000VHKJSU&quot;"><img class="size-full wp-image-413 alignnone" src="http://oscarbonilla.com/wp-content/uploads/2010/01/MO_Munchinger.jpg" alt="" width="160" height="159" /></a> <a style="border: none;" href="http://www.amazon.com/gp/product/B000QR3R3E?ie=UTF8&amp;tag=obonilswebsit-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000QR3R3E" target="_blank"><img class="size-full wp-image-414  alignnone" src="http://oscarbonilla.com/wp-content/uploads/2010/01/MO_Savall.jpg" alt="" width="160" height="159" /></a></p>
<p style="text-align: left;">If you are like most people, you found the second hearing much more enjoyable than the first. This is because your expectations, the context in which you have an experience, and how much you know about something all have a big effect on how much enjoyment you derive. Reading the story taught you something about the music, it served as a guide of what to look for. Sure, it helps that this is a musical masterpiece by the best baroque composer there is. But the effect works, even if <em>the story is false</em>.</p>
<p style="text-align: left;">Oh, I'm not saying that the above story didn't happen. I dressed it up a little, but the story is true. However, take a look at the <a href="http://significantobjects.com">Significant Objects</a> project. They take an insignificant object (bought at a Thrift store) and ask a writer to make up a back story for it. Then they sell it on ebay. They are careful to disclose that the story is false, and they donate the proceedings to charity. But how much do the objects gain in value? <a href="http://significantobjects.com/2009/08/25/russian-figure/">This Russian Figurine</a> that they bought for $3 was sold for $193.50!</p>
<p style="text-align: left;">In one <a href="http://www.boston.com/bostonglobe/ideas/articles/2008/02/24/grape_expectations/">experiment</a>, scientists at Caltech and Stanford told people they would be tasting wines ranging in price from $5 to $90, and asked them to rate the wines. Unsurprisingly, the more expensive wines were rated higher than the cheap wines. The twister? All the samples were the exact same wine. Since people expected the more expensive wine to taste better, it tasted better.</p>
<p style="text-align: left;">So here is the trick I promised you. If you want to make an experience more enjoyable, find or create a backstory. It's better if the story is true and you believe it, but it works even if it's a made up story.</p>
<p style="text-align: center;"><a href="http://en.wikipedia.org/wiki/BACH_motif"><img class="alignnone size-full wp-image-425" title="BACH" src="http://oscarbonilla.com/wp-content/uploads/2010/01/200px-Bachscross.svg_.png" alt="" width="90" height="90" /></a></p>
<p style="text-align: left;">For much more information about the canons of Bach's Musical Offering, look <a href="http://schillerinstitut.dk/moweb/musical_offering.htm">here</a>, or <a href="http://jan.ucc.nau.edu/~tas3/musoffcanons.html">here</a>.</p>
<ol class="footnotes"><li id="footnote_0_339" class="footnote">This is the letter of dedication that Bach sent to the King (quoted from <em><a href="http://www.amazon.com/gp/product/0393319563?ie=UTF8&amp;tag=obonilswebsit-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0393319563">The New Bach Reader</a></em>, p. 226-8):</p>
<blockquote><p>MOST GRACIOUS KING!</p>
<p>In deepest humility I dedicate herewith to Your Majesty a musical offering, the noblest part of which derives from Your Majesty's own august hand. With awesome pleasure I still remember the very special Royal grace when, some time ago, during my visit in Potsdam, Your Majesty’s Self deigned to play to me a theme for a fugue upon the clavier, and at the same time charged me most graciously to carry it out in Your Majesty’s most august presence. To obey Your Majesty’s command was my most humble duty. I noticed very soon, however, that, for lack of necessary preparation, the execution of the task did not fare as well as such an excellent theme demanded. I resolved therefore and promptly pledged myself to work out this right Royal theme more fully and then make it known to the world. This resolve has now been carried out as well as possible, and it has none other that this irreproachable intent, to glorify, if only in a small point, the fame of a monarch whose greatness and power, as in all the sciences of war and peace, so especially in music, everyone must admire and revere. I make bold to add this most humble request: may Your Majesty deign to dignify the present modest labor with a gracious acceptance, and continue to grant Your Majesty’s most august Royal grace to</p>
<p>Your Majesty’s most humble and obedient servant</p>
<p>Leipzig, July 7, 1747                                       The Author</p>
<p></li></ol>]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2010/01/enjoying-life-a-little-more/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Proof that P=NP</title>
		<link>http://oscarbonilla.com/2009/10/proof-that-pnp/</link>
		<comments>http://oscarbonilla.com/2009/10/proof-that-pnp/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 18:03:52 +0000</pubDate>
		<dc:creator>ob</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://oscarbonilla.com/?p=312</guid>
		<description><![CDATA[So I was browsing Concrete Mathematics by Don Knuth et al, and I found a proof that P=NP for small N[1]. However if you make P=0, the size of N doesn't matter. So if P=0, then P = NP. Where is my money? Specifically for N=1. It's in the margin of the book]]></description>
			<content:encoded><![CDATA[<p>So I was browsing <a href="http://www.amazon.com/gp/product/0201558025?ie=UTF8&amp;tag=obonilswebsit-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201558025">Concrete Mathematics</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=obonilswebsit-20&amp;l=as2&amp;o=1&amp;a=0201558025" border="0" alt="" width="1" height="1" /> by <a href="http://www-cs-faculty.stanford.edu/~knuth/">Don Knuth</a> et al, and I found <a href="http://www.wangcong.org/articles/cm_preface_en.html">a proof </a>that<a href="http://www.wangcong.org/articles/cm_preface_en.html"> </a><a href="http://cacm.acm.org/magazines/2009/9/38904-the-status-of-the-p-versus-np-problem/fulltext">P=NP</a> for small N[<a href="http://oscarbonilla.com/2009/10/proof-that-pnp/#footnote_0_312" id="identifier_0_312" class="footnote-link footnote-identifier-link" title="Specifically for N=1.&nbsp;It&#039;s in the margin of the book">1</a>]. However if you make P=0, the size of N doesn't matter. So if P=0, then P = NP. Where is my <a href="http://www.claymath.org/millennium/P_vs_NP/">money</a>?</p>
<ol class="footnotes"><li id="footnote_0_312" class="footnote">Specifically for N=1. It's in the margin of the book</li></ol>]]></content:encoded>
			<wfw:commentRss>http://oscarbonilla.com/2009/10/proof-that-pnp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

