Tuesday, November 3, 2015

Up or down? A toilet story

"Why can't the guys put the seat down?" says every cliché woman, ever.
"What's the big deal?" is the standard response. And I agree. But let's be more scientific about it, shall we?

Assumptions: a healthy adult pees about 6-8 times per day (counted as 7 from here on) and poops once. Women perform all activities sitting, requiring the seat to be down. Men always stand to pee and sit to poo. All subsequent results can be adjusted if these assumptions are invalid in your household. For base calculations I'll assume that there are an equal number of men and women in a household. This should generally hold true for couples and families, for generalities' sake. Single people have no one complaining to them, so they are uninteresting for this scenario. We'll also call out adjustments for families with more men than women and vice versa. The math is really household-per-toilet, for example if only mom and dad use the master bath (and they only use the master bath), that toilet's usage is by 1 man and 1 woman regardless of the rest of the family composition.

As a practicality:
Flipping a toilet seat up or down is no one's idea of a good time. Naturally we'd like to do this as few times as possible. The seat will have to be flipped if the previous use required the opposite state. In an evenly mixed household, this means that 7 of 16 (P(up)) times the seat will be up and 9 of 16 (P(down)) times the seat will be down. Assuming the events are totally random (which seems reasonable enough), we don't need to flip the seat P(up)*P(up) + P(down)*P(down) = 130/256 ~= 51% of the time if it's just left in the previous user's required state. This means that ~49% of the time we need to flip it.

Simply leaving the seat alone gets the right next state 51% of the time. Always putting the seat down will get the right answer P(down) = 56% of the time. Not a huge win, really. In terms of number of seat flips, it means we average 0.49 flips per use. Always putting the seat down incurs 1 flip in P(up) and 0 flips in P(down) immediately after. Then there's another 1 flip in P(up) and 0 flips in P(down) for the next user, which comes out to P(up) + P(up) =  0.88 flips per use. This is much higher, nearly doubling the number of expected flips. Always putting the seat down is a worse strategy.

The numbers do change as family composition deviates from half-and-half. Suppose a family with 2 men and 1 woman. P(up) changes to 14/24 and P(down) becomes 10/24. Reworking the equations above for leave-as-is yields a don't flip, still, just barely over 51% of the time. The number grows slowly as men outnumber women. 3-to-1 is at 55% and even 4-1 is only at 58%. Conversely, it means that even in a household with a vast male majority, the percent chance that the woman will need to flip the seat stays safely in the 40s. However, the average number of flips climbs to 1.17 for 2-to-1, 1.31 for 3-to-1 and 1.4 for 4-to-1.

Supposing a family has 2 women and 1 man, P(up) falls to 7/24 and P(down) becomes 17/24. Now leaving the seat as-is will work out 59% of the time. The odds climb to 66% for 3-to-1 and 71% for 4-to-1. In other words, a female-heavy household will tend to work out in women's preference favor anyways. Employing the leave-as-is strategy means the average flips falls to 0.41, 0.34 and 0.29, respectively. Always putting the seat down averages 0.58, 0.44 and 0.35 flips, respectively. As women outnumber men more and more, the two strategies converge. However, it is important to note that leave-as-is will never be worse**, and is therefore the statistically correct strategy.

As a courtesy:
If we consider this altruistically, we should look at how often the next person finds the seat in the right state (which is really P(down)). We've done the math above. P(down) is greater than 50% for even households or those with more women. More men cause it to fall below 50%, though a family of 7 could hit a 50/50.
2 men, 1 woman: 43%
3 men, 2 women: 48%
4 men, 3 women: 50%
The takeaway from this is that family composition might dictate that the women leave the toilet seat up! In cases with more men than women, this would generally be the outcome. However, keep in mind that the misses are going to significantly unfairly affect either the men or the women, externalizing a greater cost onto that subset of the family. Is that really being considerate?

In case someone doesn't check and falls in:
I'm just going to laugh.

Conclusion:
Choosing leave-as-is vs always-down strategies is dictated by the philosophy behind the action. If trying to minimize the number of seat flips, leave-as-is is entirely superior. If being considerate to the next person regardless of cost, the choice is dictated by family composition. Families with more men than women should actually opt for an always-up strategy, while others should opt for always-down. The choice is yours. Now you know what you're fighting for!




** Appendix:
[1] Average flips always leaving the seat down = 2 * P(up)
[2] Average flips always leaving the seat as-is = 1 - (P(up)*P(up) + P(down)*P(down)).
Since P(up) + P(down) = 1 always, we can substitute P(down) = 1-P(up) into [2]:
[3] Average flips always leaving the seat as-is = 1 - (P(up)*P(up) + (1-P(up))*(1-P(up)))
[3.expanded] = 1 - (P(up)*P(up) + 1 - 2*P(up) + P(up)*P(up))
[3.collected] = 1 - (1 + 2*P(up) + P(up)*P(up))
[3.simplified] = 2*P(up) + P(up)*P(up).

