Comput puter er App pplicat lications ions for r En Engi gine - - PowerPoint PPT Presentation

comput puter er app pplicat lications ions for r en engi
SMART_READER_LITE
LIVE PREVIEW

Comput puter er App pplicat lications ions for r En Engi gine - - PowerPoint PPT Presentation

Comput puter er App pplicat lications ions for r En Engi gine neer ers ET 601 ET Asst. Prof. Dr. Prapun Suksompong prapun@siit.tu.ac.th Events-Based Probability Theory Office Hours: (BKD 3601-7) Wednesday 9:30-11:30 Wednesday


slide-1
SLIDE 1
  • Asst. Prof. Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Events-Based Probability Theory

1

Comput puter er App pplicat lications ions for r En Engi gine neer ers

ET ET 601

Office Hours: (BKD 3601-7) Wednesday 9:30-11:30 Wednesday 16:00-17:00 Thursday 14:40-16:00

slide-2
SLIDE 2
  • Asst. Prof. Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Review of Set Theory

2

Comput puter er App pplicat lications ions for r En Engi gine neer ers

ET ET 601

Office Hours: (BKD 3601-7) Wednesday 9:30-11:30 Wednesday 16:00-17:00 Thursday 14:40-16:00

slide-3
SLIDE 3

Partitions

3

slide-4
SLIDE 4
  • Asst. Prof. Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Foundation of Probability Theory

4

Comput puter er App pplicat lications ions for r En Engi gine neer ers

ET ET 601

Office Hours: (BKD 3601-7) Wednesday 9:30-11:30 Wednesday 16:00-17:00 Thursday 14:40-16:00

slide-5
SLIDE 5

Kolmogorov

5

 Andrey Nikolaevich Kolmogorov  Soviet Russian mathematician  Advanced various scientific fields

 probability theory  topology  classical mechanics  computational complexity.

 1922: Constructed a Fourier series that diverges almost

everywhere, gaining international recognition.

 1933: Published the book, Foundations of the Theory of

Probability, laying the modern axiomatic foundations of

probability theory and establishing his reputation as the world's leading living expert in this field.

slide-6
SLIDE 6

I learned probability theory from

6

Rick Durrett Eugene Dynkin Philip Protter Gennady Samorodnitsky Terrence Fine Xing Guo Toby Berger

slide-7
SLIDE 7

Not too far from Kolmogorov

7

You can be

the 4th-generation

probability theorists

slide-8
SLIDE 8
  • Asst. Prof. Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Event-Based Properties

8

Comput puter er App pplicat lications ions for r En Engi gine neer ers

ET ET 601

Office Hours: (BKD 3601-7) Wednesday 9:30-11:30 Wednesday 16:00-17:00 Thursday 14:40-16:00

slide-9
SLIDE 9

Daniel Kahneman

9

 Daniel Kahneman  Israeli-American psychologist  2002 Nobel laureate

 In Economics

 Hebrew University, Jerusalem, Israel.  Professor emeritus of psychology and public affairs

at Princeton University's Woodrow Wilson School.

 With Amos Tversky, Kahneman studied and

clarified the kinds of misperceptions of randomness that fuel many of the common fallacies.

slide-10
SLIDE 10

K&T: Q1

10

 K&T presented this description to a group of 88 subjects and

asked them to rank the eight statements (shown on the next slide) on a scale of 1 to 8 according to their probability, with 1 representing the most probable and 8 the least.

[Daniel Kahneman, Paul Slovic, and Amos Tversky, eds., Judgment under Uncertainty: Heuristics and Biases (Cambridge: Cambridge University Press, 1982), pp. 90–98.]

Imagine a woman named Linda, 31 years old,

single, outspoken, and very bright. In college

she majored in philosophy. While a student she was deeply concerned with discrimination and

social justice and participated in antinuclear demonstrations.

[outspoken = given to expressing yourself freely or insistently]

slide-11
SLIDE 11

K&T: Q1 - Results

11

 Here are the results - from most to least probable

[feminist = of or relating to or advocating equal rights for women]

slide-12
SLIDE 12

K&T: Q1 – Results (2)

12

 At first glance there may appear to be nothing unusual in

these results: the description was in fact designed to be

 representative of an active feminist and  unrepresentative of a bank teller or an insurance salesperson.

Most probable Least likely

slide-13
SLIDE 13

K&T: Q1 – Results (3)

