Archive for the ‘math’ Category

A Quick Scientific Limerick :)

March 30, 2010

Here’s one way I can show my  love for science and poetry. 🙂 I’m quite sure a lot of you guys out there can also think of your own science, math, or any other limerick under the freethinking Sun no? :)

There was a guy named Schroedinger

who was quite an exceptional thinker

He posited that

there’d either be a dead or live cat

Even before you laid down a finger

(to appreciate my limerick even more, here’s a good reference on Schroedinger’s cat) 🙂

And I don’t want to leave another favorite subject of mine (among others) without its own limerick. ;)

Newton discovered calculus

So did Leibniz, plus its use

There was some dispute

on who’d bring the discoverer’s loot

But Isaac won over a ruse.

(to appreciate my math limerick, please see the Wikipedia article on the Calculus discovery controversy) 🙂

Advertisements

Math is probably for you

November 22, 2009

Math can be really fun. Seriously.

This post is the 2nd in a series of posts I’m planning to have about why math is such a beautiful, useful, and awe-inspiring subject, and that a lot of us can do math (advanced/seemingly difficult math even). Math is such an integral part of humanity since our cave dwelling days, and much more so now in most of our technology driven lives. Previously I wrote about how even advanced math, particularly advanced geometry, can be easily tackled with just your imagination. This time it’s about probability. I can just imagine some of you cringe at the thought of math, let alone probability. But I’ll try to show you that often times, logical reasoning is all that it takes to wrap your head around probabilities, even the ones that confound a lot of brilliant people, even some mathematicians themselves. In fact, we’ll end this article with a simulation of a game/game show. Not bad huh? 🙂

Probability and people

In a nutshell, probability is the area of math which deals with the likelihood of an event happening. It is usually expressed as a number, whether a fraction or a decimal, between 0 and 1, with a probability of 1 meaning the event will surely happen and a probability of 0 meaning the event won’t happen.

Now, don’t be too hard on yourself thinking that probability is too hard for you, unlike most of the human population. In fact, probability is one really confounding area of math and problems in it that seem to be easy in hindsight, turn out to be deceptively difficult or tricky, even for  mathematicians, teachers, and other brilliant men and women around the globe. In fact a lot of us have trouble wrapping our heads around probabilities. You mix that with human hopefulness and also the difficulty of grasping very large numbers and what you get is the staggering number of people around the world falling in line to get their lotto tickets so they could win the multi-million prize money.

In fact, if we do the math, in a typical 6/49 game of lotto (6 unique numbers chosen out of 49 numbers, where the order of the 6 numbers is not important) we find that your chances of winning today after buying that lotto ticket is 1 in about 14,000,000. So if Lucy (one of the earliest hominids/proto-humans known to us) or her people, or perhaps even Neanderthals started betting on the lottery at the beginning of their lives, some of them should be millionaires by now. That’s how bad we are at assessing odds, especially coupled with large numbers. So when you go buy that lotto ticket later, I’m afraid the odds are so much against you.

However, I’ll discuss next a particularly perplexing probability problem pondered by people, even brilliant ones, and found the solution to be deceptively trivial after all. Actually, even after you get the explanation, from a practical standpoint it doesn’t seem like so. But the logical reasoning will quite surely buy you out. But don’t fret, all you need again is imagination and logical reasoning. 🙂

Game time

Some of you may have heard/read about the American game show Let’s Make a Deal. The Monty Hall problem (MHP) was named after the show’s host. Simply stated, the rules of the game are as follows:

The game master (GM), has 3 doors: 2 with goats behind them and one with a car behind it. The GM lets you choose one door, which you think holds the prize car behind it. Since the GM’s job is to make you and the audience excited and enjoy the game, the GM opens another door. But since the GM knows the placement of the goats and the car i.e. which door has which item behind it, the GM opens a door which has a goat behind it. Now, the GM poses a question to you: Do you or do you not want to change the door you initially picked i.e. the GM gives you an opportunity to stay with the door you originally picked, or to choose the other door, knowing that one of the doors, which the GM opened, has a goat behind it.

The GM in the show is of course Monty Hall (MH). Now, you’d most probably think that since there are only 2 doors left unopened, that the probability of getting either a goat or a car is now 50/50 or 50% right i.e. it doesn’t matter whether you switch doors or not?

Nope.

In fact, however counterintuitive this may seem, your chances of getting the car at this point of the game doubles if you decide to change the door you initially picked. How? Let’s find out shall we? 🙂

Goat, Car, Goat

Now let’s strap on our imagination and logical reasoning caps to find out how the probability of getting the car increases two-fold if you switch your chosen door, and that it’s not a 50/50 chance of getting the car once a door with a goat has been opened by the GM.

