Probabilit y densit y f u nctions STATISTIC AL TH IN K IN G IN P - - PowerPoint PPT Presentation

probabilit y densit y f u nctions
SMART_READER_LITE
LIVE PREVIEW

Probabilit y densit y f u nctions STATISTIC AL TH IN K IN G IN P - - PowerPoint PPT Presentation

Probabilit y densit y f u nctions STATISTIC AL TH IN K IN G IN P YTH ON ( PAR T 1 ) J u stin Bois Lect u rer at the California Instit u te of Technolog y Contin u o u s v ariables Q u antities that can take an y v al u e , not j u st discrete v


slide-1
SLIDE 1

Probability density functions

STATISTIC AL TH IN K IN G IN P YTH ON (PAR T 1 )

Justin Bois

Lecturer at the California Institute of Technology

slide-2
SLIDE 2

STATISTICAL THINKING IN PYTHON (PART 1)

Continuous variables

Quantities that can take any value, not just discrete values

slide-3
SLIDE 3

STATISTICAL THINKING IN PYTHON (PART 1)

Michelson's speed of light experiment

slide-4
SLIDE 4

STATISTICAL THINKING IN PYTHON (PART 1)

Michelson's speed of light experiment

slide-5
SLIDE 5

STATISTICAL THINKING IN PYTHON (PART 1)

Probability density function (PDF)

Continuous analog to the PMF Mathematical description of the relative likelihood of

  • bserving a value of a continuous variable
slide-6
SLIDE 6

STATISTICAL THINKING IN PYTHON (PART 1)

Normal PDF

slide-7
SLIDE 7

STATISTICAL THINKING IN PYTHON (PART 1)

Normal PDF

slide-8
SLIDE 8

STATISTICAL THINKING IN PYTHON (PART 1)

Normal CDF

slide-9
SLIDE 9

STATISTICAL THINKING IN PYTHON (PART 1)

Normal CDF

slide-10
SLIDE 10

Let's practice!

STATISTIC AL TH IN K IN G IN P YTH ON (PAR T 1 )

slide-11
SLIDE 11

Introduction to the Normal distribution

STATISTIC AL TH IN K IN G IN P YTH ON (PAR T 1 )

Justin Bois

Lecturer at the California Institute of Technology

slide-12
SLIDE 12

STATISTICAL THINKING IN PYTHON (PART 1)

Normal distribution

Describes a continuous variable whose PDF has a single symmetric peak.

slide-13
SLIDE 13

STATISTICAL THINKING IN PYTHON (PART 1)

Normal distribution

slide-14
SLIDE 14

STATISTICAL THINKING IN PYTHON (PART 1)

Normal distribution

slide-15
SLIDE 15

STATISTICAL THINKING IN PYTHON (PART 1)

Normal distribution

slide-16
SLIDE 16

STATISTICAL THINKING IN PYTHON (PART 1)

Normal distribution

slide-17
SLIDE 17

STATISTICAL THINKING IN PYTHON (PART 1)

Normal distribution

slide-18
SLIDE 18

STATISTICAL THINKING IN PYTHON (PART 1)

slide-19
SLIDE 19

STATISTICAL THINKING IN PYTHON (PART 1)

slide-20
SLIDE 20

STATISTICAL THINKING IN PYTHON (PART 1)

Comparing data to a Normal PDF

slide-21
SLIDE 21

STATISTICAL THINKING IN PYTHON (PART 1)

Checking Normality of Michelson data

import numpy as np mean = np.mean(michelson_speed_of_light) std = np.std(michelson_speed_of_light) samples = np.random.normal(mean, std, size=10000) x, y = ecdf(michelson_speed_of_light) x_theor, y_theor = ecdf(samples)

slide-22
SLIDE 22

STATISTICAL THINKING IN PYTHON (PART 1)

Checking Normality of Michelson data

