The Spectre of Math

December 3, 2014

Grossly violating elections

Filed under: Politics — jlebl @ 5:07 pm

Russia reports gross violations in Moldova elections [1].  And Russia knows all about grossly violating elections…

November 26, 2014

Law of large numbers: idiots, monkeys, CEOs, politicians, and nuclear war

Filed under: Economics,Mathematics,Politics — jlebl @ 1:26 am

Something that seems to be ignored by many people is the law of large numbers.  Suppose you take an action that has 99% rate of success.  That’s 1% chance failure.  Tiny!  Well do it enough times, and failures will happen.  Given enough candidates with 1% chance of winning, one of them will win.  Then everybody is surprised (but shouldn’t be).  Suppose that in the 435 seats for congress, there were all candidates that according to polls had 99% chance to win, and there was always a second candidate with 1% chance of winning.  I would expect 4or 5 of the underdogs to win.  If they didn’t we were wrong about the 99%.

Or how about entrepreneurs.  Suppose you take 100 idiots.  They each get a totally whacky idea for a new business that has 1% chance of success.  One of them will likely succeed.  Was it because he was smart?  No, there was enough idiots.  We should not overvalue success if we do not know how many other similar people failed, and how likely was success.  What if you have a person who started two businesses that had 1% chance of success.  Was that person a genius?  Or did you just have 10000 idiots.  You have surely heard that giving typewriters to monkeys will eventually (if you have enough monkeys and time) will produce works of Shakespeare.  Does this mean that Shakespeare was a monkey?  No.  There weren’t enough idiots (or monkeys) trying.  Plus the odds of typing random sentences, even if they are grammatically correct, and ending up with something as good as Shakespeare are astronomically low.  Shakespeare was with a very very very high degree of confidence not a monkey.  I can’t say the same for Steve Jobs.  The chance of Jobs having been a monkey are still somewhat smaller than your general successful CEO.  Think of the really important decisions that a CEO has to make, there aren’t that many.  If we simplified the situation and went simply with yes/no decisions on strategic things, there are a few in the lifetime of a company.  Most decisions are irrelevant to the success, and they even out: make a lot of decisions that make a small relative change and you will likely be where you started (again law of large numbers).  But there are a few that can make or break a company.  Given how many companies go bust, clearly there are many many CEOs making the wrong make or break decisions.  So just because you hired a CEO and he made a decision to focus on a certain product and drop everything else, and you made it big.  Does it mean your CEO was a genius?  Flipping a coin then gives you 50% chance of success too.

Same with stock traders.  Look and you will find traders whose last 10 bets were huge successes.  Does it mean that they are geniuses?  Or does it simply there are lots of stock traders that make fairly random decisions and some of them thus must be successful.  If there are enough of them, there will be some whose last 10 bets were good.  If it was 10 yes/no decisions, then you just need 1024 idiots for one of them to get all of them right.  They don’t have to know anything.  Let’s take a different example, suppose you find someone that out of a pool of 100 stocks has for the last 3 years picked the most successful one each year.  This person can be a total and complete idiot as long as there were a million people making those choices.  The chance of that person picking the right stock this year is most likely 1 in 100.  Don’t believe people trying to sell you their surefire way to predict the stockmarket, even if they are not lying about their past success.

OK.  More serious example of law of large numbers: Suppose your country does a military operation that has 99% chance of success and 1% chance of doom to your country.  Suppose your country keeps doing this.  Each time, it seems it is completely safe.  Yet, eventually, your country will lose.  You start enough wars, even with overwhelming odds.  Your luck will run out.  Statistically that’s a sure thing.  If you want your country to be around in 100 years, do not do things that have even an ever so tiny chance of backfiring and dooming that country to failure.  You can probably guess which (rather longish) list of countries that I am thinking of, which with good odds won’t be here in 100, 200, or 500 years.

Let’s end on a positive note:  With essentially 100% probability humankind will eventually destroy itself with nuclear (or other similarly destructive) weapons.  There seem to be conflicts arising every few decades that have a chance of deteriorating into nuclear war.  Small chance, but positive.  Since that seems likely to me to repeat itself over and over, eventually one of those nuclear wars will start.  It can’t quite be 100%, since there is a chance that we will all die in some apocalyptic natural disaster (possibly of our own making) rather than nuclear war.  Since there is also a small chance that everybody on earth gets a heart attack at the same exact time.  Even if we make sure we don’t do anything else dangerous (such as nuclear weapons), civilization will end one day with a massive concurrent heart attack.

August 9, 2014

Numbers again

Filed under: Politics — jlebl @ 4:43 pm

