Welcome to the co u rse ! FOU N DATION S OF IN FE R E N C E Jo - - PowerPoint PPT Presentation

welcome to the co u rse
SMART_READER_LITE
LIVE PREVIEW

Welcome to the co u rse ! FOU N DATION S OF IN FE R E N C E Jo - - PowerPoint PPT Presentation

Welcome to the co u rse ! FOU N DATION S OF IN FE R E N C E Jo Hardin Instr u ctor What is statistical inference ? The process of making claims abo u t a pop u lation based on information from a sample FOUNDATIONS OF INFERENCE What is


slide-1
SLIDE 1

Welcome to the course!

FOU N DATION S OF IN FE R E N C E

Jo Hardin

Instructor

slide-2
SLIDE 2

FOUNDATIONS OF INFERENCE

What is statistical inference?

The process of making claims about a population based on information from a sample

slide-3
SLIDE 3

FOUNDATIONS OF INFERENCE

What is statistical inference?

slide-4
SLIDE 4

FOUNDATIONS OF INFERENCE

What is statistical inference?

slide-5
SLIDE 5

FOUNDATIONS OF INFERENCE

What is statistical inference?

slide-6
SLIDE 6

FOUNDATIONS OF INFERENCE

What is statistical inference?

slide-7
SLIDE 7

FOUNDATIONS OF INFERENCE

Assume two populations prefer cola at same rate

slide-8
SLIDE 8

FOUNDATIONS OF INFERENCE

The sample data

slide-9
SLIDE 9

FOUNDATIONS OF INFERENCE

The sample data (take 2)

slide-10
SLIDE 10

FOUNDATIONS OF INFERENCE

Vocabulary

Null hypothesis (H ): The claim is not that interesting Alternative hypothesis (H ): The claim corresponding to the research hypothesis The "goal" is to disprove the null hypothesis

A

slide-11
SLIDE 11

FOUNDATIONS OF INFERENCE

Example: cheetah speed

Compare speed of two dierent subspecies of cheetah

H : Asian and African cheetahs run the same

speed, on average

H : African cheetahs are faster than Asian

cheetahs, on average

A

slide-12
SLIDE 12

FOUNDATIONS OF INFERENCE

Example: election

From a sample, the researchers would like to claim that Candidate X will win

H : Candidate X will get half the votes H : Candidate X will get more than half the

votes

A

slide-13
SLIDE 13

Let's practice!

FOU N DATION S OF IN FE R E N C E

slide-14
SLIDE 14

Randomized distributions

FOU N DATION S OF IN FE R E N C E

Jo Hardin

Instructor

slide-15
SLIDE 15

FOUNDATIONS OF INFERENCE

Logic of inference

slide-16
SLIDE 16

FOUNDATIONS OF INFERENCE

Logic of inference

slide-17
SLIDE 17

FOUNDATIONS OF INFERENCE

Logic of inference

slide-18
SLIDE 18

FOUNDATIONS OF INFERENCE

Logic of inference

slide-19
SLIDE 19

FOUNDATIONS OF INFERENCE

Logic of inference

slide-20
SLIDE 20

FOUNDATIONS OF INFERENCE

Logic of inference

slide-21
SLIDE 21

FOUNDATIONS OF INFERENCE

Understanding the null distribution

Generating a distribution of the statistic from the null population gives information about whether the observed data are inconsistent with the null hypothesis

slide-22
SLIDE 22

FOUNDATIONS OF INFERENCE

Understanding the null distribution

Original data Location Cola Orange East 28 6 West 19 7

= 28/(28 + 6) = 0.82 = 19/(19 + 7) = 0.73 p ^east p ^west

slide-23
SLIDE 23

FOUNDATIONS OF INFERENCE

Understanding the null distribution

First shue, same as original Location Cola Orange East 28 6 West 19 7

slide-24
SLIDE 24

FOUNDATIONS OF INFERENCE

Understanding the null distribution

Second shue Location Cola Orange East 27 7 West 20 6

slide-25
SLIDE 25

FOUNDATIONS OF INFERENCE

Understanding the null distribution

Third shue Location Cola Orange East 28 8 West 21 5

slide-26
SLIDE 26

