Friday, September 15, 2006

Kittens - fin!

I'd bet no statistical conundrum has been so widely debated in both professional and armchair circles, than the famous Monte Hall problem. Circulated in 1990, again in 1996 (when it was first presented to me), it appears to go back at least to 1975, according to Car Talk! The “Let's make a deal” official website actually has a page devoted to it as well!

Here’s a brief summary of the scenario: you’re on the “Let's make a deal” show, and you’re the lucky contestant to choose one of the three doors – and behind one of those doors is the big deal of the day. After you choose, Monte Hall offers to show you what’s behind one of the other doors – and it’s a goat! Your tension is mounting, as he asks you, “do you want to change your selection?”

When I first heard of this, my thought as an ex-aspiring statistician, was, “how absurd: of course not! I chose the first door completely at random; it’s still got the same chance as the other one.” I was 100% wrong! So were so many others – some of whom have used all kinds of vitriol to describe those who think there’s a difference. But the contrary view (that is: that it’s advantageous to switch) is right – proven by many analyses, simulators, and you name it.

I won’t belabor what is analyzed (to near death) all over the internet nowadays – you can research it if you’d like. But the bottom line involves remembering that Monte Hall knows which door has the grand prize, and realizing that he would never prematurely rob the thunder of the show by displaying the big deal or your door! Therefore, his action is far from random – he’s adding information to the system. In the end, if you stick with your original pick, you retain your original odds, 1/3, of having the big prize; switch, knowing that the “non-prize” door has been eliminated, and your odds spike to 2/3 – which is the probability that you initially chose a non-prize door!

This scenario is the answer to question #4 I posed in “Kittens.” Sort of! I claimed it was isomorphic with one of my scenarios, yet when I reviewed it to write this, I realized I’d set up the scenario wrong – sorry! There’s not an exact correspondence, but rather, the fact that information is added to the system – the essential underpinning of the Monte Hall scenario – that is in common.

Back to kittens:

You might think, having chosen one of three hidden kittens at random, that the probability of finding no others of the same sex would be ¼ (½ a chance that the next one you pull is not of the same sex, and another ½ chance that the final kitten is not the same sex). But my purposeful choice in these scenarios adds information and tinkers with the numbers. Let’s see how.

Using either full stochastic analysis, or an information theory approach as was suggested by my friend, Heavy D'luxe, you can arrive at the answers to questions #2 and #3. Whew – that’s a relief: the statistical and information theory analyses lead to the same conclusion! I’m going to borrow D’luxe’s mode of argument now – it’s a refreshing change from fraction multiplication in the Bayesian game!

Answer #2; my daughter has chosen one of the three hidden kittens at random and announced its sex. I, wanting to at least temporarily give the impression that they’re all the same gender, reach in, and purposely select, if possible, another kitten of the same sex. Given that this has just occurred, what’s the probability that the final kitten is of the same gender?

Let's say, with no loss of generality, that my daughter chose the first kitten in the possible sequences below – my choice is the highlighted one (if two are highlighted – it means I chould have chosen either):

GGG
GGB
GBG
GBB - I couldn’t do it here
BGG - … or here
BGB
BBG
BBB

Of the eight original scenarios, the middle two are “knocked out” – I wouldn’t have been able to select a kitten of the same sex and the scenario would have ended prematurely. Of the remaining 6, there are 2 cases where the final kitten’s sex is the same as the first one – A: 1/3 of the time.

Answer #3: in which I have purposefully pulled a kitten of opposite sex – what is the probability that the final kitten matches my daughter’s kitten’s sex? I’ll let you do the analysis yourself (you can use the 8 scenarios above, knock out the two that don’t apply). You should reach the bottom line A: 2/3 of the time.

Thursday, August 10, 2006

Kittens - a start!

Well, I hope one or two of you are enjoying thinking about kittens and probabilities! It's almost time for me to head on vacation, with little time to finish posting (I'll be back in a week and a half). Let me start with the answer to questions 1a and 1b: the probabilities that one kitten is male, the others female, or vice versa. See if that starts any further thinking on the other questions.