I like to get fake enraged when people get caught up in very silly misunderstanding of numbers. And often this misunderstanding is used by politicians, extremists, and others to manipulate those people.

The most recent and prominent example is the Israel-Gaza conflict. The story is that Hamas rockets are endangering Israeli lives. OK, yes they do, but you have to always look at the scale. Since 2001 (so in the last 13 years), there have been 40 deaths in Israel from Gaza cross border rocket and mortar fire [1]. 13 of those are Soldiers, and one could make the case that those were military targets, but let’s ignore that and count 40. Of those fatalities, 23 happened during one of the operations designed to remove the rocket threat. One could argue (though I won’t, there won’t be a need) that without those operations, only 17 Israelis would have died.

OK, so 40 people in 13 years. That’s approximately 3 deaths per year. When I recently read an article about toxicity of mushrooms [2], the person being interviewed (the toxicologists) made an argument that mushroom picking in Czech is not dangerous, only 2-3 deaths per year (and vast majority of Czechs will go mushroom picking every year, even we do when we’re over there, it’s a Czech thing). Clearly it is not enough to worry the toxicologists. And Czech is about the same size as Israel in terms of population.

When my granddad (a nuclear physicist) with his team computed the number of new cancers due to Chernobyl in Czech after the disaster, they predicted 200 a year. Trouble was they couldn’t verify it, because 200 a year gets hidden in the noise. In a country of 10 million, if we take 80 year lifespan, 125000 people will die every year of various causes, a large proportion of them to cancer (many of them preventable cancer that the state does not try to prevent since it would mean unpopular policies). So 3 deaths a year is completely lost in the noise. So if Israel would spend the money it spends on fighting Hamas, even if we buy into the propaganda that this will defeat Hamas, if it would spend the money on an anti-smoking campaign, it would likely save far more Israeli lives every year.

Another statistic to look at is car accidents: In Israel approximately 263 people died on the road in one year. So your chances of dying in a car accident are almost 100 times larger. In fact, death by lighting in the US average at 51 per year [4]. Rescaling to Israel (I could not find Israel numbers) you get about 1.4 a year. That’s only slightly less than what Hamas kills in a year. In fact it’s about how many civilians they kill. So your chances as an Israeli civilian of being killed by a rocket or mortar are about the same as being killed by lightning. Not being struck by lightning by the way, because only 1 in 5 (approximately) of those struck die. So your chances of being struck by lightning are bigger, let’s say approx 6-7 people in Israel will get struck by lightning every year.

An argument could be made that most Israelis killed were in Sderot (I count 8), so your chances of being killed there are bigger (and correspondingly, your chances of being killed by a Hamas rocket based on current data if you are in say Tel Aviv are zero). Anyway, 8 in 13 years is about 0.6 a year in Sderot. Rescaling (based on population) the car deaths to estimate the number of deaths per year in Sderot we get approximately 0.8 deaths per year in Sderot. So your chances of dying in a car crash are higher, even if you live in Sderot (your chances of dying from cancer are much much higher).

The politicians supporting Israel’s actions often don’t worry about logical contradictions stemming from the above facts. When Bloomberg visited Israel he lambasted the fact that some airlines stopped flying to Tel-Aviv on rocket fears. He said that he never felt safer there. Well, if he never felt safer, why is Gaza being bombed?

None of this in any way is an apology for Hamas. Hamas is a terrorist organization that aims to kill civilians. But Hamas is almost comically incompetent at doing so. If it weren’t a sad thing, we ought to laugh at Hamas. Anyway, clearly an incompetent murderer is till a murderer if he manages to kill even one person. The question is, what lengths should you go to to apprehend him.

Now the costs. Gaza has 1.8 million people. One should expect about 20-30 thousand natural deaths per year. This year, Israel kills 2000 Gazans. So very approximately about 1 in 10 to 1 in 15 Gazans that dies this year will die at Israel’s hands. Now think what that does to the ability of Hamas, or even far more radical groups to recruit. My grandmother grew up in the post WWII years, so she has not lived through WWII as an adult, yet she harbored deep hatred of all Germans. This was common in Europe. People used to hate each other, and then every once in a while they would attempt to kill each other. If you are on the receiving side of the killing (and only your relatives get killed), you are very likely to have this deep hatred that could very well be used by extremists (think back to the Balkans and especially Bosnia). It takes generations to get rid of it. I don’t resent the Poles or the Ukrainians even though I had Galitian Jewish ancestors that probably had no love for either. But 70 years ago, these three groups managed to literally destroy the whole region by killing each other (well the Germans and Russians helped greatly in the endeavor). There is probably very few people in the region whose family actually comes from there.