13

 Let’s focus on just three of the possibilities and their average

ranks.

 This is the order in which 85 percent of the respondents

ranked the three possibilities:

 If nothing about this looks strange, then K&T have fooled you

slide-14
SLIDE 14

K&T: Q1 - Contradiction

14

The probability that two events will both

  • ccur can never be greater than the

probability that each will occur individually!

slide-15
SLIDE 15

K&T: Q2

15

 K&T were not surprised by the result because they had given

their subjects a large number of possibilities, and the connections among the three scenarios could easily have gotten lost in the shuffle.

 So they presented the description of Linda to another group,

but this time they presented only three possibilities:

 Linda is active in the feminist movement.  Linda is a bank teller and is active in the feminist movement.  Linda is a bank teller.

slide-16
SLIDE 16

K&T: Q2 - Results

16

 To their surprise, 87 percent of the subjects in this trial also

incorrectly ranked the probability that “Linda is a bank teller and is active in the feminist movement” higher than the probability that “Linda is a bank teller”.

 If the details we are given fit our mental picture of

something, then the more details in a scenario, the more real it seems and hence the more probable we consider it to be

 even though any act of adding less-than-certain details to a conjecture

makes the conjecture less probable.

 Even highly trained doctors make this error when analyzing

symptoms.

 91 percent of the doctors fall prey to the same bias.

[Amos Tversky and Daniel Kahneman, “Extensional versus Intuitive Reasoning: The Conjunction Fallacy in Probability Judgment,” Psychological Review 90, no. 4 (October 1983): 293–315.]

slide-17
SLIDE 17

Related Topic

17

 Page 34-37  Tversky and Shafir @

Princeton University

slide-18
SLIDE 18

K&T: Q3

18

 Which is greater:

 the number of six-letter English words having “n” as their fifth letter

  • r

 the number of six-letter English words ending in “-ing”?

 Most people choose the group of words ending in “ing”. Why? Because words ending in “-ing” are easier to think of than generic six letter words having “n” as their fifth letter.

 The group of six-letter words having “n” as their fifth letter words

includes all six-letter words ending in “-ing”.

 Psychologists call this type of mistake the availability bias

 In reconstructing the past, we give unwarranted importance to

memories that are most vivid and hence most available for retrieval.

[Amos Tversky and Daniel Kahneman, “Availability: A Heuristic for Judging Frequency and Probability,” Cognitive Psychology 5 (1973): 207–32.]

slide-19
SLIDE 19

Misuse of probability in law

19

 It is not uncommon for experts in DNA analysis to testify at a

criminal trial that a DNA sample taken from a crime scene matches that taken from a suspect.

 How certain are such matches?  When DNA evidence was first introduced, a number of experts

testified that false positives are impossible in DNA testing.

 Today DNA experts regularly testify that the odds of a random

person’s matching the crime sample are less than 1 in 1

million or 1 in 1 billion.

 In Oklahoma a court sentenced a man named Timothy Durham to

more than 3,100 years in prison even though eleven witnesses had placed him in another state at the time of the crime.

[Mlodinow, 2008, p 36-37]

slide-20
SLIDE 20

Lab Error (Human and Technical Error s)

20

 There is another statistic that is often not presented to the

jury, one having to do with the fact that labs make errors, for instance, in collecting or handling a sample, by accidentally mixing

  • r swapping samples, or by misinterpreting or incorrectly

reporting results.

 Each of these errors is rare but not nearly as rare as a random

match.

 The Philadelphia City Crime Laboratory admitted that it had

swapped the reference sample of the defendant and the victim in a rape case

 A testing firm called Cellmark Diagnostics admitted a similar

error.

[Mlodinow, 2008, p 36-37]

slide-21
SLIDE 21

Timothy Durham’s case

21

 It turned out that in the initial analysis the lab had failed to

completely separate the DNA of the rapist and that of the victim in the fluid they tested, and the combination of the victim’s and the rapist’s DNA produced a positive result when compared with Durham’s.

 A later retest turned up the error, and Durham was released

after spending nearly four years in prison.

[Mlodinow, 2008, p 36-37]

slide-22
SLIDE 22

DNA-Match Error + Lab Error

22

 Estimates of the error rate due to human causes vary, but

many experts put it at around 1 percent.

 Most jurors assume that given the two types of error—the 1

in 1 billion accidental match and the 1 in 100 lab-error match—the overall error rate must be somewhere in

