Wednesday, November 25, 2009

Mittal theory of crow shit

On a company campus where I used to stay once, there were huge trees where a large number of birds, mainly crows used to sit on the tree and attack unsuspecting people with their droppings. The crows went out to work (or something equivalent) during the day but were present at night, ready for their next attack.

The modus operandi of the crows matched with that of the jehadi terrorists. In fact, we can probably call the crows - a bunch of terrorists. Why, you ask? The attacks are always random, even though the victims always claim that they were the intended targets. The attacks are also sudden and can happen at any time, any place under the tree and generally happen when you least expect them. And lastly, the crows instil in us, a feeling of disgust as well as fear.

Looking at the above picture, I tried to apply some mathematics on this issue and came up with a theory which I tentatively named as 'Mittal theory of crow shit'.

The theory can be elaborated as follows:
On the ground, you see white spots of crow shit covered all over the road, only thing is - their density varies a lot. Imagine the road as your sample space and the spots as the plotted points. So the density of white spots indicates the probability of another attack that may happen at the same place. That is, at the place where density of spots is more, there is more chance of an attack than at a place with lesser density. Thus you can calculate the regions which are more prone to attacks and which are less.

But there is a statutory warning that I need to supply with my theory. And that is applicable to all sorts of probabilistic models. It is the fact that probability never tells you precise information about the next attack (an event), it tells only the probability or chance of the event to happen. Thus probability can't save you if providence has chosen you as its next victim. And worst part is, the probability of an attack at any time is never zero at any location under the tree.

Talking about the solutions to this problem of terror, the issue can be tackled in various ways.
My favorite, but the one which will never be implemented, is to eliminate the terrorist camps in the area where they are trained, that is cut off all the trees and finish the habitat of these terrorists.
The second is that you carry a pistol in hand, by which you can probably kill one or two terrorists but the problem will largely remain unsolved.
The third one is the most popular, lifted from the case study of terrorists. That is to make yourself immune to attacks by protecting yourself or shielding yourself using special equipment, in this case carry an umbrella to protect yourself from their projectiles.

Or what you can also do, like the Indian politicians, after every attack, condemn the attacks, use tough words, say that the terrorists will be severely dealt with, but do nothing and pray for somebody else to do the job for you. Just ignore them till they attack you again when you can do the whole process again and thus a vicious circle will be formed.

Well, there is an extra bonus measure on offer. Call the terrorists as a part of a minority community, fight for their rights, give them reservation to sit on those trees and stop anybody from harming them, and say proudly that you coexist with the black crow community, while the crows keep giving you more and more shit ...

Friday, September 18, 2009

Donkey games people play

I had various eminent people having tea with me. That's why perhaps, they called it High tea. I started this conversation, which goes like this:

"Have you been in this situtation:

'Son, just study for your class 10 exams, then you can enjoy and have fun in life'
After the tenth exams
'Son, just study and do your class 12 board exams well, get into IIT/NIT/some good engineering college and then life will become cool'
After you enter a nice university, the expectations just keep on rising:
'Son, just get good grades, since your CGPA is required for getting a good job. Good grades will get you any job you want.'

'Son, grades are not everything. You have to be overall smart. Prepare well for your interviews and once you get a good job, you can relax, earn loads of money and enjoy life'
Then comes the most frightening one:
'Son, prepare for MBA, nowadays B-schools are where you need to be.'

And then it doesn't stop
'Son, get married by this this age'
'Son, let me see the faces of my grand-kids' and you were left wondering if they were asking you to have a thousand kids.

'Son, become a CEO by 40'
'Son, do something something blah blah'

Sometimes, you feel cheated by this shifting of YOUR goals by others including teachers, parents, peers, friends."

