Important Concepts, Handy Techniques, and Some Cautionary Tales
This presentation
40 minutes
Superweek
5 days
My last job
5 years
Yehoshua’s intros
It rarely looks quite like this
Let’s think about statistics
Maybe. Maybe not.
But…we can’t sample from the future!
So…what is our sample?
DALL-E 2: “A room full of puppies who all have different astonished expressions on their faces, digital art”
A stationary time series is one whose statistical properties do not depend on the time at which the series is observed. 1
A stationary time series is one whose statistical properties do not depend on the time at which the series is observed. 1
A stationary time series is one whose statistical properties do not depend on the time at which the series is observed. 1
A stationary time series is one whose statistical properties do not depend on the time at which the series is observed. 1
R2 = 0.84
Date | Orders | 1st Diff: Orders |
---|---|---|
2023-01-20 | 9,482 | |
2023-01-21 | 10,164 | |
2023-01-22 | 9,503 | |
2023-01-23 | 11,317 | |
2023-01-24 | 9,980 | |
2023-01-25 | 10,484 | |
2023-01-26 | 10,458 |
Date | Orders | 1st Diff: Orders |
---|---|---|
2023-01-20 | 9,482 | |
2023-01-21 | 10,164 | |
2023-01-22 | 9,503 | |
2023-01-23 | 11,317 | |
2023-01-24 | 9,980 | |
2023-01-25 | 10,484 | |
2023-01-26 | 10,458 |
Date | Orders | 1st Diff: Orders |
---|---|---|
2023-01-20 | 9,482 | |
2023-01-21 | 10,164 | |
2023-01-22 | 9,503 | |
2023-01-23 | 11,317 | 1,814 |
2023-01-24 | 9,980 | |
2023-01-25 | 10,484 | |
2023-01-26 | 10,458 |
Date | Orders | 1st Diff: Orders |
---|---|---|
2023-01-20 | 9,482 | NA |
2023-01-21 | 10,164 | 682 |
2023-01-22 | 9,503 | −661 |
2023-01-23 | 11,317 | 1,814 |
2023-01-24 | 9,980 | −1,337 |
2023-01-25 | 10,484 | 504 |
2023-01-26 | 10,458 | −26 |
Date | Orders | 1st Diff: Orders | Social | 1st Diff: Social |
---|---|---|---|---|
2023-01-20 | 9,482 | NA | 5,754 | NA |
2023-01-21 | 10,164 | 682 | 6,181 | 427 |
2023-01-22 | 9,503 | −661 | 5,650 | −531 |
2023-01-23 | 11,317 | 1,814 | 6,265 | 615 |
2023-01-24 | 9,980 | −1,337 | 6,603 | 338 |
2023-01-25 | 10,484 | 504 | 7,114 | 511 |
2023-01-26 | 10,458 | −26 | 6,522 | −592 |
R2 = 0.00
These are both moving with time…but not directly with each other
Let’s shift gears
Decomposition can be amazing
The Seasonal Component
The Trend Component
What’s Left!
“The Mean”
“The Variance”
This is powerful!
And now…to Bayesian things!
Specifically, Bayesian Structural Time-Series
Time-series decomposition turned up to 11
At its core: estimate the impact of an intervention
“We didn’t test it, so can we just do a pre-/post- analysis?”
Their relationship to the metric of interest is stable
They are not themselves affected by the intervention
This is not a silver bullet!
What is “the population?”
Regardless…“the sample” is not ideal
Stationarity: constant mean, constant variance
First differences: don’t jump to correlations
Time-series decomposition
Bayesian structural time-series
Time…is hard.
Thank you!
Presentation: bit.ly/sw-time-series
Podcast: analyticshour.io
LinkedIn:
This presentation was 100% built with R (and Quarto w/ reveal.js)
The images are (almost) 100% DALL-E 2
The background image is from my “daily diversion” on Twitter
bit.ly/sw-time-series | @tgwilson | tim@gilliganondata.com