Monty Hall problem

Monty Hall problem

One way of looking at how this counterintuitive probability problem is correctly tackled is by taking the possibility of the events one at a time (refer to the figure above please). In this scenario we show that when you switch doors, you always double your chances of winning. Here’s how:

1. First event, say you picked a door and it happened to have the prize car behind it.  Regardless of which door the GM opens, switching in this case either gives you goat A or goat B i.e. you lose the prize car. Out of the 3 possible scenarios (2 of which are listed right after this one), in this one event/case do you lose the prize car.

2. Second event, you choose a door with a goat (goat A) behind it. The GM opens a door again with a goat (goat B) behind it. If you switch in this case, you get the car. This event, wherein you get the car by switching, is one event which you get the prize car. Score one for you. 🙂

3. Third event, you choose the 3rd door with a goat(goat B) behind it. The GM again opens a door with a goat (this time, goat A). So when you switch, you get the car again. Yay. 🙂 This event, wherein you again get the car by switching, is another event which lets you take home the prize.

So what did we get from all this? We saw that out of 3 events/cases of picking either of the 3 doors, you always get 2 events (event 2. and 3.) which favor switching and which lets you walk away with the prize (or in this case, drive away with the prize). So the odds of getting the car/prize in the MHP is not 50% as a lot of us would initially assume, but instead, is really 2/3 or approximately 66.7%.

It can take a while to sink in, but the reasoning/explanation is quite logical and sound.

Try it out!

I actually tried this out with my mother and at another time with my younger brother. What I did was I got 3 opaque plastic cups (simulating the doors) and 2 toy cows (no goat toys in our house at that time) and 1 robot toy that transforms into a car (not bad for a prize no?). I made them act as a GM at one time, with me being the game contestant. Of course to prove my point I always switched. We did this about 20 times and I got the prize car (or robot) at around 14 times out of the 20 (roughly 2/3 of 20). Then I acted as a GM and they acted as the contestant. Then their job was not to switch doors (or cups), just to prove my point that you get the prize more often than not (2/3 of the time remember?) by switching instead of staying with your original door/cup.

They even asked me if I was doing a magic trick on them. I told them it was the power of mathematics and of logical thinking. 🙂 Imagine what much more primitive, let’s say Bronze-aged men, would think of me, with this knowledge, even without modern devices like a cellphone. Perhaps they’d think of me as an oracle or even a god. 🙂

Great, great. But what’s the use?

I think one important thing we can get from this (other than to show you that you can do maths you thought were too hard or complicated for you) is that with math, we can make decisions in our lives (sports betting, lottery, game shows and so on) with more clarity, logic, and sound reasoning, instead of just blind optimism.

If you didn’t get the logic on how to win the game at first glance, or if you thought it was 50/50, don’t be ashamed, a lot of people (some brilliant even) fell for it too. In fact, out of 228 subjects in a study, only 13% chose to switch, and that the rest (87%) assumed that the switching didn’t matter since the likelihood of getting the car out of the 2 unopened doors are equal (research by Mueser and Granberg, 1999).

Quoting cognitive psychologist Massimo Piattelli-Palmarini

“… no other statistical puzzle comes so close to fooling all the people all the time”

and

“that even Nobel physicists systematically give the wrong answer, and that they insist on it, and they are ready to berate in print those who propose the right answer.”

So, not bad eh? Still think math (or at least those areas you think are too advanced or complicated for you) isn’t for the average person? If so, then look forward to my next posts about math. 🙂

References, resources, and further reading

Gather ’round kids, it’s time for math!

November 1, 2009

Mathematics is for everyone. Really.

This article ( and the succeeding ones in the series) aims to prove that point. That everyone has a mathematical brain. Specifically, I’ll concentrate on a certain area of mathematics in this article known as geometry, and then go to more advanced geometry (usually college or graduate level geometry). Don’t fret! There are no equations here which will make your eyes wander and do something else (at least while you’re reading the article). There are a lot of  science articles around, but what you usually don’t get often are articles about math, how beautiful and useful it is, and how important it is to science and modern civilization.

(more…)

Towards healthier skepticism: Correlation does not imply causation

October 9, 2009

This post will attempt to repeat, clarify, and elucidate the need for the remembrance and understanding of the phrase “correlation does not imply causation”. Scientific studies will be given, and the words in the phrase, which vary in meaning depending on usage, will be defined accordingly.

Scientific studies

Please take a moment to go through the following actual, summarized scientific research results:

1) In a previous scientific research using quantitative assessment, numerous epidemiological studies showed that women who were taking combined hormone replacement therapy (HRT) also had a lower-than-average incidence of coronary heart disease (CHD), leading doctors to propose that HRT was protective against CHD.