After listening to this, Spencer Johnson screamed at me "Who moved my cheese?"
John Lennon couldn't hide his feelings and had to write a lyric for the situation which goes something like this, "Life is what happens to you, when you are busy making other plans."
And I said:
"We have been treated like donkeys. Imagine a donkey, having a guy (read society) sitting on his back holding a pair of carrots in front of the donkey's mouth using a rod. Now the donkey is motivated to move forward to get the carrot, but he doesn't realize that the carrots just keep on moving forward with him. The donkey, obviously is no physicist to deduce the fact that the carrot has zero relative velocity with respect to him. So he marches on. The man sitting on his back boos, makes funny sounds, motivates the donkey, sometimes kicks him, and the poor donkey keeps on moving without knowing where he is going or where he will end up."

Robert Frost, after being in a silent, thoughtful state all along, had the final say in this conversation:

"Miles to go before I(donkey) sleep."

Friday, September 04, 2009

My African trip (Part 2)

While we were on flight to Dar Es Salaam, Tanzania, the pilot made an announcement that Mount Kilimanjaro was visible on our left. Nishant came running to me, all excited asking me to take a look through the window. Seeing the commotion about the whole thing, I requested the person on the window seat to give up his seat for a few minutes while I took some pictures. Only the Kilimanjaro, with its snow laden peak, along with a nearby peak called Mt. Meru was clearly visible, rest everything was hidden beneath the clouds. Kilimanjaro is actually Africa's highest peak, standing at about 5892m above sea level. The Kilimanjaro has a funny bowl-shape, perhaps they are the bowls of the Gods, from which They spit fury at the earth, yes, the mountain is volcanic. I really wish I had taken the window seat, because I had to abandon my position soon. Nishant was luckier in this respect.

We were going to Dar Es Salaam to attend the OpenRosa conference, a conference for the members of OpenRosa consortium involved in the development of JavaRosa. JavaRosa is an open source solution that can be used for collection of data through mobile phones. The OpenRosa conference was to bring together the people involved in development of JavaRosa and the implementers who used this technology in the field of public health. So the conference was as much about Public Health as much as it was about JavaRosa.

A taxi was found waiting for us at the airport, as had already been communicated to us through email. Dar Es Salaam is a nice city with good infrastructure and good roads, almost comparable to our very own Bangalore or New Delhi. On the way, I saw 3-wheelers of many different colors - green, yellow, blue, red, all of them from Bajaj. In fact, a localite who was attending the conference, surprised me when he told me later on, what these 3-wheelers in Tanzania are called. Guess what, they are not called autos, auto-rickshaws or even 3-wheelers but they are called Bajaj. I didn't see too many 2-wheelers, they are not commonly used as in India, since they are considered a bit unsafe.

It took us an hour to wade through the crowded city, but when we reached our destination - the Kunduchi Beach Resort, all our tiredness evaporated. There was a beautiful fountain in front of the main entry to the resort. As I went inside the resort to the reception, I was fascinated by the architecture and the beautiful designs I could see there. It was a big resort, well-decorated and gave the impression of pure luxurious living. Ah, and I missed the most important thing, the resort was situated on the shores of the Indian ocean.

At the reception, Natalie gave us a warm welcome. She was the person responsible for the smooth running of things at the conference. She took care of our dinner, our rooms getting allotted, basically all logistics related to the conference.

We were shown our rooms. The rooms were big, air conditioned, came with a television that had few interesting channels to watch, but then who came here to watch TV. There were 2 beds to choose from, a nice jacuzzi to relax, a wonderful view of the Indian ocean and the beach. Calling the place luxurious would have been an under-statement!

After keeping our luggage in our rooms, we decided to go out, and meet other people attending the OpenRosa conference. We met Neal Lesh, a representative of a company called D-tree. He was the main organizer of the conference. In technical jargon, I would call him the Administrator of the whole conference.

We also met Heather, a lady from the US who was an implementer in the field of Public health. We met guys from University of Washington, who were working on different projects. One of them I met, told me that he went upto the summit of Mount Kilimanjaro.

Then we moved to have dinner. We had lots of salads, veg-nonveg food available. I had Dal tadka (yes, you read it right) and chapati as dinner along with different salads and vegetables. After dinner, there was a nice dessert waiting for us to indulge ourselves.

During dinner, I happened to strike a conversation with a guy called Sam from Kenya. He told me that he used to spend an hour for development of open source tools related to medical records everyday, and was instrumental in introduction of open source technologies in the university he used to study in, as an alternative to Windows based proprietary systems. Impressive.