One important hint: think binomial distribution. Now it's not as nasty as it looks on the link.

Without all the math, look at it this way: suppose we're just adding random kittens to a litter. A binomial distribution happens when you have a 50% probability of an event (in this case, say, adding a male kitten to a litter) - and that event has the some number of opportunities to happen. The probability of of having n males after I add a new kitten is logically the sum of probabilities that:

  • we had n-1 males in the litter before adding the new kitten, and now I added a male (50%), plus
  • we had n males, and I added a female (also 50%).
  • So basically, you start out with 1 kitten : its 50/50 that it's male, right? With two kittens, you have 25% chance of no males (because you couldn't have n-1 to apply the first bullet item, right? All that's left is the original 50% chance we started a female, times a 50% chance I don't pick a male this time); then 50% chance of one male (apply both bullet items); 25% chance of two (because for two you can't apply the second bullet item). The totals, predictably, add up to 100%

    So for three kittens (our case), you take that distribution to the next step. From the chart below, the chance of only one male is 3 out of 8 - 3/8. The chance of two males: also 3/8. The answer to 1a is 3/8. And the answer to 1b is 3/8 + 3/8, or 3/4.

    There's some cool math behind it when you get into the details, but I'd better stop there!

    See y'all late August, ok?

    Table showing probability of n males in a total population. Divide the numers under the columns by the "total chances".




    population0 1 2 3 4 5 Total chances
    1 1 1 2
    2 1 2 1 4
    3 1 3 3 1 8
    4 1 4 6 4 1 16
    5 1 5 10 10 5 1 32

    Wednesday, August 09, 2006

    Weep for the Children - part II

    I geared up for my ride to work today, feeling a refreshing, almost Autumnal chill as I stepped out of the garage and into the muted light of pre-sunrise dawn – I’d surely need a jacket and gloves this morning. Attaching my helmet, I noticed the grass in the lawn, each green blade – as if bowing to its creator – slightly bent with tiny hoary droplets of dew. And minutes later as I was on my way, I glanced over to see a wooded hillside with a compact, smoke-like ball of fog. Yet its glory brought a new chill to me: in so many ways the rising fog looked like wisps of smoke, and reminded me of the fresh images of bomb drops on northern Israel that I had seen on the news just moments before leaving.

    I realize this is a similar opening to the one I’ve used before; yet for good reason: my feeling of privilege and awe mingled with the urgent sense of needing to cry out for those in turmoil was almost the same as the other week. “Kittens” solution is going to have to wait another day. I want to fast-forward to the bottom line and ask you to pray or weep for the children of the horrible conflict between Jews and Arabs.

    "But it seems hopeless..."

    One of my problems in praying for world-wide events has often been based on two overwhelming facts:

    • God is in control anyway, and

    • I’m so small.



    Perhaps this fatalism is writ even larger when the antagonists are Zion and Ishmael – with animosities recorded back to Biblical times. I’ve wondered, and perhaps you have too: is this merely setting the stage for a final conflict in which all the world is arrayed against Israel? I don’t ever want to be predicting apocalypse – we don’t know any of the times or seasons – and this may be a small piece of what is foretold. But certainly world opinion, and especially that of those who surround Israel, is becoming monotonically negative towards her with every calculated or errant strike made in Lebanon. Mistakes are being made, and capitalized upon; the propaganda machines are in full tilt. Certainly if photographer Adnan Hajj managed to slip some slanted, doctored photos by Reuters, you can be sure this is the tip of the ideological iceberg. We hear daily of Arab sentiment (astonishingly) turning towards Hezbollah – we shake our heads in dismay as the roots of this bitter weed of resentment grow deeper.

    And our local editorial pages are filled with predictable sneering contempt for Israeli politics from those on the more liberal side of our river. Sometimes I wonder – if the U.S. elects one of the top Democratic contenders in ’08, will the U.S. also become increasingly insensitive to Israel’s plight? Would the tenuous support in England also evaporate?

    While I don’t think Israeli leaders did the right thing at the right time, her plight is unmistakable, as is the horror of the hundreds of thousands of innocent Lebanese civilians now caught in a crossfire largely enabled by the ineptitude and corruption of their government - and of the impotence of the U.N. peacekeeping force, which has allowed Hezbollah to incubate under their oversight for over two decades (see comments by Timur Goksel, “who watched Hezbollah grow into a potent force during 25 years as a senior adviser to the U.N. observer force along the Israeli-Lebanese border”)

    Praying God’s will

    The temptation, then - if it’s all foreknown, if it’s all “God’s will” – is to move on with our merry lives, ignore the pain and suffering; “hope” that it’ll all go away, root for one side or another, and quite frankly, if we’re honest with ourselves, become secretly gratified that it’s not us in the conflict. A heart calloused by years of feeding upon devastation will resort to the one sin we can most easily excuse – apathy.

    I suggest that even a world-sized circumstance – like this one, propelled by irascible popular militias and bumbling, error-prone governments; or where it almost seems that the hand of God himself is bent upon destruction – is not more foreknown or foreordained, than the daily issues we can pray so readily about. I suppose I have to agree with Yoda here – “size matters not.” Indeed all things are fully set under God’s sovereignty – yet we are commanded to pray. Why?

    A recent sermon by our senior pastor, Pat Curtis, on John 11 showed Jesus’ compassion. Here we see a Jesus facing Lazarus' sisters, fully planning to raise Lazarus from the dead, but dealing first with their belief and understanding. What strikes us as odd, particularly since as the readers we know of Jesus' Lordship, is that Jesus, in verse 35, would weep. He certainly wouldn’t be weeping for Lazarus, who Jesus knows is about to be brought to life!

    Pat’s suggestion, and the only logical answer I can see, is that Jesus is deeply moved in great compassion for these people – weeping over the devastating effects of sin on human life. In a kind of groaning which knows no words, perhaps we can see Jesus weeping over the unbelief in the crowd; over the searing pain of death and disease, caused by our sin; but even more so, perhaps it’s in part because now that the Light has come to the world, He knows we are even more without excuse for our unbelief and rejection of Him.

    God’s will is that none would perish. The more I can pray in his will, the more I believe I will find myself weeping for those caught in the path of devastation; and the more I’ll be praying for God’s intervention in the lives of as many as who would come to him. The more I can pray in his will, the more I’ll pray that the cycle of hatred will stop with this generation; and the more I’ll know that God’s sovereign plan will leave nobody behind who can be saved.

    It doesn’t “feel” like much, but our human heart is a liar. God says that “The prayer of a righteous person has great power as it is working.” (James 5:16). That refers to us in Christ Jesus!

    I hope to talk more about the apparent (yet I believe false) dilemma between God’s unchangeable sovereignty and our prayers’ ability to exercise “great power.” In the meantime, I’ll pray for those caught in this cycle of violence, loss, and festering hatred. Please join.

    Friday, August 04, 2006

    Kittens!

    Warning: this post contains probabilities - if that was you I just heard screeching, "ick," please avert your eyes and take this remedial science course.

    Three little kittens! Our nursing foster cat, Sadie, has been so eager to have us handle and enjoy them, so of course the inevitable happened: my wife and daughter started to guess their sex at only three days old (the kittens, that is, were at three... oh, never mind!)


    They think it's two girls; one boy. They keep trying to show me why; I squint, adjust the reading glasses, and after searching for long enough to elicit a frustrated sigh, say something like, "cool!" (Which actually, translated, means, "duh - I don't get it!"). How can they see the machinery in something that tiny and fuzzy???

    I'm sure they're right, but for fun let's assume that my "duh" is well-founded and that the probability of each kitten's sex is completely random - 50/50 - as far as we can tell right now. What are the chances my daughter will be correct after all? Easy one, right? Each kitten has a 50% probability of being the sex assumed; the likelihood of success for each one is an independent variable; so success is 1/2 * 1/2 * 1/2 = 1/8.

    Question 1:
    But we'll open it up a bit (now we get to class 3 of stats 101): what is the probability that, of the three, two will be girls and one a boy - it doesn't matter which kitten is the onion in the petunia patch. (1b:) For that matter, what is the probability that we'll have two of one sex, and one of the other?

    That's still awfully easy for the stats student, but here's where it gets fun: suppose my daughter guessed that we'd have two of one sex, one of the other; while I insisted they'd be either all boys or all girls. It gets ugly; we make a bet. On the day of reckoning, with friends and family and a local film crew (hey, it has to be big, right?), she pulls out a kitten and shows the world which kind it is. I, being on film now, don't want to give up my bet one moment sooner than necessary. So even if I'm wrong, I look in the litter, and if possible pull out another kitten of the same sex.

    Question 2:
    Now, assuming that all that just happened, what is the probability that the final kitten is of the same sex?

    Was that easy or hard? If you're really on a roll, try it the other way.

    Question 3: the bet is reversed with me saying there'll be two of one sex, one of another; I'm still a competitive jerk (just for illustration purposes, mind you - hey, stop that laughing!). So when I reach in to find a kitten I'll try to pull out one of the opposite sex from what she pulled, if possible. If I'm able to do that, the bet's resolved, but what are the chances that the third and final kitten matches my daughter's kitten's sex?

    So, I'd love to hear guesses and thoughts!

    Hint: A portion of this scenario is actually an isomorph of another scenario that rocked the statistics community for quite a while (Question 4: what scenario was that?)

    If there is any interest (and the correct answer doesn't appear), I'll post the answers next week.

    Thursday, August 03, 2006

    Another stop on the way...

    Interesting thing about blogging: while on one hand the fact that others may read makes it a slower process than just slammin’ ideas onto a notebook; that care in delivery makes it palpably more enjoyable!

    It all started with a few thoughts about praying for Israel/Lebanon that I figured I’d write in a couple days; but in order to do that I realized I should back up a bit to my beliefs about prayer itself – another few days. Recently my friend, heavy Dluxe, brought out several very good comments regarding Calvinism (call it determinism if you wish) and our going to God as a father. It actually is a great segue to where I’d like to go – ultimately intending to show that there is in reality no conflict between determinism, free will, and our privilege to call upon God for all our needs. But it means a little more prep-work!

    Oops - now you know where I’m heading! So let me give you a jump start on where I’ve been. As I looked for links to help describe what I believe about the science and theology of determinism and free will, I found this, by Norman Swartz, and this, by Ted Honderich, which match a lot of my thoughts.

    Maybe I’m delving into things too wonderful for me, so I’ll study a bit and take it slowly. I hope to discuss determinism and free will, followed by the amazing power of prayer, and finally (assuming there’s still a crisis to talk about by then), the implications for our prayer life in that area.

    Please continue to pray for the conflict with all your might.

    Meanwhile I have a few other thoughts of a lighter nature (with some fun science and math) that I don't want to keep bottled in while I research this – in particular, my next post will discuss - kittens!

    In Christ,
    Alan

    Friday, July 28, 2006

    Intermezzo - praying God's will

    I must admit I'm having a hard time putting words around my wrestlings with how to pray for the Israel/Lebanese situation. I believe there are aspects of prayer life in the realm of "unsolvable" world events that are worth ruminating on. But in case anybody out there is waiting for something intelligible (well - good luck if you're looking for that here!) on the subject, it may take another few days. The situation involves human lives, and to deal with it in a crass way, just to hear myself speak, would be grossly insensitive.

    I want to offer up a little thought about "praying God's will". There was a great classic prayer posted on Scot McKnight's site last Sunday. Surprisingly, instead of the few innocuous "thank yous" and "this was very beautiful" responses typical for a prayer posting, it also received a harsh criticism: who are we to ask God to change [His will] just because we ask? And isn't it stating the "bleeding obvious" anyway?

    Though there was overt hostility in the question, it does beg an important point: how do we walk the fine line between begging and cajoling God for our petty needs, and praying His will? And furthermore, why bother praying His will if it'll be done anyway?

    You can of course read the entire discussion, but I wish to present something I wrote on the discussion. Not that I believe I've said anything markedly profound, or that "you should listen to me", but I intend to use these thoughts again in discussing prayer for the Middle East:


    This is a beautiful prayer. Indeed, it may be restating that which is patently true, but as Scot points out, our forgetful natures need the regular reminder of who God is.

    There are at least two other important benefits as we pray God’s will, a practice instructed in 1 John 5:14. First, our will becomes more aligned with the will of the father. It is a fact of our nature that we become ever more like that which our eyes behold (thus, Philippians 4:8). As we pray for God’s multipled mercy, we ourselves become more merciful; when we pray for his loving forgiveness for ourselves and our brothers, we can barely help becoming more forgiving and becoming agents to spread His forgiveness. Our sin nature tends to strip us of this benefit quickly, so repeatedly focusing on God’s will is so important.

    The second benefit, stressed in 1 Jn 5:14, is that He hears our prayer and answers. As we become more attuned to His will, we will find Him pressing us to pray for both general and specific things, and we are blessed to see His answer! Do we bend His will in so doing? By no means! Indeed the answer had been on its way before we had yet prayed (see Matthew 6:8 - and Ephesians 2:10) - and we are simply blessed to see it unfold. What we need, and what we are to do for Him, have been prepared in advance for us. To enjoy this relationship and to see God’s loving hand as we pray is little short of a daily miracle.

    Tuesday, July 25, 2006

    Weep for the children, part 1

    Shortly after waking this morning, my daughter found me and giddily ushered me downstairs to show me her prize. She had slept downstairs last evening in a sleeping bag to keep company with a nursing foster cat we are hosting from our local humane society, and her three day-old orange kittens. With feet that barely touched the ground, whispering, she hurried me to her den and smiled a radiant smile - the cat had decided to move her brood, entrusting her three babies to a spot nestled at my girl's feet. And as we chatted, the feline kept adjusting the company, moving her progeny closer and closer to be with her human friend.

    Somewhere in a Lebanon across the sea, I’m sure a daughter has hurried a parent to a more somber sight – a corner of a house that is mere rubble; a dead sibling; a missile hit in the street…

    I rode to work today through wispy fog, as dew glittered deliciously on the lawns. Even flowerless roadside weeds were bedecked in these morning jewels, shimmering in the early morning sun under a cloudless sky.

    And I wondered what my counterpart in a different Lebanon might see – bombed out buildings? A brutal cloudless sky of dust and heat; burning plastic and smoldering ashes, with no roads of escape?

    Please understand I’m in no way sympathizing with the politics of Lebanon. There is inexcusable atrocity there; and the recent mutual escalation amongst antagonists has forced Israel into a no-win situation: fight to the end of Hezbollah, a virtual impossibility which will further inflame the Arab world and distance already fragile ally relationships; or submit to a cease fire which is likely to leave their citizens, and their very existence as a nation, at risk.

    Disagree with me if you will, on the politics - trying to fit any semblance of a summary into a paragraph is impossible. My point is that I find little of encouragement from any side in this fray; and little likelihood of a satisfactory outcome for the millions embroiled in that region.

    Most disconcerting is the pain and frustration which is festering into a deep hatred for their neighbors. I grieve for the children who will watch foreign friends flee, while they remain behind in a living hell; or those who’ll have the memory of a flight from home permanently seared into their memories; those who will lose parents and limbs in missile attacks, and live a life of bitter vengeance; people whose remaining earthly life will be wracked with physical and emotional pain. I pray for the fragile, tentative grass-roots efforts at peaceful coexistence and cultural exchange, which are likely to have a tougher time now.

    I see this is getting long, yet I haven't even started with what I wanted to say. More tomorrow…

    As you hug your child today, or reach up to turn up the air conditioner a notch while glancing out your window at the tranquil countryside, shed a tear and offer a prayer for these children.