2) From a study at the University of Pennsylvania Medical Center, young children who sleep with the light on are much more likely to develop myopia in later life.

We will get back to them in a moment. Now we focus on correlation or co-relation, and why scientists, statisticians and skeptics, at the very least, should always maintain and promote the phrase “Correlation does not imply causation”.

(more…)

Estimating Distances Technique – A Detailed Inspection

September 14, 2009

This post is about a web article which mentions a technique that allows you to estimate, to a relatively good degree, your distance from another object. I’ll then explain the minor error which the article has, as well as the assumptions of the technique which the web article did not mention.

The Technique

I came across this neat trick from lifehacker.com about estimating distances using your arm and thumb. It is quite useful, but below I will outline a relatively minor error of the article, particularly the diagram used. It was a minor error but it still strikes me as something that should be brought to light, since it’s pretty trivial too. The original article btw was taken from the almanac.com article of the same name. Both articles were quite short so they only took me a small amount of time to read through them and to quickly notice that there was something wrong with the diagram.

The articles emphasize the fact that one’s arm (held straight) is approximately 10 times longer than the distance between your eyes. The articles also mention that with a bit of applied trigonometry, one can estimate distances between you and an object which you have a reliable width knowledge of. Unfortunately the article writer/s might have focused on the trigonometry part too much, overlooking their basic geometry when they created the diagram.

Here is the original almanac.com diagram showing a man estimating his distance from a barn which he originally knows the approximate width.

how-to-estimate-distances

How The Technique Works

In case you haven’t read the original article yet, it basically says that (again from almanac.com):

  • Hold one arm straight out in front of you, elbow straight, thumb pointing up.

  • Close one eye, and align one edge of your thumb with one edge of the barn.

  • Without moving your head or arm, switch eyes, now sighting with the eye that was closed and closing the other.

  • Your thumb will appear to jump sideways as a result of the change in perspective.

How far did it move? (Be sure to sight the same edge of your thumb when you switch eyes.)

  • Let’s say it jumped about five times the width of the barn, or about 500 feet.

  • Now multiply that figure by the handy constant 10 (the ratio of the length of your arm to the distance between your eyes).

Now you get the distance between you and the barn—5,000 feet, or about one mile. The accompanying diagram should make the whole process clear (shown above).

The Error In The Original Diagram

The error comes from the fact that the original diagram, whether it be the vertical one from almanac.com or the horizontal, modified version from lifehacker.com, show the distance line not being parallel to one line common to both triangles formed. To see this more clearly, I’ve created a little more technical and descriptive diagram below. The new diagram shows, correctly, that the distance line (containing the 5000′ and 20” distance markings) is parallel to the line connecting the observer’s left eye to the barn’s new location. That’s it. That’s the error 🙂 It may seem trivial, and it actually is, but I couldn’t help noticing it, especially since apparently no one has commented about it, and some people I know who should have noticed it, didn’t. 🙂 The original diagram shows the left-eye-new-barn-location line to be non-parallel to the distance line, which is wrong, and which quickly caught my skeptical eye. Basic geometry will tell you that my new diagram below is the more correct one.

wp-blog-post-estimating distances 2009-09-13

Assumptions Which Were Left Out

The assumptions which the article does not mention include:

  1. One knows a relatively precise measurement of the object’s width, or that one should know a good deal about the object’s width before attempting to estimate distance with this technique. To see how this can become a problem if not entirely taken into consideration, suppose you estimated or falsely remembered that the barn was 400ft instead of 500ft. That would translate to your estimated distance of 4000ft, which is 1000ft shorter than the correct 5000ft! 🙂 You’d then get a nasty surprise since you left out 1000ft. In other words, since the ratio of the object’s width to the distance between it and you is 10, your width estimation errors (again, could be from wrong estimation or remembrance of the object’s width) get translated to a distance error multiplied by 10.
  2. The topography of the terrain. This technique assumes or works best in a plain, since if you were say in a hilly or mountainous region, the distance you’ll get from this technique is the straight line distance from you to the object. But it does not take into consideration the slope, nor the crests or troughs of the land. You may get a distance of 1000ft between you and the object, but if there are hills and such between you and the object, you know it will be more than 1000ft. 🙂

Gracias a mis amigos Rudolf y Aaron. Thanks to my friends Rudolf and Aaron for their quick help in confirming this error, since I wanted to be triply sure. 🙂

Shakespeare and programming

December 10, 2008

A great playwright and poet once wrote in his play Hamlet (and that great poet and playwright of course is none other than Shakespeare)  the following question from act three, scene one:

To be or not to be, that is the question;

Putting it into a more geeky format I have the following translation:

2B OR NOT 2B