import matplotlib.pyplot as plt import seaborn as sns sns.set() _ = plt.plot(x_theor, y_theor) _ = plt.plot(x, y, marker='.', linestyle='none') _ = plt.xlabel('speed of light (km/s)') _ = plt.ylabel('CDF') plt.show()

slide-23
SLIDE 23

STATISTICAL THINKING IN PYTHON (PART 1)

Checking Normality of Michelson data

slide-24
SLIDE 24

Let's practice!

STATISTIC AL TH IN K IN G IN P YTH ON (PAR T 1 )

slide-25
SLIDE 25

The Normal distribution: Properties and warnings

STATISTIC AL TH IN K IN G IN P YTH ON (PAR T 1 )

Justin Bois

Lecturer at the California Institute of Technology

slide-26
SLIDE 26

STATISTICAL THINKING IN PYTHON (PART 1)

Image: Deutsche Bundesbank

slide-27
SLIDE 27

STATISTICAL THINKING IN PYTHON (PART 1)

The Gaussian distribution

slide-28
SLIDE 28

STATISTICAL THINKING IN PYTHON (PART 1)

Length of MA large mouth bass

slide-29
SLIDE 29

STATISTICAL THINKING IN PYTHON (PART 1)

Length of MA large mouth bass

slide-30
SLIDE 30

STATISTICAL THINKING IN PYTHON (PART 1)

Length of MA large mouth bass

slide-31
SLIDE 31

STATISTICAL THINKING IN PYTHON (PART 1)

Mass of MA large mouth bass

slide-32
SLIDE 32

STATISTICAL THINKING IN PYTHON (PART 1)

Light tails of the Normal distribution

slide-33
SLIDE 33

STATISTICAL THINKING IN PYTHON (PART 1)

Light tails of the Normal distribution

slide-34
SLIDE 34

Let's practice!

STATISTIC AL TH IN K IN G IN P YTH ON (PAR T 1 )

slide-35
SLIDE 35

The Exponential distribution

STATISTIC AL TH IN K IN G IN P YTH ON (PAR T 1 )

Justin Bois

Lecturer at the California Institute of Technology

slide-36
SLIDE 36

STATISTICAL THINKING IN PYTHON (PART 1)

The Exponential distribution

The waiting time between arrivals of a Poisson process is Exponentially distributed

slide-37
SLIDE 37

STATISTICAL THINKING IN PYTHON (PART 1)

The Exponential PDF

slide-38
SLIDE 38

STATISTICAL THINKING IN PYTHON (PART 1)

Possible Poisson process

Nuclear incidents: Timing of one is independent of all others

slide-39
SLIDE 39

STATISTICAL THINKING IN PYTHON (PART 1)

Exponential inter-incident times

mean = np.mean(inter_times) samples = np.random.exponential(mean, size=10000) x, y = ecdf(inter_times) x_theor, y_theor = ecdf(samples) _ = plt.plot(x_theor, y_theor) _ = plt.plot(x, y, marker='.', linestyle='none') _ = plt.xlabel('time (days)') _ = plt.ylabel('CDF') plt.show()

slide-40
SLIDE 40

STATISTICAL THINKING IN PYTHON (PART 1)

Exponential inter-incident times

slide-41
SLIDE 41

Let's practice!

STATISTIC AL TH IN K IN G IN P YTH ON (PAR T 1 )

slide-42
SLIDE 42

Final thoughts

STATISTIC AL TH IN K IN G IN P YTH ON (PAR T 1 )

Justin Bois

Lecturer at the California Institute of Technology

slide-43
SLIDE 43

STATISTICAL THINKING IN PYTHON (PART 1)

You now can…

Construct (beautiful) instructive plots Compute informative summary statistics Use hacker statistics Think probabilistically

slide-44
SLIDE 44

STATISTICAL THINKING IN PYTHON (PART 1)

In the sequel, you will…

Estimate parameter values Perform linear regressions Compute condence intervals Perform hypothesis tests

slide-45
SLIDE 45

Let's practice!

STATISTIC AL TH IN K IN G IN P YTH ON (PAR T 1 )