Since P(up) >= 0, [1] <= [2]. If there are any men in the house, [1] < [2] since P(up) > 0

Wednesday, October 7, 2015

Don't we want the bottom to be fired?

I was reading this article discussing the nuances of the illegal batted ball in the Seahawks-Lions game. When talking about referee performance, it calls out that a section of the refs will be graded as tier three. Two consecutive years in tier three makes a ref a candidate to be fired.

Companies routinely get flak for cycling out their poorest performers. However, wouldn't you, as a consumer of a product, want that company to strive for stronger and stronger employees? We accept (even demand!) this in sports. Poor players need to go. Bad refs need to go. Bad coaches need to go. Why? Because we feel the resulting product is diminished.

If I'm going to buy a car from GM or ride a plane made by Boeing or use software made by Microsoft, shouldn't I want them to use the best people they can find to make those things? Shouldn't I accept (even demand!) that they do so?

The counterargument is usually of the form "what if everyone is an all-star?" or at least "what if everyone is really good?". I counter that there's rarely an absolute definition of good. Being able to, say, assemble 10 cars in a day is objective, but meaningless. Can anyone do that? Can more people than I would ever hire do 20 cars in a day? Hiring guidelines such as these come about by observing relative skill levels. If we hire better and better people, maybe we don't need to make more cars but we can put more effort into other related aspects of assembly. Overall, better workers should create a better product.

Going back to the NFL example, these players, coaches and refs are amongst the absolutely very best in the world, but we still say they suck, they should be fired, etc. Why do we suddenly believe that these same rules don't or shouldn't apply in "real life"?
 

If my parents had guns

My parents were born in 1944 and 1952, in Hungary. For those not familiar, Hungary was emerging, destroyed, out of WW2 and was pretty much immediately taken under Soviet control. The population was progressively subdued and thrust into a communist system. Frustrations peaked in 1956 when a brief revolution was attempted. Predictably, the overpowering might of the Soviet occupying forces crushed it in short order. People who were protesting peacefully were shot. Anyone attributed with leadership roles was executed. One can argue that the revolution was short and relatively few people died only because the population did not have guns. The spirit to fight was there. The weaponry did not.

So what if my parents (or really, my grandparents) and their friends had guns? Lots and lots of guns? I'm pretty sure I wouldn't be here right now. In case it's not clear, because they wouldn't have lived through 1956. While Freddie Mercury wondered out loud if he'd have preferred not to have been born at all, I prefer existing.

The point here is that supporting guns because the 2nd amendment says so seems an outdated stance. First, we made that rule for ourselves and it can be changed. It's not a commandment to Moses. Second, it was written to allow states to defend themselves from a tyrannical government. At the time of writing, the weapons playing field was relatively level. The army came with guns and some cannons. The population defended itself with similar guns (though probably no cannons). Today the population has guns whereas the army has grenades, bombs, tanks, cannons, airplanes, night-vision,  body armor, ... Defending ourselves from an organized, modern army is just not a thing that will happen.  

Wednesday, September 30, 2015

The not-so-ideal candidate

I spent the last few days at UofA, recruiting. Overall it was great, as usual. However, there is a segment of candidates that can get really annoying.

Critical listening:
We have a thing called a program manager. Most people think it's the same as a project manager, or some kind of manager at least. I go out of my way to explain that it is neither of those things. Following it up with "well, I think I'm a good candidate and I have a lot of experience so I'm ready for a management role" will not endear you to me.

Or just not listening:
Many people come prepared with their sales pitch about how great they are. We like to ask questions and have a conversation. It's really hard to do that when unverifiable information is streamed non-stop at my face.

Hygiene:
Onions are delicious. So are other foods. Please clean them out of your mouth before you go talk to a bunch of people in tight quarters.

Compliments:
"You work for Microsoft? You should work for a modeling company" is ... awkward.

Clinginess:
Our process is simple: you talk to us and apply. Coming back day after day just to remind us who you are is, at best, going to do nothing for you.

Connecting:
Use your face-to-face time to make a connection and make me remember you. Don't come back to ask me for a business card because you couldn't find me on LinkedIn. First, I'm not on there. Second, I either already think well of you or I probably don't want to be inundated by the inevitable future followups.

Demands:
Has anyone else gotten back to you about that resume you dropped off yesterday? Yeah, neither have we. Please hold. Even worse is being confronted about "will I be hearing back from you?" or "am I the right fit?" Expect something non-committal.

Just plain out there:
Coming up to our booth and collecting swag while avoiding eye contact and reciting a manifesto about our oppressive ways and your eternal loyalty to Linux is ... I'm not even sure what to call that.

 

Monday, September 21, 2015

The police death epidemic

The general media has certainly left us with a narrative that police are at horribly increased risk; that it's much more dangerous to be a cop now than ever before.