Which sort of turns the question into a logical statement. Tidying it up a little further and noting the unary and binary operators in the statement, as well as the operator precedence, and further clarifying its (geeky) nature I have:

0x2B OR (NOT 0x2B)

And so I arrive at an answer to the question in Hamlet’s soliloquy:

0x2B OR (NOT 0x2B) = 0xFF

The answer turns out to be pretty simple and not so philosophical and deep! 😀 If you don’t know why my answer to the famous question is 0xFF, keep on guessing! 😀

(I’m feeling geekier than usual tonight, so there you go)

UUIDs, Linux devices, and fstab

November 8, 2008

The Dilemma

I upgraded one of my Ubuntu servers from Hardy Heron (version 8.04 LTS) to Intrepid Ibex (version 8.10). After I rebooted my machine after upgrading my distribution, I noticed that apparently, 8.10 (or at least the kernel used by it initially, 2.6.27-7-generic) fully masks my attached Segate IDE and SATA drives as SCSI drives. My old fstab entries which used IDE raw device names such as /dev/hda1 were no longer relevant. As such, my /home directory had my non-/home SATA hard drive partition mounted on it, for example. I realized ( I don’t know why just now) that using raw device names (e.g. /dev/hda or even /dev/sda) for my mounted drives was a pain in the neck, not only because Ubuntu or the Linux kernel may change sooner rather than later on how to scan, load, mount storage devices. Rather, what is more appropriate is to use the UUIDs of my devices.

Do You UUID?

UUID or universally unique identifier is used around a lot in the tech/computer world these days, e.g. in MAC addresses. It’s basically a 128-bit number or 2128 or approximately 3.4 × 1038, which is a very large number. To put it in perspective, if you would produce oner UUID for every second of every hour of every day, for 365 days a year, you would still need approximately 1 × 1031 years, that’s a 1 with 30 zeros behind it. Now that’s a long time :D. So for now UUIDs are pretty unique, wouldn’t you agree?

Anyway, to get your hard drive’s UUID (whether it’s IDE or SCSI), use either the /dev directory

$ ls -l /dev/disk/by-uuid

to see your devices’ UUIDs. Mine gives

$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 46483822-17f9-408b-a3e2-aad688f8380d -> ../../sdd2
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 47AB-8F94 -> ../../sdd1
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 4c05ec57-4171-42c3-b932-f721edc45f15 -> ../../sdd3
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 533bef31-8157-4097-895b-e20217fb90a5 -> ../../sda1
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 5e4cab82-808e-43ec-99a6-bb1a6d7f4efd -> ../../sdc3
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 668cbb68-36a7-4454-bd50-7056f1658a2a -> ../../sdb2
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 71e7e7df-cff4-42ae-a0ec-dddcc6a4dacb -> ../../sdb1
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 b9c011df-1882-4d4c-b215-00ddd7b9bfe0 -> ../../sda3
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 BBF7-94B5 -> ../../sdc1
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 c33271e6-5c7a-406d-a87f-84d9b2d0c196 -> ../../sdc2
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 c3ec0a22-04e8-4735-b6c8-b20e95c2b5a3 -> ../../sda5
lrwxrwxrwx 1 root root 10 2008-11-06 20:28 fdd0b195-0313-4af7-bbbe-9eb1bed89a64 -> ../../sda2

Since I have 4 hard drives and several partitions on those hard drives on my server. The other way to get UUIDs is to use the blkid tool:

$ blkid /dev/sda1
/dev/sda1: UUID=”533bef31-8157-4097-895b-e20217fb90a5″ TYPE=”ext3″

UUIDs come in handy when you want to mount certain plug-and-play or hot-swappable disks onto your machine, and you want to customize the response of your Linux box via /etc/fstab. As for me, UUIDs are very important so I don’t have to depend on raw device names anymore. Instead, I just use my devices’ UUIDs so even if I disconnect and connect them again (assuming I don’t format my hard drives/partitions or intentionally change the assigned UUID Ubuntu assigned to them), I basically get the flexibility that I need.

My previous /etc/fstab looked like this:

UUID=fdd0b195-0313-4af7-bbbe-9eb1bed89a64 /home           ext3    defaults        0       2
# /dev/hda3
UUID=b9c011df-1882-4d4c-b215-00ddd7b9bfe0 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec 0       0
/dev/hda5       /media/hda5     ext3    defaults        0       2
/dev/sda1       /media/sda1     ntfs-3g uid=1000,umask=007      0       2
/dev/sda2       /media/sda2     ext3    defaults        0       2
/dev/sdc1       /media/sdc1     vfat    uid=1000,umask=007      0       1
/dev/sdc2       /media/sdc2     ext3    defaults        0       2
/dev/sdc3       /media/sdc3     reiserfs        defaults        0       2
/dev/sdb3       /media/sdb3     ext3    defaults        0       2
/dev/sdb1       /media/sdb1     vfat    uid=1000,umask=007      0       1