After dinner, I roamed around the resort, found a bar, a nice swimming pool and of course, the beach.

The next day, on 20th July 2009, the conference started. We had Neal, starting with the introductions. Then Kieran, a guy from a company called Cell-life gave a short presentation on why collection of data from mobile phones is needed and how can this technology lead to faster results. Then everybody was passed on the mike so that they could introduce themselves - with the condition that they additionally had to tell the audience why they loved their mobile phones. Most of the people came up with funny answers.

After the presentation, we had our coffee-breaks, which were at least 45 minutes long. The extra-long breaks were intended for people to socialize, build bonds, know more about what others were doing and thus serve as a platform for future collaborations. Definitely a wonderful idea.

We had a short training on Xforms after lunch, the technology which is to be used for collecting data in mobiles or even in PCs.

After the conference ended in the evening, myself, Nishant, and the people from Makerere - Laiton, Job and Steven went to the beach. Surprisingly we never got to know the Makerere team very well while we were in Uganda. This was because we never saw them apart from office hours. Now, we were living together in a beautiful place, so bond-building was happening.

After the beach stroll, we found people playing beach volleyball, so we joined in. Soon, we switched to football and had fun together.

The next day, 21st July, we had various presentations from the representatives of companies associated with open source and Javarosa. After lunch, the people were divided into 2 sections, one was the Coder's corner where all the geeks sat together and discussed what they liked best - code and the second one, the lesser mortals like us who took part in brainstorming sessions as an exercise to learn how to solve problems in the field of Public health where a technological solution could be adopted.

In the evening, we had a cocktail party. Various hard-drinks, soft-drinks and food were available. We tapped to the rhythm of music as we enjoyed ourselves together. We also went for a stroll on the beach after the party to take in the fresh air.

On the third day of the conference, we had our presentation as we were newly added to the OpenRosa consortium. We basically had to tell the people what we were doing. We continued the usual discussions and brainstorming sessions of yesterday and later gave our presentation. The presentation went fairly well, but I do regret the fact that since we were new to open-source, we didn't have much to show, we just talked about our plans. Fair enough.

With our presentation behind us, along with the Makerere team, we decided to go to the city of Dar Es Salaam, since we didn't had the taste of the city yet. We boarded a mini-bus to a place called Mwenge (pronounced Moin-ge) which was famous for its souvenir shops. At one shop, after lots of bargaining, I brought two African map wall hangings as souvenirs. I bought them at half the price the shopkeeper was asking for.

We came back to Kunduchi and had dinner - Laiton christened it 'the last supper'.

On the fourth and final day of the conference, we had feedbacks, suggestions and  discussions about the conference. The proceedings ended at about 12 pm. Our flight was at 4:30 pm, so we had lunch, and bid farewell to all people and the friends we made at the conference.

Taxi was ready as usual on time. We reached the airport and boarded Emirates flight to Dubai and then to home sweet home - Bangalore, with a kilo of Swiss chocolates bought from the Dubai airport.

I learnt many things from this conference. The passion of people working in the area of public health made me feel good and motivated to work in this area. I learnt more about open-source and how people are trying to build their revenue model on Open source technologies, something which we are looking at, ourselves.

Thanks to Natalie, Neal and other people behind this conference, everything was so well organized that I marvel at the fact that there were no problems and issues, no last-minute goof-ups during the whole conference.

I had a wonderful time in Tanzania at the conference, though I missed going on an African safari, which would have set me back by about $500, a bit expensive. Maybe next time.

Friday, August 28, 2009

Statistical humor

Somebody once remarked, about the statistics class

If I had only one day to live, I would live it in my statistics class...

It would seem so much longer.

I am dealing with data analysis and statistics in my work-place, and after reading the first statement, you might have already judged how 'interesting' the field of statistics is. But I would defend myself saying that there is scope for humor even in this field. In this regard, I came across some wonderful humorous anecdotes in a book of Biostatistics. But before I get down to the joke itself, I need to bore you a little by explaining some statistical concepts.