between, say 1 in 500 million, which is still for most jurors beyond a reasonable doubt.

[Mlodinow, 2008, p 36-37]

slide-23
SLIDE 23

Wait!…

23

 Even if the DNA match error was extremely accurate + Lab

error is very small,

 there is also another probability concept that should be taken

into account.

 More about this later.  Right now, back to notes for more properties of probability

measure.

slide-24
SLIDE 24
  • Asst. Prof. Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Conditional Probability

24

Comput puter er App pplicat lications ions for r En Engi gine neer ers

ET ET 601

Office Hours: (BKD 3601-7) Wednesday 9:30-11:30 Wednesday 16:00-17:00 Thursday 14:40-16:00

slide-25
SLIDE 25

25

slide-26
SLIDE 26

Disease Testing

26

 Suppose we have a diagnostic test for a particular disease

which is 99% accurate.

 A person is picked at random and tested for the disease.  The test gives a positive result.  Q1: What is the probability that the person actually has the

disease?

 Natural answer: 99% because the test gets it right 99% of the

times.

slide-27
SLIDE 27

99% accurate test?

27

 Two kinds of error  If you use this test on many persons with the disease, the

test will indicate correctly that those persons have disease 99% of the time.

 False negative rate = 1% = 0.01

 If you use this test on many persons without the disease, the

test will indicate correctly that those persons do not have disease 99% of the time.

 False positive rate = 1% = 0.01

1  0 0  1

slide-28
SLIDE 28

Disease Testing: The Question

28

 Suppose we have a diagnostic test for a particular disease

which is 99% accurate.

 A person is picked at random and tested for the disease.  The test gives a positive result.  Q1: What is the probability that the person actually has the

disease?

 Natural answer: 99% because the test gets it right 99% of the

times.

 Q2: Can the answer be 1% or 2%?  Q3: Can the answer be 50%?

slide-29
SLIDE 29

Disease Testing: The Answer

29

Q1: What is the probability that the person actually has the disease?

A1:The answer actually depends on how

common or how rare the disease is!

slide-30
SLIDE 30

Why?

30

 Let’s assume rare disease.

 The disease affects about 1 person in 10,000.

 Try an experiment with 106 people.  Approximately 100 people will have the disease.  What would the (99%-accurate) test say?

Test 106 people

slide-31
SLIDE 31

Results of the test

31

100 people w/ disease 999,900 people w/o disease 99 of them will test positive 1 of them will test negative 989,901 of them will test negative 9,999 of them will test positive

approximately

slide-32
SLIDE 32

Results of the test

32

100 people w/ disease 999,900 people w/o disease 99 of them will test positive 1 of them will test negative 989,901 of them will test negative 9,999 of them will test positive Of those who test positive, only

99 1% 99 9,999  

actually have the disease!

slide-33
SLIDE 33

Bayes’ Theorem

33

Using the concept of conditional probability and Bayes’ Theorem, you can show that the probability that a person will have the disease given that the test is positive is given by where, in our example, pD = 10-4 pTE = 1 – 0.99 = 0.01

(1 ) (1 ) (1 )

TE D TE D TE D

p p p p p p    

slide-34
SLIDE 34

Bayes’ Theorem

34

Using the concept of conditional probability and Bayes’ Theorem, you can show that the probability P(D|TP) that a person will have the disease given that the test result is positive is given by When different value of pD is assumed, We get different value of P(D|TP). Conclusion: Any value (between 0 and 1) can be obtained by varying the value of pD

(1 ) (1 ) (1 )

TE D TE D TE D

p p p p p p    

1 1 pD P(D|TP)

slide-35
SLIDE 35

In log scale…

35

10

  • 6

10

  • 5

10

  • 4

10

  • 3

10

  • 2

10

  • 1

10 10

  • 5

10

  • 4

10

  • 3

10

  • 2

10

  • 1

10 d

pD P(D|TP)

slide-36
SLIDE 36

Effect of pTE

36

pTE = 1 – 0.99 = 0.01

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

pTE = 1 – 0.9 = 0.1 pTE = 1 – 0.5 = 0.5

pD P(D|TP)

slide-37
SLIDE 37

Wrap-up

37

 Q1: What is the probability that the person actually has the

disease?

 A1: The answer actually depends on how common or how

rare the disease is! (The answer depends on the value of PD.)

 Q2: Can the answer be 1% or 2%?  A2:

Yes.

 Q3: Can the answer be 50%?  A3:

Yes.

slide-38
SLIDE 38

Prosecutor’s fallacy

38

 O. J. Simpson

 At the time a well-known celebrity famous

both as a TV actor and as a retired professional football star.

 Defense lawyer: Alan Dershowitz

 Renowned attorney and Harvard Law

School professor

[Mlodinow, 2008, p. 119-121],[Tijms, 1007, Ex 8.7]

 Murder case

 “one of the biggest media events of 1994–95”  “the most publicized criminal trial in American history”

(การพิจารณาคดีในศาล) (ทนาย)

slide-39
SLIDE 39

The murder of Nicole

39

 Nicole Brown was murdered at her home

in Los Angeles on the night of June 12, 1994.

 So was her friend Ronald Goldman.

 The prime suspect was her (ex-)

husband O.J. Simpson.

 (They were divorced in 1992.)

(ผู้ต้องสงสัย)

slide-40
SLIDE 40

Prosecutors’ argument

40

 Prosecutors* spent the first ten days of the trial entering

evidence of Simpson’s history of physically abusing her and claimed that this alone was a good reason to suspect him

  • f her murder.

 As they put it,

“a slap is a prelude to homicide.”

Prosecutor* = a government official who conducts criminal prosecutions on behalf of the state (พนักงานอัยการ)

(เป็นฝ่ายผู้ฟ้องร้อง/โจทก์) (ฆาตกรรม)

slide-41
SLIDE 41

Counterargument

41

 The defense attorneys argued

 that the prosecution* had spent two weeks trying to mislead

the jury

 and that the evidence that O. J. had battered Nicole on

previous occasions meant nothing.

 Dershowitz’s reasoning:

 4 million women are battered annually by husbands and

boyfriends in the US.

 In 1992, a total of 1,432, or 1 in 2,500, were killed by their

(ex)husbands or boyfriends.

 Therefore, few men who slap or beat their domestic partners

go on to murder them.

 True? …Yes…Convincing?

(ทนายฝ่ายจ าเลย) (ทุบตี)

slide-42
SLIDE 42

The verdict:

42

Not guilty for the two murders!

The verdict was seen live on TV by more than half of the U.S. population, making it one of the most watched events in American TV history.

slide-43
SLIDE 43

The Truth: Another number…

43

 It is important to make use of the crucial fact that Nicole

Brown was murdered.

 The relevant number is not the probability that a man who

batters his wife will go on to kill her (1 in 2,500) but rather the probability that a battered wife who was murdered was murdered by her abuser.

 According to the Uniform Crime Reports for the United

States and Its Possessions in 1993, the probability Dershowitz (or the prosecution) should have reported was this one:

  • f all the battered women murdered in the United States in

1993, some 90 percent were killed by their abuser.

 That statistic was not mentioned at the trial.

This event has happened and should be used in probability evaluation

slide-44
SLIDE 44

A Simplified Diagram

44

Physically abused (battered) by husband Murdered by husband Murdered

slide-45
SLIDE 45

Probability Comparison

45

Physically abused by husband Murdered by husband Murdered

Physically abused by husband Murdered by husband Murdered

1 in 2,500 (0.04%)

90%

The orange event is ignored.

slide-46
SLIDE 46

The Whole Truth …

46

 Dershowitz may have felt justified in misleading the jury

because, in his words, “the courtroom oath—‘to tell the truth, the whole truth and nothing but the truth’—is applicable only to witnesses.

 Defense attorneys, prosecutors, and judges don’t take this

  • ath . . . indeed, it is fair to say the American justice system is

built on a foundation of not telling the whole truth.”