Now it looks like this (exactly the same hard drive/partition set up):

UUID=fdd0b195-0313-4af7-bbbe-9eb1bed89a64 /home           ext3    defaults,relatime        0       2
# /dev/hda3
UUID=b9c011df-1882-4d4c-b215-00ddd7b9bfe0 none            swap    sw              0       0
#/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec 0       0
UUID=c3ec0a22-04e8-4735-b6c8-b20e95c2b5a3       /media/hda5     ext3    defaults,relatime       0       2
UUID=71e7e7df-cff4-42ae-a0ec-dddcc6a4dacb       /media/sda1     ext3    defaults,relatime       0       2
UUID=71e7e7df-cff4-42ae-a0ec-dddcc6a4dacb       /media/sda2     ext3    defaults,relatime       0       2
UUID=47AB-8F94  /media/sdc1     vfat    defaults        0       2
UUID=46483822-17f9-408b-a3e2-aad688f8380d       /media/sdc2     ext3    defaults,relatime       0       2
UUID=4c05ec57-4171-42c3-b932-f721edc45f15       /media/sdc3     reiserfs        defaults        0       2
UUID=5e4cab82-808e-43ec-99a6-bb1a6d7f4efd       /media/sdb3     ext3    defaults,relatime       0       2
UUID=BBF7-94B5  /media/sdb1     vfat    uid=1000,umask=007      0       1

Now isn’t that prettier? 😀

I just removed the old raw device names and replaced them with the appropriate UUID (e.g. /dev/hda5 is equal to UUID=c3ec0a22-04e8-4735-b6c8-b20e95c2b5a3 ) , and I didn’t have to change the directory where they should be mounted (my /dev/hda5 is mounted at /media/hda5), saving me a lot of time and effort, since I don’t have to update a lot of things dependent on the directory/path where my hard drives are mounted.

Further Reading

* More info on UUIDs and on administration

* The Linux Documentation Project on Linux devices (IDE/SCSI)


Stephen Hawking, Theory of Everything, and Goedel’s Incompleteness theorem

April 13, 2008

This post has the following readability test scores:

Flesch Reading Ease: 63.63
Flesch-Kincaid Grade Level: 8.00
Automated Readability Index: 9.00

For more info about readability tests, check out my post about those here.

Whew, it’s been a while since my last post. Work and a project (during and continuing till after the end of a semester) kept me really busy.

Anyway, this post is about the webpage containing prof. Stephen Hawking’s talk about his latest (AFAIK) stand on the search for the theory of everything, how Kurt Goedel’s incompleteness theorem/s influenced his opinion/view.

The speech in text format (1st reference link below), as you may immediately notice, is quite messy and seems to be unedited. I think that the speech laid out in the web page was just a speech-to-text conversion of prof. Hawking’s speech, which by the way you can download, so you can listen to his very iconic “electronic” voice. This speech-to-text conversion is quite evident I think since the starting letter of each sentence is not capitalized, and difficult words (at least for an American English speech-to-text program) such as Laplace (for the French mathematician) turn out to be spelled as Le-plass, which is what you would most probably get if you spoke into a speech-to-text synthesizer just like prof. Hawking’s.

As you may well know, a theory of everything (ToE) in physics aims to unify the four basic forces in the known universe, and which can, in theory, be used to predict anything that ever happened or will happen in the universe. My previous weblog post further clarifies this theory, or the search for it. I found the 1st reference link below when I Googled for “Stephen Hawking Theory of Everything”, hoping that I would be further enlightened about how the man labelled as “the brightest theoretical physicist since Albert Einstein” is going about searching for the ToE. I never expected that he would give up, in a sense, which for a while made me feel uncomfortable, though the feeling eventually disappeared. What made me feel uncomfortable was not because the universe is full of uncertainty and randomness we can’t explain (or at least not yet for some). What made me feel uncomfortable was that the man who so passionately sought for the ToE from his books and studies in the 70s and 80s (an example is the 2nd reference link below) has given up the search for the ToE.

But as I re-read the speech, Goedel’s incompleteness theorem hits the point in between the eyes. The great professor starts out (as he usually does) by discussing briefly the ideas that will prove to be necessary for his lecture’s whole point, including Quantum Chromodynamics (QCD), scientific determinism, Newton’s gravitational law, wave functions, etc. This is a style which I think he is famous for, and which is why his lectures are very popular and well sought after. His funny and comical inserts pop out once in a while to stir things a little bit.