The point is, that the cost of the operation, besides the moral outrage of killing thousands of people, is pushing back the date that Israel can live in peace with its neighbors.

Another cost to Israel is the rise of anti-semitism. Just like violent actions by muslim extremists created a wave of anti-muslim sentiment in the West, violent acts by Israel will only strenghten anti-semitic forces. You are giving them perfect recruiting stories. If they had any doubts, they don’t have them now. Maybe as a positive aspect, it will justify Israeli contention that hatred of Israel is based on anti-semitism, since by creating anti-semitic sentiment, yes, more of it will be. The fact that the deputy speaker of parliament in Israel calls for conquest of Gaza are forcefully removing the Gazans into “tent camps” and them out of Israel [5], does not help. Maybe he should have called it “final solution” to the problem. Surely there would be no problem with that phrase.

Another thing about numbers is that Israel depends on America giving it cover (and weapons). Israel does not realize that american opinion is shifting (in part due to its own actions, in part since these things always shift in time). See [6]. Basically once the young of today will be the older folks of tomorrow, Israel won’t be seen the way it is now. It might be that US will also shift towards some other group as being important in american politics. Given the growth in the Latino population, it should be clear that Israel will at some point stop being the priority for many politicians. Given that we will also approach the world oil peak, and that us oil will once again start running out once we’ve fracked out what we could frack out, oil will become again more important. And Israel does not have oil. Israel is religiously important, but recall that Americans are mostly protestant Christians, not Jews, so it’s not clear where that will go (looking at history of that relationship is not very encouraging). A large percentage of Americans thinks the world is only a few thousand years old and the end of times will come within their lifetime and the battle of Armageddon will come, and blah blah blah. Who knows what that does to long term foreign policy.

Remember I am talking about decades not years. One should worry about what happens in 20, 30, 40 years. You know, many of us will still be around then, so even from a very selfish perspective, one should plan 40 years ahead. Let alone if one is not a selfish bastard.

Then finally there is this moral thing about killing others … Let’s not get into morals of the situation, that’s seriously f@#ked up.

[1] http://mondoweiss.net/2014/07/rocket-deaths-israel.html
[2] http://www.lidovky.cz/muchomurku-cervenou-fasovali-vojaci-v-bitvach-misto-alkoholu-p63-/media.aspx?c=A140807_154055_ln-media_sho
[3] http://en.wikipedia.org/wiki/List_of_countries_by_traffic-related_death_rate
[4] http://www.lightningsafety.noaa.gov/fatalities.htm
[5] http://www.dailymail.co.uk/news/article-2715466/Israeli-official-calls-concentration-camps-Gaza-conquest-entire-Gaza-Strip-annihilation-fighting-forces-supporters.html
[6] http://www.mintpressnews.com/latest-gallup-poll-shows-young-americans-overwhelmingly-support-palestine/194856/

July 24, 2014

News …

Filed under: Politics — jlebl @ 4:29 pm

Interesting reading and comparison of news regarding Ukraine and Gaza. So apparently according to Russian media, people in the west have bad opinion of Russia only because the west has had a long lived fascist hatred of Russians. According to Israeli media, the rest of the world (except US) has a low opinion of Israel only because they are all anti-Semite.  It can’t be because anything we do or say, because we are perfect: even our farts do not smell [citation needed].

Rather interestingly [1], fewer (almost by half) Russians view Israel negatively percentagewise than do Americans.  So Americans are almost twice as anti-Semitic as Russians (this might be news to Jews living in Russia).

If negative opinion of a country was purely based on racism, then it means that racists are able to distinguish between for example North and South Koreans. Also South Koreans are really really racist, and they really really irrationally hate the North Koreans. Essentially as much as Egyptians irrationally hate Israelis. By the way notice that the survey asked if the country (not its people) has a positive influence on the world, but we are assuming I guess (at least in Russian and Israeli media) that nobody can tell the difference between the country and its citizens.

Also the French and the Germans seem to really really love each other. I mean … get a room you two. I mean the French and the Germans have always liked each other. Good thing the survey did not ask about Belgians, because those guys are terrible, we all hate the Belgians.

An interesting piece of information from that study is that Nigerians pretty much have a positive view of the world. Most countries they overwhelmingly love. And even Israel and North Korea manage to get over half of Nigerians to like them. They aren’t too crazy about Iranians and Pakistanis, but it’s not too bad either.

It must be wonderful to live in the world of simple explanations that always seem to indicate that the group you belong to is somehow superior to others, and others simply hate you because you are so good. I think we had a word for that …