You may be aware of the concept of correlation and regression. A particular coefficient called Coefficient of Correlation (r) is generally calculated to find out if two sets of data have a positive, negative or no correlation. A high value of r means high correlation.

While doing studies, many people have come across what are called spurious or nonsense correlations in which 2 sets of data seem to be highly correlated even though there is no link between them. In this respect, I came across 2 wonderful examples which were specially chosen to depict the humor that statistics can sometimes unexpectedly turn up.

The first wonderful example comes from a study done by a guy called Yule who observed a high correlation (r=0.951) between the proportion of marriages celebrated in Anglican churches (in England and Wales from 1866 to 1911) and the death rates in the same place. This had to happen, marriage had to be related to death, no? If John Lennon would have known this, he would have sung, "Mama, I don't wanna be a husband, I don't wanna die".

The second example goes even farther. LV Charlier found a correlation of 0.86 between the size of the stork population in Oslo over a period of about 40 years and the number of babies born there each year.

I can imagine a Harry Belafonte type of situation in his classic song Man Piaba, when a small boy will ask the dreaded question to his father, thus:

"Father, where did I come from?".

The father will reply, "Son! Scientifically speaking, its the birds and the bees. Statistically speaking, its the stork!"

Wednesday, August 19, 2009

My African trip (Part 1)

When I came to know that I was supposed to visit Africa, I had mixed feelings. There was a sense of excitement for going to a new place, as well as the feeling of fear that I was going to an unexplored, under-developed and perhaps a little unsafe place in this world. People go to US, UK, France, Germany when they go abroad and here I was, heading to a completely different place. Thankfully, I had my colleague and friend Nishant along with me in this adventure. We never had a clue as to what we would see on our visit to Africa.

On July 16th 2009, we took flight from Bangalore to Dubai via Emirates airlines. We had a brief stop-over at Dubai for a few hours. The Dubai airport is huge, it feels like miles long from one end to the other. They have moving walkways for making it easy to walk from one point to another. We had our fun on these walkways, as we walked on them which made us appear to cruise at a fast speed relative to the still ground.

We boarded another Emirates flight to Entebbe, Uganda. The Airbus 330-200 we were in, was double the size than the planes that run in Indian domestic flights. Emirates air-hostesses were diverse in their origin - some blacks, whites, some colored as well and they wore a peculiar head covering, also portrayed commonly in Emirates ads. They spoke various languages, which made me feel that Emirates was a truly international airline. I enjoyed the service provided by Emirates and was almost sad when they said Thank you on my way-out.

We found the Entebbe airport just at the banks of Lake Victoria, the largest tropical lake in the world, giving a beautiful panoramic view of the landscape. After completing the formalities for Swine flu checkup and getting a visa on arrival, we came out and met Simon from University of Makerere. He had brought a taxi which took us to Kampala, the capital of Uganda, the place where the University of Makerere is located.

Kampala is about 38 km from Entebbe and it took us an hour to get to Makerere. We found the highway to be quite good, and in fact I was surprised to find only big cars and sedans plying on the roads. Hatchbacks were nil, and a very few motorbikes were to be seen. Was Kampala actually a city of rich people? It was a mystery to which I found out the answer, only a few days later.

Kampala basically consists of 7 hills located at an elevation of about 3900 ft. We were at one of the hills called Makerere hill where the University was located. The temperature here lies between 16-27 degrees throughout the year - heavenly.

We arrived at the Makerere University Guest House where we had our rooms waiting for us. The receptionist gave a warm welcome to us. The rooms were quite big, each with 3 beds and an attached toilet and bathroom. The guest house even had wireless internet facility. After putting our luggage inside our rooms, we went for a short meeting with the people at Faculty of Computing and Information Technology. They were the people we were supposed to work with.

When we went to the FCIT building, we realized that the office was 6 floors above and there was no lift. So much for the health conscious people at Makerere! I came to know that the building was new and the lifts maybe installed later on. I do hope it happens for the people working in those offices.