Essentially, the gist of his lecture (as it would seem to me) is that there cannot be a single ToE, one which, as I’ve mentioned previously, will let us know what exactly happened at a specific point in our universe’s history, or what will happen to its future. The ToE should be able to tell you what you were thinking last night, or what you will think tomorrow night. Yes, the ToE is the theory of all theories. The problem however is that the human brain, as prof. Hawking puts it, is composed of so many parts made up of so many particles that we couldn’t possible compute what you’ll be thinking the next minute, even with the most powerful computers in the world today.

Prof. Hawking admits that until he realized the implication of Goedel’s incompleteness theorem, he implicitly assumed that a ToE will be found, probably relying on what can be referred to as “scientific intuition”. According to prof. Hawking, the positivist philosophy of science is that every good physical theory is a mathematical model, which he probably gets from Karl Popper and other positivist thinkers. And since, according to Goedel’s incompleteness theorems, there are mathematical results that cannot be proven, then so must there be physical theories that cannot be proven as well, including the ToE. Goedel’s incompleteness theorems essentially say that, as mentioned by prof. Hawkings himself, math is either inconsistent or incomplete. The professor bets his money (as he did in a previous debate with Kip Thorne decades ago) on the incomplete part of mathematics. Goedel’s theorems are proved using self-referring statements such as

“This sentence is false”

If the statement is true, then (the idea it implies) it is thus false. If the statement is false, then it is the opposite, meaning the idea the statement implies is true. Another would be to apply Bertrand Russell’s paradox on the barber paradox:

In a town which has a rule that the (only) barber shaves only all men that do not shave themselves, and doesn’t shave those who shave themselves. One can then ask, does the barber shave himself? If he does, according to the rule, he shouldn’t. If he doesn’t shave, according to the rule, he must shave himself.

Lastly, prof. Hawkings apologizes if anybody got/gets disappointed on his current view about the ToE. As I’ve said, I was initially disappointed, but considering his rationale about the search for the ToE, I turn out to be fine, though I still think he still leaves room in himself in case he makes a wrong prediction (just as he did in the 2nd reference link) that we might find the ToE in this decade. In his lecture in the 1980s regarding the discovery of the ToE, he said that we may find the ToE, and he’ll give another lecture about the ToE and where we stand 20 years later (which is now). Well, he did tell us where we stand, or at least what his view of where we stand in the search for the ToE. He also said then that once the ToE is found, physicists will lose their jobs, and physics will end. But according to his latest lecture, thanks to Goedel, mathematicians he said will always have a job, and most probably physicists too.

References:

How readable are you?

March 18, 2008

This post has the following scores:

Flesch Reading Ease: 60.74
Flesch-Kincaid Grade Level: 6.00
Automated Readability Index: 6.00

“What in the world are these?” you might ask? Read on.

This post is all about readability tests, some of which I recently discovered and re-discovered.

There are numerous readability tests available, some of the more familiar (at least to me and what I’ve read so far) are:

  • SMOG (Simple Measure Of Gobbledygook)
  • Flesch-Kincaid Readability Test
  • Fry Readability Formula
  • Automated Readability Index (ARI)
  • Gunning-Fog Index

And the ones which I’ll be focusing more here are Flesch-Kincaid Grade Level (FKGL), Flesch Reading ease (FRE) and ARI, since they’re the ones used by Internet search giant Google in their Google Documents. Readability tests are really mathematical in nature in that they use predetermined constants to give a readability ‘grade’ to a particular work. Note that there are differences among the 3 (FKGL, FRE, ARI) and having a very readable grade with one test doesn’t necessarily mean it will also have a good readable score on the other two. The first two tests were developed by Rudolf Flesch, an author and a readability expert. The U.S. Department of Education has the following education levels with their corresponding age brackets:

Elementary School
Pre-Kindergarten 4-5
Kindergarten 5-6
1st Grade 6–7
2nd Grade 7–8
3rd Grade 8–9
4th Grade 9–10
5th Grade 10–11
Middle school
6th Grade 11–12
7th Grade 12–13
8th Grade 13–14
High school
9th Grade (Freshman) 14-15
10th Grade (Sophomore) 15-16
11th Grade (Junior) 16-17
12th Grade (Senior) 17–18

Test Rules

In acquiring the number of words, sentences, etc. in your work, here are the rules to be followed: periods, exclamation points, question marks, colons, and semi-colons are considered end-of-sentence marks. Each group of continuous non-whitespace characters counts as a word. Each vowel in a word counts as one syllable subject to the following sub-rules: Ignore final -ES, -ED, -E (except for -LE)
Words of three letters or less count as one syllable. Consecutive vowels count as one syllable. Although there are many exceptions to these rules, it works in a remarkable number of cases.

FKGL