[1] http://www.globescan.com/images/images/pressreleases/bbc2012_country_ratings/2012_bbc_country%20rating%20final%20080512.pdf

April 16, 2014

Putin vs. Godwin

Filed under: Politics — jlebl @ 5:18 am

I call Godwin’s law on Russia.  So, by the rules of Usenet, Russia has lost the argument.

I think the security council should adopt Godwin’s law.  Any time you call anyone a Nazi during an argument, you lose your veto power for that issue.

February 27, 2014

Numbers

Filed under: Economics,Politics — jlebl @ 12:43 am

When reading news, one should do some quick calculations to test for ridiculousness.  It really makes reading news far funnier.  Let us look at the 19 billion dollar deal where Facebook bought WhatsApp.  It is especially hilarious if we interpret this as how much do we as a society value WhatsApp versus some other things.  These are based on just quick googling, but they are for just eyeballing the thing, not to be taken exactly.

1) Minimum wage hike.  There are about 3.6 million people at or below mimimum wage [1] (2012 data).  If we suppose that they would work 250 days a year for 8 hours a day, the current $2.85 proposed hike ($10.10-$7.25) would amount to 2.85 \times 8 \times 250 \times 3,600,000 = 20,520,000,000.   So about the same.  Facebook could have paid everyone on minimum wage the hike for a year.  But of course I’ve overestimated I doubt everyone on minimum wage works 8 hours a day 5 days a week.

2) NASA budget is about 16 billion in 2013 [2].  So WhatsApp is actually worth more than all that NASA does in a year.

3) Nominal GDP [3].  Czech Republic is about $196 billion.  Ten WhatsApps is the GDP of the whole country of 10 million people (where WhatsApp has 55 employees, so 10 of them have 550 employees).  Jamaica has nominal GDP of $13 billion or so.  WhatsApp is way more than that.  OK, you say, that’s just one year.  Suppose that WhatsApp (what it does) works out to working for 5 years before it becomes obsolete.  That’s 3.8 billion per year.  The GDP of Cayman Islands is $3.3 billion.  And that’s where Facebook is taking its profits to avoid paying taxes [4].

4) The University of California budget for 2013-2014 is $6.2 billion [5].  WhatsApp would fund the UC for 3 years.  WhatsApp apparently produces so much good for our society that it equals about the output of the entire UC system for 3 years.

[1] http://www.bls.gov/cps/minwage2012.htm

[2] http://www.nasa.gov/sites/default/files/files/FY_2013NASA_OperatingPlanEnclosure1_13SEP2013.pdf

[3] http://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)

[4] http://www.theguardian.com/technology/2013/dec/05/facebook-tax-cayman

[5] http://regents.universityofcalifornia.edu/regmeet/nov12/f1attach3.pdf

February 3, 2014

New computer, still with MATE …

Filed under: LaTeX,Technology — jlebl @ 7:53 pm

I just got a new work laptop, the Dell XPS 13 developer edition.  Even for a day installed GNOME 3 on it.  Then I realized that I can’t work with two different desktops at the same time, so I went back to MATE.  I can’t change my work computer to GNOME because the dual-monitor support is terrible in GNOME shell.  Oddly it seems that dual monitor is a corner case for GNOME devs now.  Strange as Linux is more used in the “workstation” market than “home desktop” market, and if I look around the offices here, whoever can (has funding) does have a dual monitor setup on their workstation.  GNOME sucks as a workstation.  It might be fine as a place to launch a web browser, email, chat, whatever it is that kids do nowdays.

The other thing is that this has a pretty high DPI, and EVERY desktop kind of sucks at this.  I don’t think that mid 30’s is too old to use computers, but there are things which are definitely harder on this thing and require squinting.  My eyesight is not what it used to be, but it’s not that bad.  I can get most (but not all) fonts to be bigger.  But for example chrome I can’t get to be bigger everywhere, that is, yes on the webpages, but no on the tab headers.  Also UI elements in other things are tiny, like scrollbars are suddenly hard to hit because they are tiny.  Why don’t these things also scale?  That’s annoying.  Smaller resolution is OK, but blurry and sucky.

Another annoying thing is this really godawful thing called a click-pad.  It makes the assumption that just because you can do something, you should.  So the top of the “buttons” are now also place where the “mouse” moves.  So by pressing the button I am also moving the mouse, often clicking somewhere else.  So now if I want to click on something two things happen: 1) the mouse jumps somewhere completely different 2) or I can’t hit it.  Put that together with the small controls and you have a recipe for disaster.  I continually click on things I don’t want to.

