Wednesday, March 29, 2017

Tim Horton's 100 challenge

Recently a few people have put the Tim Horton's roll up the rim challenge to the test. Apparently they are buying 100 cups of Tims coffee in an experiment.

I wonder what they were trying to discover. lol Tims is rigged? maybe they thought with 100 tries things would converge and they would have exactly 20 winners. In Tim Horton's roll up the rim they state that 1 in 5 cups wins something. The something is typically an inexpensive food prize such as a free coffee or doughnut.

I thought offhand 100 isn't a real large sample size and there would be some variance and probably surprises from people actually doing a sample of 100 times and recording the results. First I thought to write a script to use a random number generator to build a large set of samples of 100 trials (taking Tims at their word that indeed 1 in 5 cups randomly is a winner), then see what kind of data emerged.

Then thinking about it some more, I realized the chance of each of the outcomes, from 0 wins to 100 wins, can be computed exactly. This is the equation, where x is the number of times to win.

The probability of winning x times over a sample of 100 where each attempt has a 1 in 5 chance of winning is


This formula can be readily entered into Excel and we can determine the chance of each outcome. I entered it into a spreadsheet and these are some observations of the results.

The chance of losing all 100 times is about 1 in 4.9 billion. So any regular who tells you they never win is probably selectively forgetting a few stray wins here and there.

The chance of winning all 100 times is about 1 in 1070, or 1 in 7,888,609,052,210,030,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000.

There is about a 1.26% chance of winning fewer than 12 times.

There is about a 1.12% chance of winning more than 29 times. So regulars who think they win about half the time are likely overestimating how often they win.

With a 1 in 5 chance each time, the expected would be of course 20 wins. There is actually a 9.93% chance of winning exactly 20 times, or more than 90% to get something other than 20. Most of the action is around 20, there is an 83.2% chance of coming in between 15 and 25 wins over the random sample of 100 cups.

Saturday, March 11, 2017

The end of the independent judiciary in Canada

Some recent court cases have called into question whether a judge in Canada can act as independent, impartial, disinterested observer in a criminal trial. In recent months in some court cases judges have been subject to censure after the trial for applying "incorrect" reasoning.

In an Alberta case a provincial court judge Robin Camp was subjected to a Canadian Judicial Council committee of inquiry who ruled that he "should be removed from the bench". The council also ruled that he "committed misconduct while presiding over the trial"

What was this misconduct? Judge Camp's mistake apparently was applying what some might consider thoughtcrime in his reasoning in acquitting a defendant of sexual assault.

With a precedent now established from the judge Camp case, now in a Nova Scotia case there are again calls to remove a judge over a sexual assault verdict, to send judge Gregory Lenehan to "Judicial council review". Again some disagree with the learned judge's reasoning in acquittal, and want the judge removed from the bench.

In the past there were concepts of an impartial judge, an unbiased observer with no personal interest in the outcome of a case. This allowed a judge to weigh the evidence as presented and determine a verdict free from outside pressure.

So what is the takeaway from this for judges and criminal defence lawyers? If I was a criminal defence lawyer with a client facing sexual assault I would not recommend my client go to trial by judge alone. Go with a jury trial. As we have seen, if a judge can be censured and kicked off the bench for acquitting, then it's hard to see how a defendant can get a fair trial by judge alone. If the judiciary is no longer independent then judges have to be aware of what the "expected" verdict and reasoning is before the trial begins. And they will be smart enough to protect themselves and deliver that verdict.

Even with a jury trial, it is still dangerous to the judge. His instructions to the jury could also be subject to this Judicial council review, so judges will be pressured to steer juries to deliver a predetermined verdict. Also once a precedent is established with judges, jury members as well can potentially face repercussions after the trial for coming back not guilty. So they will also now feel pressured play it safe and come back with guilty, to avoid trouble and possibly losing their day jobs as a result of delivering the "wrong" verdict.

The result of everyone having to play it safe is bad for defendants. In order for judges and juries to cover themselves and avoid difficulties after the trial if they acquit, established conventions would change. Presumption of innocence replaced by presumption of guilt. Burden of proof shifted to the defendant to demonstrate at least one of
a) the alleged crime did not occur
b) someone else committed the crime
c) it is impossible for the defendant to have committed the crime

Otherwise it might be "murky" as in the Halifax taxi case and better play it safe and protect your own interest and convict.