After the short meeting, we came out and bought a SIM card by a company called Zain. The SIM card was handed to us in exchange for 2000 Ugandan shillings (2000 Ugx = 1 USD). I remembered that when I had applied for a postpaid connection in Bangalore, many verifications, phone-calls, residence visits were done before my SIM card could finally work. I was glad to have a SIM card that simply worked out-of-the-box. Plus the Zain network worked in 18 African nations, including Tanzania where we were headed for next.

At the Guest house, I had a vegetable sandwich for dinner. I had been concerned regarding the food as I am a vegetarian, but it turned out that they had sufficient veg dishes, although 80%-90% dishes were non-veg/egg based. Drinking water is an issue in Kampala, which is surprising taking into account the fact that they are practically on the banks of the largest fresh water lake in the world. There were no water coolers that had drinking water freely available, so we had to buy 500 ml mineral water bottles for 500 Ugx (about Rs 13).

After dinner, I roamed around the campus at about 9 pm. Simon had warned us not to take a risk and go out of the campus after 9, lest we became sitting ducks for looters. It was quite dark, even inside the campus and I didn't go far.

The next day, Friday, was a working day where we had detailed discussions with the team at FCIT. I found many of them to be very bright and passionate about coding. Some of them were younger to us, fresh out of college working there.

When we came out of Makerere for buying some water and an electrical converter, I noticed the city had 2 brands of motor-bikes that were predominant. And they were the Indian brands - Bajaj (Boxer) and TVS (Max 100). These bikes are locally called Boda Boda, and people also use them as taxis. Africa seems to be a happy customer of Indian automobiles - good for Indian companies.

July 18th, Saturday was an off-day for us. Simon was again assigned to take us to the Kampala city for some sight-seeing. Simon even joked that we were his guests, so his colleagues had to take permission from him if they wanted to talk to us.

After lunch, we set out for Ggaba beach, which is situated on the banks of Lake Victoria. We took a shared taxi to get to the place. They don't have big buses, but vans ply as taxis at Kampala. And the taxis are not filled up as in India, where 6 people are made to sit in place for 4. That way, I had a comfortable ride and I found the public transport to be good. The Kampala city is not as crowded as a metro in India would be. But roaming inside the city, I saw unclean roads, reminding me of India again.

Ggaba beach is on the banks of the Lake Victoria, which practically looks like the sea, minus the big waves and the tides. Boating facility was available and we talked to a guy called Frank. He quoted a price of 10000 Ugx, we found it to be too high for us. So he immediately went down to 5000 Ugx. The deal was done. He said that he would take us on his motor boat for 10 minutes, but he gave us 20 min of wonderful riding, probably seeing our enthusiasm.

While on our way back, Simon cleared the 'big cars in Kampala' mystery for me. It seems that people here generally buy used cars from Japan, mostly Toyotas at about 2k-8k USD while a brand new one costs 15k which is quite expensive for anyone. No wonder I could see many old models of Toyota which are no longer manufactured. A brand new Boda boda will cost about 1000 USD, around the same as it will cost in India.

We reached back Makerere by evening and went for a walk in the campus. I could see that University was big in size. I heard that about 40k students study here. The campus was quite green, and we even witnessed a christian wedding at a residence hall. Majority of the people in Uganda are Christians. We also stumbled upon a church behind the main administrative building at Makerere where we saw a students choir practicing for Sunday church music. We sat inside the church and listened to the gospel music that they were playing together. It was quite peaceful there.

On Sunday, it was time to say goodbye as we boarded a taxi and reached Entebbe airport. Overall, the Uganda trip was an enlightening experience. I found many similarities between India and Uganda. Uganda has lots of different tribes who speak different languages, so they are linguistically diverse, just like India. Luganda is their main language, apart from English which is also the official language, so a large number of Ugandans know and converse in English. Seeing the city, the warmth of the people, I felt at home. They even drove the same bikes. :)

Seeing our Uganda trip to be successful, with lots of enthusiasm and expectations, we boarded a Air Uganda flight, and flew towards Dar Es Salaam, Tanzania.

(contd in My African trip Part 2)