This test tells you what the minimum educational attainment is necessary for a reader to comprehend your work, and is based on the educational grade level of the U.S. For example, a grade of 9 means that the reader has to be at least a 9th grader (or has a 9th grader’s education/supposed intellect) in order to comprehend your work. Or if you get a grade of 9.8, the minimum educational attainment is the floor of that value, which is 9 or the 9th grade still. To calculate your work’s FKGL grade level, the formula is as follows:

FKGL = [ (.39 x ASL) + (11.8 x ASW) – 15.59 ]

where:

ASL = average sentence length (total number of words divided by total number of sentences)

ASW = average number of syllables per word (total number of syllables divided by total number of words)

FRE

For this test, the higher a score you get, the easier it is to read your work, and is based on a 100-point scale. The formula for FRE is as follows:

FRE grade = [ 206.835 – (1.015 x ASL) – (84.6 x ASW) ]

where ASL and ASW are the same as the ones above.

ARI

ARI unlike the former two, is based on the number of characters per word. ARI is also based on the U.S. grade level like the other two above. This test is usually less palatable to readability test critics, but it is the easiest one to implement on computer programs since all the program has to do is count the characters instead of syllables. The formula is:

Grade Level = (4.71 x TCW) + (0.5 x TWS) – 21.43

where

TCW = Total number of characters divided by the total number of words

TWS = Total number of words divided by total number of sentences


Implementation/Testing the Tests

For the sample sentence “Hello World!”, Google Document (when viewing your document, click File > Word count…) gives the following grades:

Counts
Words: 2
Characters (no spaces): 11
Characters (with spaces): 12
Paragraphs: 1
Sentences: 1
Pages (approximate): 1

Readability
Average sentences per paragraph: 1.00
Average words per sentence: 2.00
Average characters per word: 5.50
Average words per page: 2.00
Flesch Reading Ease: 77.91
Flesch-Kincaid Grade Level: 3.00
Automated Readability Index: 5.00

Which is what you’d get if you count the words, syllables, sentences etc. and manually solve the grade levels from the formulas given above.

Lewis Carroll’s famous poem Jabberwocky in the famous children’s story Through the Looking-Glass and what Alice found there get the following score:

Flesch Reading Ease: 91.89
Flesch-Kincaid Grade Level: 1.00
Automated Readability Index: 2.00

Very readable and highly suitable for children it would seem. What’s a bit surprising is that the poem even has a lower score than the sentence “Hello World!”, making the poem easier to read?

As for the New York Times book review of The God Delusion, the review gets these grades/scores:

Flesch Reading Ease: 57.98
Flesch-Kincaid Grade Level: 8.00
Automated Readability Index: 8.00

Pros of Readability Tests

The original reason for implementing the above mentioned tests was to give teachers, librarians, etc. an overview of the apparent reading difficulty level of a given work. The acquired test grades or scores will then allow them (teachers, librarians, etc.) to choose appropriate materials for a specific group of individual’s age/educational background/attainment. At a glance this reason would seem quite reasonable to many of us, especially if we’re not really familiar with the implications of the rules and the formulas, as well as the entire written work that is being graded or scored.

Cons of Readability Tests

Also, at a glance, especially among people familiar with the tests and their limitations, readability tests are of little or no use at all some times. This uselessness is still subjective, after all, what may be intelligible to a group of people, may be absolutely understandable to others. The obvious (and most wide-spread) criticism of readability tests is that they only test the “surface” or the physical layout of the work. Readability tests gives little (at best) to none at all (at worst) information on the meanings being conveyed by the work, the grammatical structure, as well as the different biases, nuances, and between-the-line impressions or expressions of the author. One could’ve easily written “World Hello!” and the 3 scores for that sentence are identical to the scores of the sentence “Hello World!”.

In conclusion, I think people should be wary when placing readability test results on their works, or when seeing some else’s readability test scores. These scores can easily help clarify or more often times mystify the reader about the true readability of a work. People should not immediately believe what they see, and always keep a skeptical eye on notions as a readability scores of written works. Are readability tests useless in my opinion? I don’t think so. They still have some uses such as when, assuming the writer is well versed in writing or communicating his/her thoughts on paper/documents, then these tests provide a very helpful glimpse as to what audience might be able to appreciate the work.

References:

* A computer algorithm to acquire Flesch-tests related information, including the adapted rules mentioned above, http://portal.acm.org/citation.cfm?id=10583&dl=ACM&coll=GUIDE

* free FKGL, FRE, and ARI test scores for your documents, http://docs.google.com/

* More on readability tests, http://csep.psyc.memphis.edu/cohmetrix/readabilityresearch.htm

* Flesch Reading Ease table, http://www.utexas.edu/research/accessibility/resource/readability/manual/forcast-versus-flesch-English.html

