CS计算机代考程序代写 data science Lecture 2 – GGR376

Lecture 2 – GGR376
Spatial Data Science II
Dr. Adams

Graphics in the news
Figure 1: REUTERS

Today’s Lecture
􏰀 Quantitative Revolution 􏰀 Central tendency
􏰀 RStudio Demo
􏰀 Distribution
􏰀 Cognitive Bias

Geography 1940s
During the 1940s many geography departments were closing, including the geography program at Harvard University in 1948.
“geography is not a university subject.” – Harvard President James B. Conant (Hardvard Magazine 2003)

Quantitative Revolution
The discipline of geography went through a major transformation in the 1950s and 1960s, which is known as the quantitative revolution.
􏰀 Division was increasing between human and physical geography

Quantitative Revolution II
The critics of geography included:
􏰀 Only descriptive and unscientific, lacking the explanation of why?
􏰀 Few applications of geography at the time.
􏰀 Is geography a science or a social science?
􏰀 Following WWII the world was focused on technology

Quantitative Revolution III
The quantitative revolution was in response to these critiques. It was primarily driven by geography departments in the USA.
The adoption and create of quantitative approaches in geography included:
􏰀 Descriptive Statistics
􏰀 Inferential Statistics
􏰀 Mathematical equations and models
􏰀 Gravity model
􏰀 Stochastic models that incorporated probability 􏰀 Deterministic models
􏰀 Location models

Post-revolution
Following the QR geographers begin to develop a number of technologies that are common place today.
􏰀 Geographic Information Systems/Science 􏰀 Remote Sensing
􏰀 Statistical Modelling
􏰀 Spatial Analysis & Statistics

Critiques of the Quantitative Revolution
In the 1970s the critiques of the QR included an inability to address issues of race, gender, class and war.
The fields of critical and feminist geography arose from these critics. 􏰀 Critical GIS/Cartography

RStudio Demo
􏰀 Follow along on your laptop if you wish. 􏰀 RStudio Features / Windows
􏰀 Scripts
􏰀 Notebooks

Classifying Data
The Steven’s Classification
A widely adopted classification for levels of measurement.
􏰀 Nominal
􏰀 Categories are arbitrary
􏰀 Ordinal
􏰀 A meaningful rank between the values
􏰀 Interval
􏰀 The interval between values is meaningful (same distance)
􏰀 Ratio
􏰀 Meaningful zero point
􏰀 Allows multiplication and division to be sensible.

(Some) Measures of Central Tendency
􏰀 Arithmetic mean (mean) 􏰀 Avearge or mean
􏰀 Median
􏰀 Middle Value in a set
􏰀 Mode
􏰀 Most frequent value
􏰀 Geometric mean
􏰀 nth root of the product of n numbers
􏰀 Often used for a set of numbers whose values are meant to be
multiplied together or are exponential in nature

Tiny changes big effects, and vice-versa (mean & median)
a
4
7
b
40
30
20
10
0
1234123412341234
Values
c
4
7
d
4
54
5
5
5
4
5
5
4
5
4
3
5
4
3
5
5
5
5
Count

How the mean and median are affected.
mean 2.5 / median 2.5
mean 2.48 / median 2
4
7
40
30
20
10
0
1234123412341234
Values
mean 2.1 / median 2.5
mean 2.06 / median 2
4
7
4
54
5
5
5
4
5
5
4
5
4
3
5
4
3
5
5
5
5
Count

School Grade Demo
Examine central tendencies on test data.
file: school-grade-example-lecture-2

Describing a Distribution
􏰀 Modes
􏰀 unimodal,
􏰀 bimodal, or 􏰀 multimodal
􏰀 Skewness 􏰀 Kurtosis

Unimodal example
Modes are peaks in a histogram. The heart and body weights of samples of male and female cats.
Histogram of cats_weight$Bwt
2.0 2.5 3.0 3.5 4.0
cats_weight$Bwt
Frequency
0 5 10 15 20 25 30

Modes – Bimodal
Galton (1886) data on the heights of parents and their children.
Parent’s heights from Galton (1886)
200
150
100
50
0
60 65 70 75
Height
count

Explore the data
Galton (1886) Parents’ Heights
200
150
100
50
0
Parent
Father Mother
60 65 70 75
Height
count

Law of small numbers
􏰀 Small samples may not abide by the same rules as the larger distribution.

Fallacy of the maturity of chances (Gambler’s Fallacy)
The mistaken (and often unfortunate) belief that if something happens more frequently than normal during a period, that it will happen less often in the future.
A Philosophical Essay on Probabilities (1796) – Pierre-Simon Laplace
􏰀 Identified that men who wanted a son would get anxious when lots of boys had been born recently, prior to their child’s birth.

Hot Hand
The belief of someone who achieves success on a random event, that they will have better luck at the event in the future.

Law of large numbers
As the number of trials or observations increases, the actual or observed probability approaches the theoretical or expected probability

Sequence of coin flips
11110111100110010010011001101111001 11101101010001101111011001100011111 11101010100111011101001110111010010 11000001001001011111101010010011101 00001010000111100010111110100001110 10110010101000010000000010110011110 01011111110011011110100011111001000 10110111010011001111000001010011011 00011011001100011100111010101110110 00100001001000010000010111110101011 11010001100011110001010111101010110 00101111111100110101000110110001101 01010000100010001000001110010010100 01110100110001010110100100101100101 00011000111110111101101010101111001 0001000110111010001011000101011110

Class example
􏰀 Dice / https://www.random.org/dice/ 􏰀 Graph Paper / Paper

Homework
Reading 2: Wickham, H. (2010). A layered grammar of graphics. Journal of Computational and Graphical Statistics, 19(1), 3-28

References
Hardvard Magazine. 2003. “Geographers Birth , and Job Prospects,” 47.