Ahh well … There are nice things about the laptop too, like the size, and the case.  Though it doesn’t have a lock hole, which is really anoying … in a coffee shop, am I supposed to take the laptop to the bathroom with me?  I know it’s small, but taking your laptop with you to pee is kind of weird.  Oh yeah … ended on another complaint …

October 1, 2013

Installed MATE, bliss ensued

Filed under: Linux — jlebl @ 8:25 pm

A couple of crashes of GNOME shell, including yesterday stealing my keyboard focus and refusing to let it have me back, and then the mouse not working for a while … Together with the shell just generally driving me nuts, was enough to type “installing mate on ubuntu” into google.

At least this is sort of GNOME, so I don’t feel like a “traitor to the cause.”  I do like one feature of gnome-shell and that’s the window stacking if you press it against the sides, so I can have two side by side windows easily.  On the other hand, I have multiple desktops on my second monitor now.  Yay!  It feels good to be back in saner and less-flashy times.

September 26, 2013

More GNOME gripes

Filed under: Linux — jlebl @ 3:45 pm

Since I could install new enough Ubuntu to easily install GNOME 3.8 and hence use Classic mode, I am now for the last month or so using GNOME shell at work.  Now I just got a wonderful new computer with two screens that I just installed the same setup on.  And I have to say that there were several things that drove me absolutely crazy yesterday.

  1. I can’t tell a difference between focused window and unfocused window in the default theme.  I kept typing into the wrong window leading to all sorts of bad things happening (sucks having what should go in a terminal being typed into your grant proposal, and then having to hunt it down, or perhaps typing something into your grant proposal and instead typing it into gmail with keybindings turned on and hence archiving a few unread emails that you have to hunt down without actually knowing what they are.)  I found a different theme that does the only sane thing of making the title bar really blue when focused and really gray when unfocused, bad thing is, that such a usability issue is only in the tweaks, and that the theme is ugly.  Good thing I value actually working over how nice the thing is.
  2. Printers!  I can’t add the printer.  Instead of easily adding a printer I get presented with a dialog where I can’t do anything, it lists some random printers usually in other people’s offices.  The “community printer” on this floor is not listed.  Hmmm … what is the address … I go to the old computer (also with GNOME 3.8) look into printers and I can’t find detailed info about the printer.  After about 5 minutes of fussing around I remember to look into the cups text config file.  Ahhh …  now I have the address of the printer.  OK, so how to add it.  On the new computer, click “Add printer” and then where do I put in that address.  Putting it into the search bar yields nothing useful, pressing enter adds someone’s personal printer.  OK fail … After further number of minutes I give up on the gnome printer thingie as totally and utterly useless.  OK, but where is the good old (or bad old, but at least somewhat usable) printer setting application.  Now my memory is still what it used to be: bad.  So I can’t remember it.   It doesn’t appear in the gnome-shell, typing “printers” into overview mode only brings up the totally useless gnome version.  OK, have to google, after a few minutes I find it.  I have to start “system-config-printer” from the command line.  There although the interface is also bad, I can actually add the printer.  Damnit, about a decade ago in GNOME I could do all this with just mouse clicking.  With this new really simple-to-use GNOME I can’t, I have to use command line.  To add a printer!  This went from bad UI to unusable UI.  Not only that, I can’t get to the usable UI from the UI even though it is installed.
  3. Multiple monitors:  GNOME shell does something weird with multiple monitors.  It treats the second monitor as sort of “scrap space” that you don’t really use, so there are no multiple desktops, there is no bar on top …  I know there is a setting in tweak (the fact that tweak exists is a failure of design to begin with), but the setting doesn’t seem to work.  All it does is to make the extra monitor slide around, but there is still just one desktop on the extra monitor.  It feels like this was designed by somebody using the second monitor as a presentation display for a laptop or some such.  It doesn’t really make sense for a two display workstation.
  4. The status menu is now easy to miss and skip by mistake into the second monitor.
  5. The overview mode active corner is really damn annoying.  I keep going into it when wanting to press the back button on the browser.  Fitts law fail!
  6. No more categories in the shell overview.  Good thing there is the menu on top in classic mode.  I don’t search!  I click!  Mostly because I can’t remember what to search for.  Looking through a list of ALL application sorted by alphabet is rediculous.
  7. evince keeps crashing, and the dbus interface seems to have changed again so my synctex script no longer works.  This is really annoying when you have to get something done.

All in all, I am very unhappy so far, and getting unhappier and grumpier by the minute.  I think XFCE, for all its suckiness will end up being my work desktop too.

July 18, 2013

Kansas?

Filed under: Uncategorized — jlebl @ 2:21 pm

 

See anything wrong here?

 

kansas-state

Next Page »

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 25 other followers