Showing posts with label probability. Show all posts
Showing posts with label probability. Show all posts

Wednesday, November 25, 2009

Blackjack - The Game of 21

First of all, I am not promoting gambling here. I am definitely against gambling, whether or not money is involved. I am promoting the understanding of probability.

How is Blackjack or 21 played?

Each player plays his hand independently against the dealer. At the beginning of each round, the player places a bet in the "betting box" and receives an initial hand of two cards. The object of the game is to get a higher card total than the dealer, but without going over 21 which is called "busting", "breaking", or many other terms. (The spot cards count 2 to 9; the 10, jack, queen, and king count as ten; an ace can be either 1 or 11 at the player's choice). The player goes first and plays his hand by taking additional cards if he desires. If he busts, he loses. Then the dealer plays his or her hand. If the dealer busts, he loses to all remaining players. If neither busts, the higher hand total wins. If a player ties with the dealer the hand is a "push" and the player's bet is returned.

What do you think is the cut-off point for the dealer representing the casino?

The answer is 17! Yes, 17 Again! (Not the movie though)

If the dealer has less than 17, he must hit. If the dealer has 17 or more, he must stand (take no more cards), unless it is a "soft 17" (a hand that includes an ace valued as "11," for example a hand consisting of Ace+6, or Ace+2+4). With a soft 17, the dealer follows the casino rules printed on the blackjack table, either to "hit soft 17" or to "stand on all 17's."

Sunday, November 22, 2009

The Numbers Behind Numb3rs - DNA Profiling

DNA profiling (also called genetic fingerprinting) is a technique to identify individuals on the basis of their respective DNA profiles. Although 99.9% of human DNA sequences are the same in every person, enough of the DNA is different to distinguish one individual from another. DNA profiling uses repetitive ("repeat") sequences that are highly variable, called variable number tandem repeats (VNTR). VNTRs loci are very similar between closely related humans, but so variable that unrelated individuals are extremely unlikely to have the same VNTRs.

a. The FBI's CODIS System: based on 13 loci (including Virginia's 8-loci); total of 3,000,000 in the database;
b. Virginia Division of Forensic Science: based on 8 loci; total of 101,905 offender profiles (as of November 1999) in the database;
c. Arizona: based on 13-loci; total of 65,000 offender profiles in the datase.

The probability that someone would match a random DNA sample at any one site (locus, pl. loci) is roughly 1 in 10.

The probability that someone would match a random DNA sample at 8 loci is __________.

The probability that someone would match a random DNA sample at 9 loci is __________.

The probability that someone would match a random DNA sample at 13 loci is __________.

Case Study: USA v. Raymond Jenkins
At first, the DNA profiling was done against Virginian database of 8-loci. The likelihood of an accidental match is roughly 101,905 x 1/100,000,000 = 1/1,000. Considered quite high, Jenkins was released from custody.
Later, more evidence was found and another DNA profiling was performed against the FBI's database of 13-loci. The likelihood of an accidental match is roughly 3,000,000x 1/10,000,000,000,000 = 1/3,000,000. Considered extremely rare, Jenkins was then arrested and charged with second-degree murder.

The Database Match Calculation:
Suppose an DNA sample is sent to Arizona for DNA profiling with 13 loci and 65,000 DNA profiles in the database,
what is the probability of there being a 9-locus match?
Given that the probability that someone would match a random DNA sample at any one locus is roughly 1 in 10.

(1) For 9-locus DNA profiling, the probability for a 9-locus match is _________________.

(2) Out of 13 loci, there are ________________ different ways of having 9-locus match.

(3) Hence, finding a match on any 9 loci of the 13 is 715 / 1,000,000,000.

(4) If any one profile is picked in the database, the proability of a second profile not matching on 9 loci is 1- 715/10^9.

(5) The probability of all 65,000 entries not matching on 9 loci is (1- 715/10^9)^65,000. Using Binomial Theorem, this is approximately 1- 65,000x715/10^9.

(6) The probability of there being a 9 loci match is thus 1- (1- 65,000x715/10^9) = 65,000x715/10^9 = 0.05 = 5%.

In fact, an actual analysis of the Arizona database uncovered 144 individuals whose DNA profiles matched at 9 loci, 144/65,000 = 0.22% (differed from the theoretical 5%, why?), one pair matched at 11 loci and one pair matched at 12 loci. The 11 and 12 -locus matches turned out to be siblings, hence not random.