FOUNDATIONS OF INFERENCE

Understanding the null distribution

Fourth shue Location Cola Orange East 25 9 West 22 4

slide-27
SLIDE 27

FOUNDATIONS OF INFERENCE

Understanding the null distribution

Fih shue Location Cola Orange East 29 5 West 18 8

slide-28
SLIDE 28

FOUNDATIONS OF INFERENCE

Understanding the null distribution

Fih shue Location Cola Orange East 29 5 West 18 8

slide-29
SLIDE 29

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-30
SLIDE 30

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-31
SLIDE 31

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-32
SLIDE 32

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-33
SLIDE 33

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-34
SLIDE 34

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-35
SLIDE 35

FOUNDATIONS OF INFERENCE

One random permutation

soda %>% group_by(location) %>% summarize(prop_cola = mean(drink == "cola")) %>% summarize(diff(prop_cola)) # A tibble: 1 x 1 `diff(prop_cola)` <dbl> 1 -0.09276018 library(infer) soda %>% specify(drink ~ location, success = "cola") %>% hypothesize(null = "independence") %>% generate(reps = 1, type = "permute") %>% calculate(stat = "diff in props",

  • rder = c("west","east"))

# A tibble: 1 x 2 replicate stat <int> <dbl> 1 1 -0.02488688

slide-36
SLIDE 36

FOUNDATIONS OF INFERENCE

Many random permutations

soda %>% specify(drink ~ location, success = "cola") %>% hypothesize(null = "independence") %>% generate(reps = 5, type = "permute") %>% calculate(stat = "diff in props", order = c("west", "east")) # A tibble: 5 x 2 replicate stat <int> <dbl> 1 1 0.04298643 2 2 -0.09276018 3 3 0.11085973 4 4 0.17873303 5 5 -0.16063348

slide-37
SLIDE 37

FOUNDATIONS OF INFERENCE

Random distribution

slide-38
SLIDE 38

Let's practice!

FOU N DATION S OF IN FE R E N C E

slide-39
SLIDE 39

Using the randomization distribution

FOU N DATION S OF IN FE R E N C E

Jo Hardin

Instructor

slide-40
SLIDE 40

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-41
SLIDE 41

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-42
SLIDE 42

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-43
SLIDE 43

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-44
SLIDE 44

FOUNDATIONS OF INFERENCE

Understanding the null distribution

slide-45
SLIDE 45

FOUNDATIONS OF INFERENCE

Data consistent with null?

table(soda) location drink East West cola 28 19

  • range 6 7

soda %>% group_by(location) %>% summarize(mean(drink == "cola")) # A tibble: 2 × 2 location `mean(drink == "cola")` <fctr> <dbl> 1 East 0.8235294 2 West 0.7307692

slide-46
SLIDE 46

FOUNDATIONS OF INFERENCE

Significance

slide-47
SLIDE 47

FOUNDATIONS OF INFERENCE

How extreme are the observed data?

diff_orig <- soda %>% group_by(location) %>% summarize(prop_cola = mean(drink == "cola")) %>% summarize(diff(prop_cola)) %>% pull() soda_perm <- soda %>% specify(drink ~ location, success = "cola") %>% hypothesize(null = "independence") %>% generate(reps = 100, type = "permute") %>% calculate(stat = "diff in props",

  • rder = c("west", "east"))

soda_perm %>% summarize(proportion = mean(diff_orig >= stat)) # A tibble: 1 x 1 proportion <dbl> 1 0.380

slide-48
SLIDE 48

Let's practice!

FOU N DATION S OF IN FE R E N C E

slide-49
SLIDE 49

Study conclusions

FOU N DATION S OF IN FE R E N C E

Jo Hardin

Instructor

slide-50
SLIDE 50

FOUNDATIONS OF INFERENCE

Significance

We fail to reject the null hypothesis: There is no evidence that our data are inconsistent with the null hypothesis

slide-51
SLIDE 51

FOUNDATIONS OF INFERENCE

NHANES: random sample

Representative sample of US population Conclusions from sample may apply to population Nothing to report in this case

slide-52
SLIDE 52

Let's practice!

FOU N DATION S OF IN FE R E N C E