[Mlodinow, The Drunkard's Walk: How Randomness Rules Our Lives]

slide-47
SLIDE 47
  • Asst. Prof. Dr. Prapun Suksompong

prapun@siit.tu.ac.th

Independence

47

Comput puter er App pplicat lications ions for r En Engi gine neer ers

ET ET 601

Office Hours: (BKD 3601-7) Wednesday 9:30-11:30 Wednesday 16:00-17:00 Thursday 14:40-16:00

slide-48
SLIDE 48

Sally Clark

48

[http://www.sallyclark.org.uk/] [http://en.wikipedia.org/wiki/Sally_Clark] [http://www.timesonline.co.uk/tol/comment/obituaries/article1533755.ece]

slide-49
SLIDE 49

Sally Clark

49

 Falsely accused of the murder of her two

sons.

 Clark's first son died suddenly within a few

weeks of his birth in 1996.

 After her second son died in a similar manner,

she was arrested in 1998 and tried for the murder of both sons.

 The case went to appeal, but the convictions

and sentences were confirmed in 2000.

 Released in 2003 by Court of Appeal  Wrongfully imprisoned for more than 3 years  Never fully recovered from the effects of this

appalling miscarriage of justice.

slide-50
SLIDE 50

Misuse of statistics in the courts

50

 Her prosecution was controversial due to statistical

evidence

 This evidence was presented by a

medical expert witness

Professor Sir Roy Meadow,

 Meadow testified that the frequency of sudden infant death

syndrome (SIDS, or “cot death”) in families having some of the characteristics of the defendant’s family is 1 in 8500.

 He went on to square this figure to obtain a value of 1 in

73 million for the frequency of two cases of SIDS in such a family.

2 8

1 10 8500

      

slide-51
SLIDE 51

Royal Statistical Society

51

 “This approach is, in general, statistically invalid.”  “It would only be valid if SIDS cases arose independently

within families, an assumption that would need to be justified

  • empirically. “

 “There are very strong a priori reasons for supposing that the

assumption will be false.”

 “There may well be unknown genetic or environmental

factors that predispose families to SIDS, so that a second case within the family becomes much more likely.”

[http://www.rss.org.uk]

slide-52
SLIDE 52

Engineering Ethics: IEEE Code of Ethics

52

We, the members of the IEEE, in recognition of the importance of our technologies in affecting the quality of life throughout the world, and in accepting a personal obligation to our profession, its members and the communities we serve, do hereby commit ourselves to the highest ethical and professional conduct and agree:

  • 1. to accept responsibility in making decisions consistent with the safety, health, and welfare of the public, and

to disclose promptly factors that might endanger the public or the environment;

  • 2. to avoid real or perceived conflicts of interest whenever possible, and to disclose them to affected parties

when they do exist;

  • 3. to be honest and realistic in stating claims or estimates based on available data;
  • 4. to reject bribery in all its forms;
  • 5. to improve the understanding of technology; its appropriate application, and potential consequences;

6.to maintain and improve our technical competence and to

undertake technological tasks for others only if qualified by training or experience, or after full disclosure

  • f pertinent limitations;
  • 7. to seek, accept, and offer honest criticism of technical work, to acknowledge and correct errors, and to

credit properly the contributions of others;

  • 8. to treat fairly all persons regardless of such factors as race, religion, gender, disability, age, or national
  • rigin;
  • 9. to avoid injuring others, their property, reputation, or employment by false or malicious action;
  • 10. to assist colleagues and co-workers in their professional development and to support them in following this

code of ethics.

slide-53
SLIDE 53

Aftermath

53

 Clark's release in January 2003 prompted the Attorney

General to order a review of hundreds of other cases.

 Two other women convicted of murdering their children

had their convictions overturned and were released from prison.

 Trupti Patel, who was also accused of murdering her three

children, was acquitted in June 2003.

 In each case, Roy Meadow had testified about the

unlikelihood of multiple cot deaths in a single family.

slide-54
SLIDE 54

How Juries Are Fooled by Statistics

54

 By Peter Donnelly

http://www.youtube.com/watch?v=kLmzxmRcUTo http://www.stats.ox.ac.uk/people/academic_staff/peter_donnelly @ 11:15-13:50 Disease Testing @ 13:50-18:30 Sally Clark

Professor of Statistical Science (Dept Statistics) at University of Oxford

slide-55
SLIDE 55

Prosecutor’s Fallacy

55

 Aside from its invalidity, figures such as the 1 in 73 million are

very easily misinterpreted.

 Some press reports at the time stated that this was the chance that

the deaths of Sally Clark's two children were accidental.

 This (mis-)interpretation is a serious error of logic known as the

Prosecutor's Fallacy.

 The jury needs to weigh up two competing explanations for the

babies' deaths: 1) SIDS or 2) murder.

 Two deaths by SIDS or two murders are each quite unlikely, but

  • ne has apparently happened in this case.

 What matters is the relative likelihood of the deaths under each

explanation, not just how unlikely they are under one explanation (in this case SIDS, according to the evidence as presented).