Extension: Brithday Problem (23, >50%). In a class of 40, the probability of two students share the same birth date is as high as 85%. Surprised?!

Friday, November 20, 2009

DIE DIE MUST ...

Fair 6-sided dice are used in the questions.

(1) Throwing 1 die, what is the probability of getting a 6?


(2) Throwing 2 dice, what is the probability of getting a sum of 6?


(3) Throwing 3 dice, a sum of 10 is more likely or a sum of 9?


Do NOT peep the answers before you attempt the questions!

No... No... No... PEEPS YET...

...........................................................................................................
.
.
.
.
.
.
............................................................................................................

Answers:
(1) 1/6
(2) Tabulate the results, you can see there are 5 times of sum 6 out of the total 36 outcomes. So it is 5/36.
(3) 9: (621) (531) (522) (441) (432) (333)
10: (631) (622) (541) (532) (442) (432)
Do they have the same chance? Not really.

Let's see. For example, (6 2 1) there are 6 different ccombinations 126, 162, 216, 261, 612, 621.
If we do that, we find that there are 27 ways of getting 10 and 25 ways of getting 9. Hence, 10 is more likely to appear.

SingAPool - Lesson Learned from Virginia Lottery



Lottery Principle:

Lottery organisations like Singapore Pools raises money because on average the cost of each ticket is more than the return of it. For example, the cost of a ticket is $1 and the return of it by winning something (including all the prizes) is 50 cents. On average, one loses 50 cents for every ticket he buys.

In 1992, some investors noticed that the Virginia Lottery violated this principle. The lottery involved picking 6 numbers from 1 to 44. They are C(44, 6) - a combination, or 7,059,052 ways (about 7 million) of choosing 6 numbers from a group of 44. The jackpot was $27 million, and with the 2nd, 3rd, 4th prizes included, the pot grew close to $28 millmion, or $27,918,561 to be exact. Therefore, each ticket has an approximate value of $28m / 7m = $4 (or $3.95). However, the cost of each ticket was just $1. To put simply, if one buys all the more than 7 million different combintions, he will have a net profit of $21 million ($28m pot - $7m cost).

The Australian investors quickly found 2,500 small investors in Australia, New Zealand, Europe and the United States willing to put up an average of $3,000 each. If the scheme works, each will have an average net profit of about $10,000.

Risks in the scheme:
1. They were not the only ones buying the tickets; they would have to share the winning pot.
(However, the statistics was on their side: in the 170 times the lottery had been held, there were 120 times with no winners, only 40 times with a single winner and just 10 times with two winners. The expected return is 120/170 *$28m + 40/170*$14m + 10/170*$9m = $23m, or more than $3 per ticket, net profit $2 per ticket on average.)
2. Time for filling in the slips. Each slip was good for 5 tickets. They had 1.4 milion slips to fill out.
As they only had 72 hours before the deadline, they hired grocery-store employees working on shifts to sell as many tickets as possible. In the end, they own managed to purchase 5 million out of more than 7 millions, 0r 70%.
3. Payment for the tickets bought. Luckily, some chain store accepted back checks for 2.4 million tickets, or about 50% of the tickets they bought.
4. Time for checking the prizes. This was not really a problem as the lottery gave 1 ~ 3 months of collecting the prizes won. It was just hard searching work. It took them days to come forward with the winning tickets.
5. Legal or illegal: Luckily, the officials concluded that they had no valid reason to deny the group's winning.

Really interesting and exciting true story!
Warning: The golden rule is NEVER EVER GAMBLE!
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
TOTO: Choose 6 numbers from 1 to 45.
(1) How many different combinations are there? Ans: 8,145,060.
(2) Each combination (6 numbers) costs 50 cents. How much does one pay for all combinations? Ans: $4,072,530.
(3) This coming TOTO jackpot is $5,500,000 (estimated).

The Roulette Wheel


Joseph Hobson Jagger (1830–1892) was a British engineer, known as "The Man Who Broke the Bank at Monte Carlo" (a song composed and written for Jagger).


How did he manage that?


