Slide 1

Slide 1 text

Urban Informatics Fall 2015 dr. federica bianco [email protected] @fedhere

Slide 2

Slide 2 text

V: Likelihood and Regression Models ASK QUESTIONS!!

Slide 3

Slide 3 text

V: Likelihood and Regression Models • Good practices with data: falsifiability, reproducibility • Basic data retrieving and munging: APIs, Data formats • Basic statistics: distributions and their moments • Hypothesis testing: p-value, statistical significance • Statistical and Systematic errors • Goodness of fit tests Recap:

Slide 4

Slide 4 text

V: Likelihood and Regression Models • Good practices with data: falsifiability, reproducibility • Basic data retrieving and munging: APIs, Data formats • Basic statistics: distributions and their moments • Hypothesis testing: p-value, statistical significance • Statistical and Systematic errors • Goodness of fit tests Recap: Today: • Likelihood • Linear Regression • Predictive models

Slide 5

Slide 5 text

V: Likelihood and Regression Models Likelihood

Slide 6

Slide 6 text

V: Likelihood and Regression Models Probability Likelihood

Slide 7

Slide 7 text

V: Likelihood and Regression Models Probability Likelihood

Slide 8

Slide 8 text

V: Likelihood and Regression Models Probability Likelihood μ σ

Slide 9

Slide 9 text

V: Likelihood and Regression Models Probability Likelihood

Slide 10

Slide 10 text

V: Likelihood and Regression Models Probability Likelihood

Slide 11

Slide 11 text

V: Likelihood and Regression Models Probability Likelihood

Slide 12

Slide 12 text

V: Likelihood and Regression Models Probability Likelihood

Slide 13

Slide 13 text

V: Likelihood and Regression Models Probability Likelihood

Slide 14

Slide 14 text

V: Likelihood and Regression Models Probability Likelihood

Slide 15

Slide 15 text

V: Likelihood and Regression Models Probability Likelihood

Slide 16

Slide 16 text

V: Likelihood and Regression Models Probability Likelihood

Slide 17

Slide 17 text

V: Likelihood and Regression Models Probability Likelihood

Slide 18

Slide 18 text

V: Likelihood and Regression Models Probability Likelihood

Slide 19

Slide 19 text

V: Likelihood and Regression Models Likelihood-ratio tests

Slide 20

Slide 20 text

V: Likelihood and Regression Models LR = _______________________________ False Negative True Negative

Slide 21

Slide 21 text

V: Likelihood and Regression Models This statistic is chi-squared distributed with degrees of freedom equal to the difference in the number of degrees of freedom between the two models (i.e., the number of variables added to the model). LR = -2 loge ____________ L(model 1) L(model 2)

Slide 22

Slide 22 text

V: Likelihood and Regression Models This statistic is chi-squared distributed with degrees of freedom equal to the difference in the number of degrees of freedom between the two models (i.e., the number of variables added to the model). LR = -2 loge ____________ L(model 1) L(model 2)

Slide 23

Slide 23 text

V: Likelihood and Regression Models https://github.com/fedhere/UInotebooks/blob/master/ line_fit_and_residuals.ipynb

Slide 24

Slide 24 text

V: Likelihood and Regression Models Maximizing Likelihood

Slide 25

Slide 25 text

V: Likelihood and Regression Models Probability Likelihood Given some observations x we want to model them with the best function: the one that is MAXIMALLY LIKELY.

Slide 26

Slide 26 text

V: Likelihood and Regression Models Probability Likelihood Given some observations x we want to model them with the best function: the one that is MAXIMALLY LIKELY. After we choose a functional form (N) for the model we want to choose the parameters that maximize

Slide 27

Slide 27 text

V: Likelihood and Regression Models Probability Likelihood FIND µ*, σ* | = max( )

Slide 28

Slide 28 text

V: Likelihood and Regression Models Logarithm:

Slide 29

Slide 29 text

V: Likelihood and Regression Models Logarithm: MONOTONICALLY INCREASING

Slide 30

Slide 30 text

V: Likelihood and Regression Models Logarithm: MONOTONICALLY INCREASING if x grows, log(x) grows, if x decreases, log(x) decreases the location of the maximum is the same!

Slide 31

Slide 31 text

V: Likelihood and Regression Models Logarithm: MONOTONICALLY INCREASING SUPPORT : (0: ]

