Professional Skills in Computer Science

Ind. generalisation Statistical syllogism Ind. reasoning in CS
Causal induction: Example
• In 1695, Edmond Halley was computing the orbits of a set of comets
for inclusion in Newton’s Principia Mathematica
Professional Skills in Computer Science
• He noticed that comets that were observed in 1531, 1607, and 1682
Lecture 8: Induction (2)
took very similar paths across the sky
Also, the observations were 75–76 years apart
(suggesting a regular interval)
Ullrich Hustadt
• Newton had already established (by induction) that comets follow
certain paths, e.g. a parabolic path or an elliptic orbit
Department of Computer Science
School of Electrical Engineering, Electronics, and Computer Science
University of Liverpool
• Halley inferred by induction that the three sightings were caused by the
same comet orbiting the sun on a highly elliptic orbit
• Note: This could be seen as hasty generalisation, but we now know that
the comet has been observed since 240 BC by Chinese and Babylonian
astronomers
(Source: T. L. Griffiths and J. B. Tenenbaum: Theory-Based Causal
Induction. Psychological Review 116(4):661-716, 2009.)
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 1
Ind. generalisation Statistical syllogism Ind. reasoning in CS
L8 – 5
Other forms of inductive reasoning
Inductive generalisation
Definition
Hasty generalisation
Overgeneralisation
Biased sample
Observation
• Causal induction is only one form of inductive reasoning
• In particular, we were looking for reasoning that from observations like
All the crows I’ve ever seen were black
draws a conclusion like
Statistical syllogism
Definition and examples
Fallacy by accident
Arguments from authority
Fallacy by appeal to inappropriate authority
Arguments from consensus
2
COMP110 Professional Skills in Computer Science
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Contents
1
Ullrich Hustadt
All crows are black
• This does not appear to be causal induction
• Instead this form of inductive reasoning is based on
1 Inductive generalisation
2 Statistical syllogism
Inductive Reasoning in Computer Science
3
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 2
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Today . . .
Inductive generalisation
Relevant learning outcomes:
• An inductive generalisation takes a sample of a population
1
and draws a conclusion about the entire population:
Ability to describe and discuss
economic, historic, organisational, research, and social
aspects of computing as a discipline and computing in practice
2
To effectively retrieve information
including the use of library and web sources and
the evaluation of information retrieved from such sources
3
To recognise and employ sound reasoning and argumentation
techniques as part of conducting basic research
L8 – 6
Definition Hasty Overgeneral Bias Observation
Proportion X of sample S have property P
therefore
Proportion X of the entire population have property P
Example:
• You have a box with 100 balls in it, some black, some white
• You draw a sample of 5 balls out of the box,
4 of them are black, i.e., 80%, and 1 is white, i.e., 20%
• Inductive generalisation:
80% of all the balls in the box are black and 20% are white
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 3
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Causal induction / Causal inference
Inductive generalisation
• Mill’s five methods of induction / five methods of experimental inquiry
1 Method of agreement
2 Method of difference
3 Joint method of agreement and difference
4 Method of concomitant variations
5 Method of residue
• A special case of inductive generalisation occurs
are methods for causal induction (or causal inference)
L8 – 7
Definition Hasty Overgeneral Bias Observation
when the proportion X of the sample represents the whole sample:
Every instance of sample S has property P
therefore
Every instance of the entire population has property P
Example:
Every crow that I have ever seen was black
therefore
Every crow in the entire world is black
• Causal induction draws a conclusion about a causal connection
based on the circumstances of the occurrence of an effect
• This was exactly the kind of inductive reasoning that we were looking for
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 4
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 8
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Definition Hasty Overgeneral Bias Observation
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Definition Accident Authority
Hasty generalisation
Statistical syllogism
• Inductive generalisation requires a sample that is sufficiently large and
• A statistical syllogism proceeds from a generalisation to
unbiased
a conclusion about an individual
• A sample that is too small can lead to a hasty generalisation
– Proportion X of the population have property P (where X is large)
– Individual I is a member of that population
– Therefore, I has property P
Example:
• You have a box with 100 balls in it, some black, some white, some red
• You draw a sample of 2 balls out of the box,
• Beware: Some dictionaries define a syllogism as
1 of them is black, i.e., 50%, and 1 is white, i.e., 50%
a “deductive scheme” or “deductive reasoning”
• Generalisation:
Statistical syllogism is not a form of deductive reasoning
It is a form of inductive reasoning
50% of all the balls in the box are black and 50% are white,
there are no red balls in the box
; A sample of 2 balls could never have been representative
given that there are 3 colours involved
; Note that this generalisation might still be correct!
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
Ind. generalisation Statistical syllogism Ind. reasoning in CS
• Syllogism means “conclusion” or “inference”
L8 – 9
Definition Hasty Overgeneral Bias Observation
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Overgeneralisation
Statistical syllogism
• A special instance of hasty generalisation is overgeneralisation
• A statistical syllogism proceeds from a generalisation to
• Overgeneralisation occurs if you draw an overly-general conclusion that
is unwarranted by the sample
Instances
Andy
Dave
Frank
Eve
Jack
Betty
Salad
yes
yes
yes
yes
yes
Fish
yes
Meat
yes
yes
yes
yes
yes
yes
Chicken
yes
yes
yes
yes
yes
L8 – 13
Definition Accident Authority
a conclusion about an individual
– Proportion X of the population have property P (where X is large)
– Individual I is a member of that population
– Therefore, I has property P
Sick
yes
yes
yes
yes
yes
Example:
– 90% of university students have above average intelligence
– You are a university student
– Therefore, you have above average intelligence
• Causal induction: This particular salad makes you sick
• Overgeneralisation: Salad is bad for you
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
Ind. generalisation Statistical syllogism Ind. reasoning in CS
L8 – 10
Definition Hasty Overgeneral Bias Observation
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Biased sample
Statistical syllogism: Fallacy by accident
• A biased sample occurs when a sample is collected in such a way that
• Fallacy by accident: a generalisation is applied when circumstances
some members of the intended population are less likely to be included
than others
• A biased sample is again not a sound basis for inductive generalisation
Example:
• The average age of people studying or working at the University
L8 – 14
Definition Accident Authority
suggest that there should be an exception
Example:
– Exceeding the speed limit is (almost always) an offence
– The driver of an ambulance has exceeded the speed limit
– Therefore, the driver has committed an offence
Obviously, we should realise that an ambulance may be exempted from
obeying the speed limit
is 28 years
• Generalisation: The average age of the UK population is 28 years
; – In reality, the average age of the UK population is 38 years
– The sample of people studying and working at the University
is biased towards younger people
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
Ind. generalisation Statistical syllogism Ind. reasoning in CS
L8 – 11
Definition Hasty Overgeneral Bias Observation
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Insufficient Range of Observational Circumstances
Statistical syllogism: Arguments from authority
Example:
• Arguments from authority can be seen as a version of
statistical syllogism:
• We observe that a fellow student, Michael, is grumpy on
Wednesday,
Wednesday,
Wednesday,
Wednesday,
2nd November,
9th November,
16th November,
23rd November
Statistical syllogism
– Proportion X of the population have property P (where X is large)
– Individual I is a member of that population
– Therefore, I has property P
• We conclude that Michael is always grumpy on Wednesdays
• We failed to recognise that these dates coincide with COMP101
coursework deadlines and that this is the cause for Michael’s grumpiness
• As soon as COMP101 is over Michael will be grumpy on a different day
of the week
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 15
Definition Accident Authority
L8 – 12
Argument from authority
– Most of what authority A says on subject matter S is correct
– X is something that A says in the context of S
– Therefore, X is true
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 16
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Definition Accident Authority
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Arguments from authority:
Appeal to inappropriate authority
BACON
• Another early example of a scientific discovery system is BACON
• Arguments from authority are best avoided in science
• If you still feel the need to use such an argument, make sure that you
avoid the fallacy of appeal to inappropriate authority where the authority
and subject matter does not satisfy all of the following conditions:
The authority is a recognised expert on the subject matter
There is general agreement among authorities on questions / statements
relating to that subject matter
3 There is no good reason to suspect that the authority is biased on the
subject matter or the particular question
1
2
(Langley et al, 1977–1983)
• Named after Francis Bacon (1561–1626),
a pioneer of the scientific method
• BACON was a system for the discovery of (scientific) numeric laws,
that is, laws of the form y = F (x)
• BACON was able to rediscover Ohm’s law, Boyle’s gas law,
Kepler’s law of planetary motion, Galileo’s law of uniform acceleration
• Uses the plan-generate-test approach using a number of
simple inference rules / rules of thumb for the generation of F
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
Ind. generalisation Statistical syllogism Ind. reasoning in CS
L8 – 17
Definition Accident Authority
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 21
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Statistical syllogism: Arguments from consensus
BACON: Example
• Arguments from consensus can be seen as a version of
We have the following data for the period of revolution (P) of four of
Jupiter’s moons in relation to their mean distance (D) to the planet
statistical syllogism:
Argument from consensus
– Most of the claims that most of the people agree upon are true
– X is a claim that most people agree upon
– Therefore, X is true
Moon
A
B
C
D
• Even worse than arguments from authority
• But admissible when the subject matter is public opinion or strongly
Distance (D)
5.67
8.67
14.00
24.67
Period (P)
1.769
3.571
7.155
16.689
The task is to find a function F linking P to D
influenced by public opinion
Example:
If opinion polls suggest that a considerable majority believes that there
will be a change of government at the next election, then there will be a
change of government
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 18
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 22
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Inductive reasoning: Summary and applications
BACON: Example
• Our motivation for considering inductive reasoning was the question
We have the following data for the period of revolution (P) of four of
Jupiter’s moons in relation to their mean distance (D) to the planet
What is the right proto-theory/hypothesis/model
in a particular situation?
• We have seen that, for example, the method of difference
may also help us with the question
What is the right experiment to conduct?
• Both of these questions relate to the conduct of Research in general
and the conduct of Computer Science Research in particular
Moon
A
B
C
D
Distance (D)
5.67
8.67
14.00
24.67
Period (P)
1.769
3.571
7.155
16.689
(D/P)
3.203
2.427
1.957
1.478
(D 2 /P)
18.153
21.036
27.395
36.459
(D 3 /P 2 )
58.15
51.06
53.61
53.89
The task is to find a function F linking P to D
p
D 3 /54.1775 = P
• A central question of Computer Science Research is
Solution: D 3 /P 2 = 54.1775 or
What can be (efficiently) automated
(described as an algorithmic process)?
; We have rediscovered Kepler’s third law:
“The square of the orbital period of a planet is directly
proportional to the cube of the semi-major axis of its orbit.”
• So, a natural question is
Can inductive reasoning be automated?
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 19
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 23
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Computational Scientific Discovery
Robot Scientist
• Developed by the University of Aberystwyth
Can inductive reasoning be automated?
• Experiments can be designed by intelligent software and
• Computational Scientific Discovery is the branch of Artificial Intelligence
that is concerned with providing answers to this question
executed by the robot
• The results are analysed automatically by the software
• An early example of a scientific discovery system is Meta-Dendral
B. G. Buchanan and E. A. Feigenbaum: Dendral and Meta-Dendral.
Artificial Intelligence 11(1–2):5–24, 1978
and are fed back into the next round of hypothesis
formation and experimentation
• Theory generation uses inductive reasoning
• System for rule discovery in the
area of chemical analysis via
mass spectrometry
• Motivated by applications in
space exploration
; Experiments and analysis may
need to be conducted without
human involvement
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 20
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 24
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Machine Learning
• Inductive reasoning is not only useful for research,
but for learning in general
• Machine Learning is the branch of Artificial Intelligence that is
concerned with the development of algorithms that learn rules,
behaviours, etc using inductive reasoning based on data
(or using abductive reasoning)
• Important subcategories of machine learning:
• Learning to classify
• Pattern recognition
• Example applications:
• Recognition of faces, crop blights, mal-manufactured items
• Intelligent non-player characters in computer games
• Classification of DNA sequences
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 25
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Data Mining
• Machine learning is a key component of Data Mining
• Typically associated with the analysis of large amounts of data
• Additionally involves storing large amounts of data, data cleansing,
data visualisation
• Aims to find
• previously unknown patterns
• unusual data records
• interdependencies in the data
(cluster analysis)
(anomaly detection)
(association rule mining)
• Example applications:
• Advertising:
To which offer/advertisement is a potential customer
most likely to respond
• Basket analysis: What items are customers most likely
to buy together
• Sensitive data: Finding a user’s religious affiliations, political leanings,
sexual orientation via analysis of social networking data
; Serious privacy concerns
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 26
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Data Mining: Example (People Analytics)
Google applied data mining to the question
What makes a good team leader?
Answer:
1
2
3
4
5
6
7
8
Be a good coach
Empower your teams and don’t micromanage
Express interest in team member’s success and personal well-being
Don’t be a sissy: be productive and results orientated
Be a good communicator and listen to your team
Help your employees with career development
Have a clear vision and strategy for the team
Have key technical skills so you can help your team
; ( 8 ) is the only surprise
– contradicts that “good managers can manage anything”
– also contradicts that “technicals skills” are the most important
skills for a manager
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 27
Ind. generalisation Statistical syllogism Ind. reasoning in CS
Further reading
• For more on Inductive Reasoning see
W. Hughes, J. Lavery, and K. Doran:
Critical Thinking: An Introduction to the Basic Skills (6th revised ed).
Broadview Press, 2010.
Chapter 10
Ullrich Hustadt
COMP110 Professional Skills in Computer Science
L8 – 28