In 1873, Jagger hired six clerks to secretly record the outcomes of the six roulette wheels at the Beaux-Arts Casino at Monte Carlo, Monaco. He discovered that one of the six wheels showed a clear bias, in that nine of the numbers (7, 8, 9, 17, 18, 19, 22, 28 and 29) occurred more frequently than the others. He therefore placed his bets and quickly won a considerable amount of money, £14,000 (equivalent to around 50 times that amount, or £700,000 in 2005). Over the next three days, Jagger gained £60,000 in earnings with other gamblers. In response the casino rearranged the wheels, which threw Jagger into confusion. After a losing streak, Jagger finally recalled that a scratch he noted on the biased wheel wasn't present. Looking for this telltale mark, Jagger was able to locate his preferred wheel and resumed winning. Counterattacking again, the casino moved the metal dividers between numbers around daily. Over the next two days Jagger began to lose and he finally gave up. But he took his remaining earnings, two million francs, then about £65,000 (around £3,250,000 in 2005), and left Monte Carlo never to return.


Do you see the effect of a biased wheel? The same effect goes to throwing a die. A perfect 6-sided die shows a fair chance of 1 - 6, i.e. 1 in 6 chance.


Warning: this occured in the old times; with the modern machines, one is never possible to beat the casinos. Plus, the casino CCTV watches one's every move. Do you think one can easily and hopefully safely walk out of the casino? The golden rule is NEVER EVER GAMBLE!

Wednesday, November 18, 2009

Interesting Events

(1) In 1965, aged 90, with no living heirs, Calment signed a deal to sell her former apartment to lawyer André-François Raffray, on a contingency contract. Raffray, then aged 47, agreed to pay her a monthly sum of 2,500 francs until she died, an agreement sometimes called a "reverse mortgage". Raffray ended up paying Calment more than the equivalent of $180,000, which was more than double the apartment's value. After Raffray's death from cancer at the age of 77, in 1995, his widow continued the payments until Calment's death. (Whitney, Craig R. (5 August 1997). "Jeanne Calment, World's Elder, Dies at 122". New York Times.)

Fact: Calment died 45 years later than Raffray. Therefore, the Raffrays did not gain anything from the contract, but ended up paying 45 years of a monthly sum of 2,500 francs. What a LOSS!




(2) The former American football star and actor, O. J. Simpson,was brought to trial for the 1994 murder of his ex-wife Nicole Brown Simpson and her friend Ronald Goldman. Simpson was acquitted in 1995 after the longest jury trial in California history.


Simpson hired a high-profile defense team led by Johnnie Cochran and F. Lee Bailey. Cochran persuaded the jurors that there was reasonable doubt about the DNA evidence (then a relatively new type of evidence in trials) - including that the blood-sample evidence had allegedly been mishandled by lab scientists and technicians.


Later, both the Brown and Goldman families sued Simpson for damages in a civil trial. On February 5, 1997, the jury unanimously found there was a preponderance of evidence to find Simpson liable for damages in the wrongful death of Goldman and battery of Brown. In its conclusions, the jury effectively found Simpson liable for the death of his ex-wife and Ron Goldman. On February 21, 2008, a Los Angeles court upheld a renewal of the civil judgment against Simpson.

Fact:
- Why Simpson was not brought to justice in the first criminal trial?

- Because he hired a strong defense team. The team presented that "4 million women are battered annually by husbands or boyfriends in US; yet in 1992, according to FBI reports, a total of 1,432 (1 in 2,500) were killed by their husbands or boyfriends" and therefore they concluded that "few men who beat their domestic partners go on to murder them".

Well. The last statement by the defense team was true. But it was not relavent. The point here is rather the probability that a battered wife who was murdered was murdered by her abuser. According to the FBI report , of all the battered women murdered in US in 1993, some 90% were killed by their abuser. This statistic was not mentioned in the trial.
This second event is actually related to Bayer's Theory. A few more linked cases are HIV test report, or urine test report against drug uses for athletes (e.g. Mary Decker Slaney).

Tuesday, November 17, 2009

Students Lying to Teachers

It’s sad, but many students lie to teachers and get away with it. That’s why I love to read about stories where teachers catch the students red-handed.

Here’s one story I especially enjoyed:

"My dad heard this story on the radio. At Duke University, two students had received A’s in chemistry all semester. But on the night before the final exam, they were partying in another state and didn’t get back to Duke until it was over. Their excuse to the professor was that they had a flat tire, and they asked if they could take a make-up test. The professor agreed, wrote out a test and sent the two to separate rooms to take it. The first question (on one side of the paper) was worth 5 points, and they answered it easily. Then they flipped the paper over and found the second question, worth 95 points: ‘Which tire was it?’ What was the probability that both students would say the same thing? My dad and I think it's 1/16. Is that right?"

Source: excerpted from Marilyn vos Savant (IQ 228, the highest recorded around the world), Parade Magazine, 3 March 1996, p 14.

Besides being a nice story, the situation raises some interesting questions in game theory.

The answer is no. It's not right. If the students were lying, the correct probability of their choosing the same answer is 1/4.

Again, let's look at the sample space. (response of Student 1, response of Student 2)
{ (RF, RF); (RF, LF); (RF, RR); (RF, LR);
(LF, RF); (LF, LF); (LF, RR); (LF, LR);
(RR, RF); (RR, LF); (RR, RR); (RR, LR);
(LR, RF); (LR, LF); (LR, RR); (LR, LR) }
4 /16 = 1/4

Alternatively, we can look at the situation this way. Student 1 can choose anything. Suppose he chooses RF, then Student 2 has a probability of 1/4 getting RF.

Of course, this is based on the assumption that both students are lying and their choices are independent and importantly, they have equal chances to choose one of the four wheels.

In reality, people prefer RF tire (58%), with the other three tires of similar probability, LF (11%); RR(18%); LR(13%). (Source: Introduction to probability By Charles Miller Grinstead, James Laurie Snell, p.40)

Example of Conditional Probability

There are two children in a family.

[1] What is the chance of having at least one girl in this family?

Sample space { (B, B); (B, G); (G, B); (G, G)}

Obviously: the answer is 3/4.

[2] What is the chance of having two girls given that one of the children is girl?

You may argue that since one child is G, there is only one left to look at. The chance of that child's being a G is 1/2, hence the probability of having both girls is 1/2.

Is this correct? Let us look at our sample space.

Sample space {(B, G); (G, B); (G, G)}

Obviously: the answer is 1/3.

The mistake in earlier reasoning is this. We don't know which one is a G, the first child or the second.

Looking back at the second question: What is the chance of having two girls given that one of the children is girl? We have two events: A = both girls; B = one of them girl

P(AB) = P(A intersect B) / P(B) = (1/4)/(3/4) = 1/3
where P(A intersect B) = P(A) in this case.

People v. Collins

The People of the State of California v. Collins was a 1968 jury trial in California, USA that made notorious forensic use of mathematics and probability.

Bystanders to a robbery in Los Angeles testified that the perpetrators had been a black male, with a beard and moustache, and a caucasian female with blonde hair tied in a ponytail. They had escaped in a yellow motor car.
After testimony from an "instructor in mathematics" about the multiplication rule for probability, the prosecutor invited the jury to consider the probability that the accused pair, who fitted the description of the witnesses, were not the robbers. Even though the "instructor" had not discussed conditional probability, the prosecutor suggested that the jury would be safe in estimating:
Black man with beard (A) 1 in 10
Man with moustache (B) 1 in 4

White woman with pony tail 1 in 10
White woman with blonde hair 1 in 3
Yellow motor car 1 in 10
Interracial couple in car 1 in 1000

By multiplying the probability of all events, the chance of a couple fitting all these distinctive characterisistics are 1 in 12 milllions.
The jury returned a verdict of guilty.

Appeal:
Black man with beard (A) 1 in 10
Man with moustache (B) 1 in 4

The argument on events A and B was "most men with a beard also have a mustache". So if you observe a Black man with beard, the chances are no long 1 in 4 that the man you observe has a mustache.

The population of the crime area was several millions, which means that there could be 2 or 3 couples with the description.

Probability

If two events, A and B, are independent, then the probability that both A and B will occur is equal to the product of their individual probabilities.

P(A intersect B) = P(A)*P(B), given that A and B are independent.

Now your time to try:

Suppose
(A) a married person has 1 in 50 chance of getting divorced each year;
(B) a police officer has 1 in 5,000 chance of being killed on the job each year.

What is the probability of a married police officer will be divorced and killed in the same year?

Think it carefully. Tricky?!