In the vein of "things usually are getting better", I've compiled the number of police deaths over time, as well as adjusted for population. The charts show what I expected: Not only are police deaths steadily decreasing on an absolute scale, they're at their lowest rates ever when scaled for population. I've charted numbers over trailing 5 year windows to smooth out the some inevitable amount of year-to-year volatility.

Looking at the trends shows two eras of particularly bad casualty rates: prohibition (1920 to 1933) and the rise of cocaine/crack (late 70s and early 80s). Both of these eras came with, essentially, wars on the streets. And, of course, the 50s and 60s were just swell! The current rate is roughly 2/3 of the more recent peak.

Of course, comparing absolute numbers over the course of history does not account for the rising population. If things were the same, we'd expect the rate to scale with population. The second trendline shows office deaths per year, per 100million population (again over a trailing 5-year window). This chart shows a similar trend, but even more so. Prohibition and crack still jump out, but now prohibition looks twice as bad. And, the current rate is the lowest, ever, with rates falling to around 1/3 of the more recent spike.

While being a cop clearly has serious risks, there's never been a safer time to be one.  

Saturday, August 29, 2015

The SUV phenomenon

A lot of people buy SUVs. They explain that they need it for the size, or the all-wheel drive, or the safety, or ...
Problem is, a lot of the rationalizations don't really bear out. I'll leave this highly anecdotal since the point is not to pick on or do a deep dive into SUVs. The point is that people feel the need to rationalize their choices. Probably they want to be able to justify their purchase to others.

None of this is necessary. Just say you got an SUV because you wanted to feel cool. Or you like how it looks. Whatever. Be honest about your motivations. Be honest with yourself and others.

This concept is highly visible in the world of guns. I saw a great quote the other day, something like:

Birth control? Ban it.
Abortions? Ban it.
Gay marriage? Ban it.
Guns? Well, see, people will still get guns so ...

And to all the escalationists who justify more guns in order to stop the bad guys, here's the epitome of a good guy with a gun. And now he's dead. And he never had a chance.

Gun nuts: please just admit that you like your toys because they make you feel cool. At least that's something we can't argue with.

Wednesday, August 26, 2015

Does Norway scale?

Many people point to places like Norway as an example society. A society built on socialism that works. Why can't we just follow their model? Bernie Sanders and lots of others want to know!

First things first: does Norway work? While it's hard to say definitively, we can use various metrics to support the claim:
1. Norway is 2nd in the world in nominal GDP per capita behind only Luxembourg.
   a. And maintains the 6th position in purchasing power parity GDP per capita behind only Luxembourg, Singapore and a handful of OPEC countries.
2. Norway is, by a wide margin, tops in Human Development Index (an aggregate of life expectancy, education and income).
   a. and is tops by an even wider margin in inequality-adjusted HDI (same link).
3. Norway has among the lowest rates of poverty, at 4.3% (compared to 14.5% in the USA), in the world.
4. Norway has historically among the lowest murder rates, at 0.6 per 100,000 (compared to 4.7 in the USA)
5. It is one of the few countries in the world with a 100% literacy rate.
6. It ranks 2nd in Press Freedom Index.
7. Top-ranked universal health care. For everyone.

I'm sure there are many other pieces of data I could look at, but I've yet to find one that paints Norway as a bad place to live (unless you're a fan of warm weather ... but then you probably have plenty of money and time to take trips to Greece).

So the question is: can we adopt their model? I think the answer is "not really" or at least "not yet".

To answer the question, I think we have to look at why Norway works. I believe that the socialist model works because the entire population buys into the notion that everyone should have a good quality of life, and that they all win together. First and foremost, they are able to put money behind this belief. Their extremely high GDP per capita means they have a lot of funds, per capita, to spread around (via taxes or whatever mechanism). While much of their wealth comes from oil, they have also been good stewards of their fortunes. They have invested heavily in renewable energy, and they even have the world's largest pension fund to provide for their aging citizens! In short, a pragmatic, level-headed government has made the most of their assets.

On a technical level, Norway has large land area to support renewable energy (primarily hydro, with available space for wind). A higher density population may have a hard time achieving enough energy through just these means, and a poorer population may not be able to afford the infrastructure.

Furthermore, I think the population buys into the socialist approach because they are comfortable with the idea that everyone else in the country should be taken care of. This comes, I think, because of a very homogeneous society. 86% of the population (only 5 million total) is ethnic Norwegian. 80% of the population identifies as Lutheran. In other words, it's easy to love thy neighbor when thy neighbor is just like you.

Contrasting this with America, I think the bases upon which this socialist goodwill is built are not present. The population is too large (both in count and in distance from each other - really, what do I know about someone in Virginia or Florida or somewhere else far away) and too diverse. Many are weary of our immigrants from countries and backgrounds we don't understand. Many question their motives. Many fear their lifestyles. All this has to change before our society can band together and agree that we all can, and should, win. We have the money, sure, but we don't have the will.