* Lewis Carroll’s poem, Jabberworcky, http://www.jabberwocky.com/carroll/jabber/jabberwocky.html

* New York Times book review of The God Delusion, http://www.nytimes.com/2006/10/22/books/review/Holt.t.html

* A concise but less precise (in terms of citation) source for readability tests, http://en.wikipedia.org/wiki/Readability_test

* More info on mr. Flesch, http://en.wikipedia.org/wiki/Rudolf_Flesch

* A concise but less precise (in terms of citation) source for mr. Flesch’s tests, http://en.wikipedia.org/wiki/Flesch-Kincaid_Readability_Test

* U.S. education levelling, http://en.wikipedia.org/wiki/U.S._grade_level#School_grades

Reflections of the implications of the Pigeonhole principle in our lives

February 17, 2008

Readability test scores for this post are as follows:

Flesch Reading Ease: 70.52
Flesch-Kincaid Grade Level: 7.00
Automated Readability Index: 7.00

For more info about readability tests, check out my post about those here.

Math is fun in my opinion. It has, for the longest time, including Science, been my favorite subject.

Anyway, this post is about a portion of mathematics which is more popularly known as the pigeon hole principle. The pigeonhole principle states that, given k+1 or more objects (k being any positive integer) which are to be placed on k number of holes, there is at least one hole which will contain two or more of the objects. Or to generalize the definition in a mathematical way:

if M objects are placed into j holes, M greater than or equal to j, then there is at least one hole containing at least k number of objects, where k is equal to the ceiling( M / j ) .

For example, if I have 12 pigeons to be placed into 11 pigeonholes, there will be at least one pigeonhole which will have 2 pigeons inside. This is so because the ceiling value k, the smallest integer value not less than (M / j) , is 2 since 12 divided by 11 is approximately 1.09 whose ceiling value k is equal to 2

“So what?”

you may say. What would possibly be in the pigeonhole principle that could interest me? Well, a lot actually, same as a lot of other seemingly ‘impractical’ mathematical theories for our every day lives.

1 If we take the upper limit on the average number of hair on the human head (nice alliteration) to be about 150,000, and say a given city has a population size of 500,000, there would be at least 4 people with the same number of hair on their heads. This happened because taking the population size (500,000) as the pigeons and the maximum possible number of hair on the human head (150,000) as the pigeonholes, k is found to be equal to 4. Isn’t that amazing to know? (okay sorry, I know not everyone will find that interesting).

2 Take a pizza party for example: If I were to treat four of my friends so that the five of us will eat a pizza pie of 12 slices, at least one among us will be eating 3 pizzas, while the rest only eat 2. This assumes of course that everyone eats a whole slice of pizza. Now isn’t that worth knowing at times like this? (^)__(^)

3 Another example is when you want to get say, candies from those vending machines which shows you their contents but you can’t pick any flavor in particular (i.e. the machine gives the candy to you at random). Say you can see that there are only two candy flavors left: orange and lemon, and there are 12 of each. You will know (using the pigeonhole principle) that you can get at least 2 candies of the same flavor for sure by buying (not 13 candies) at least 3 candies only! This is because in the event that the first 2 candies you get are of different flavors, you know for certain that the third one will be one of the 2 flavors, giving you at least 2 candies of the same flavor!

However, if you want at least 2 of a specific flavor, say, lemon flavor, it becomes a bit different: you need to get at least 14 candies to be sure that you get 2 lemon flavored candies.

4 Say you have a shop/store with (doesn’t have to be the exact number, since using the principle will still give you the correct answer) 50 aisles, 85 horizontal locations on each aisle, and 5 shelves. The products you sell are stored in bins on horizontal locations on the shelves of each aisle. What is the least number of products you would buy to ensure that at least 2 products are stored in the same bin? That is, based on the above definition, what should be M so that for j = 85 x 50 x 5 = 21250, k = 2 ? Surely enough, M would be equal to 21251 since taking the ceiling of 21251 / 21250 would be equal to 2.

5 If you collect/put together 13 people randomly (or even purposefully), by the pigeonhole principle, there are at least 2 people (pigeons) from that group who were born on the same month, since there are only 12 months (pigeonholes). And, much more obvious, is that among a group of 8 people (randomly/non-randomly chosen), at least two among them were born on the same day.

The important thing to remember here is to figure out which among the objects you’re dealing with is the pigeon and which is the pigeonhole.

There you go! There are tons more of examples on the daily applications of the pigeonhole principle, from computer networks, to train stations, to supermarkets, to art classes, etc. Anybody disagrees with me? (^)__(^)

Btw, comments/suggestions/questions/corrections are welcome, as long as they come in a calm and ruly way.