Slide 32

Slide 32 text

V: Likelihood and Regression Models Logarithm: MONOTONICALLY INCREASING SUPPORT : (0: ] Not a problem cause L like P is positive defined

Slide 33

Slide 33 text

V: Likelihood and Regression Models Probability log Likelihood

Slide 34

Slide 34 text

V: Likelihood and Regression Models Probability log Likelihood

Slide 35

Slide 35 text

V: Likelihood and Regression Models Probability log Likelihood

Slide 36

Slide 36 text

V: Likelihood and Regression Models Probability log Likelihood

Slide 37

Slide 37 text

V: Likelihood and Regression Models Probability log Likelihood

Slide 38

Slide 38 text

V: Likelihood and Regression Models Probability log Likelihood

Slide 39

Slide 39 text

V: Likelihood and Regression Models Probability max log Likelihood

Slide 40

Slide 40 text

V: Likelihood and Regression Models Probability max log Likelihood

Slide 41

Slide 41 text

V: Likelihood and Regression Models Probability max log Likelihood

Slide 42

Slide 42 text

V: Likelihood and Regression Models This statistic is chi-squared distributed with degrees of freedom equal to the difference in the number of degrees of freedom between the two models (i.e., the number of variables added to the model). LR = -2 loge ________________ max L(model 1) max L(model 2)

Slide 43

Slide 43 text

V: Likelihood and Regression Models This statistic is chi-squared distributed with degrees of freedom equal to the difference in the number of degrees of freedom between the two models (i.e., the number of variables added to the model). LR = -2 loge ________________ max L(model 1) max L(model 2)

Slide 44

Slide 44 text

V: Likelihood and Regression Models J. Leek & P. Rodgers Leek&Rodgers 2015 in Science http://www.sciencemag.org/content/347/6228/1314.full.pdf

Slide 45

Slide 45 text

V: Likelihood and Regression Models Causal / Mechanicistic

Slide 46

Slide 46 text

V: Likelihood and Regression Models

Slide 47

Slide 47 text

V: Likelihood and Regression Models

Slide 48

Slide 48 text

V: Likelihood and Regression Models Predictive

Slide 49

Slide 49 text

V: Likelihood and Regression Models

Slide 50

Slide 50 text

V: Likelihood and Regression Models

Slide 51

Slide 51 text

V: Likelihood and Regression Models

Slide 52

Slide 52 text

V: Likelihood and Regression Models http://www.sciencemag.org/content/349/6251/aac4716.full.pdf

Slide 53

Slide 53 text

V: Likelihood and Regression Models Why?

Slide 54

Slide 54 text

V: Likelihood and Regression Models git status

Slide 55

Slide 55 text

V: Likelihood and Regression Models How?

Slide 56

Slide 56 text

V: Likelihood and Regression Models

Slide 57

Slide 57 text

V: Likelihood and Regression Models

Slide 58

Slide 58 text

V: Likelihood and Regression Models

Slide 59

Slide 59 text

V: Likelihood and Regression Models

Slide 60

Slide 60 text

V: Likelihood and Regression Models

Slide 61

Slide 61 text

V: Likelihood and Regression Models

Slide 62

Slide 62 text

V: Likelihood and Regression Models 11655.34 12155.24 Sum of residuals squared

Slide 63

Slide 63 text

V: Likelihood and Regression Models https://github.com/fedhere/UInotebooks/blob/master/ Anscombe's%20Quartet.ipynb

Slide 64

Slide 64 text

V: Likelihood and Regression Models https://github.com/fedhere/ PUI2015_fbianco/blob/master/HW5/ building_nrg.ipynb

Slide 65

Slide 65 text

IV: Statistical analysis MUST KNOWS: • What is the likelihood • Likelihood ratio test • Minimization concepts • Least square fits (OLS, WLS)

Slide 66

Slide 66 text

V: Likelihood and Regression Models Resources: Sarah Boslaugh, Dr. Paul Andrew Watters, 2008 Statistics in a Nutshell (Chapters 3,4,5) https://books.google.com/books/about/Statistics_in_a_Nutshell.html?id=ZnhgO65Pyl4C David M. Lane et al. Introduction to Statistics (XVIII) http://onlinestatbook.com/Online_Statistics_Education.epub http://onlinestatbook.com/2/index.html