Research Question 1
Data Cleaning
4
California
2020-03-19 00:00:00
44
Kentucky
2020-03-26 00:00:00
74
New Jersey
2020-03-21 00:00:00
73
New Hampshire
2020-03-28 00:00:00
169
Washington
2020-03-23 00:00:00
9
Florida
2020-04-03 00:00:00
126
Texas
2020-04-02 00:00:00
118
South Carolina
2020-04-07 00:00:00
0
Alabama
2020-04-04 00:00:00
21
Georgia
2020-04-03 00:00:00
0
California
ONT
1
California
ONT
2
California
ONT
3
California
ONT
4
California
ONT
5
California
ONT
6
California
ONT
7
California
ONT
8
California
ONT
9
California
ONT
220
Washington
SEA
221
Washington
SEA
222
Washington
SEA
223
Washington
SEA
224
Washington
SEA
225
Washington
SEA
226
Washington
SEA
227
Washington
SEA
228
Washington
SEA
229
Washington
SEA
0
California
SFO
1
California
SFO
2
California
SJC
3
California
SJC
4
California
SJC
5
California
SJC
6
California
SJC
7
California
SMF
8
California
SMF
9
California
SMF
Hypothesis Testing
While we initially had a standard p-value cutoff of 0.05, we can see from these results we would reject the null hypothesis for all ten states because they all had p-values of 0.0. These values imply that the presence of a lockdown order did have a significant effect on cancellation rates of flights. This is corroborated by one of our visualizations from earlier, which indicated that flights that occurred during lockdown had significantly higher cancellation rates than those that didn't for all ten states.
We also performed similar hypothesis tests under the same procedures for the effect of lockdown orders on flight departure delays. The ten p-values above all fall under the threshold of 0.05 with one exception: New Hampshire. These results imply that lockdown orders also had noticeable impacts on not just cancellation rates, but also the length of departure delays.
Error Rate Control
For the Bonferroni method, which controls FWER, given that we have 10 tests with a general p-value threshold of 0.05, we would set the cutoff line at 0.05 / 10 = 0.005. However, given that all of our p-values are 0 for the cancellations hypothesis testing, we would still reject the null hypothesis for all cases. There is a similar case for the delays hypothesis testing; we still only fail to reject the null hypothesis for one state, New Hampshire.
For the Benjamini-Hochberg method, which controls FDR, we see a very similar case to the Bonferroni method, where almost all discoveries are accepted with the exception of New Hampshire for delays.
Research Question 2
Data Cleaning
1307
2020-01-06 00:00:00
3.505
1308
2020-01-13 00:00:00
3.497
1309
2020-01-20 00:00:00
3.487
1310
2020-01-27 00:00:00
3.467
1311
2020-02-03 00:00:00
3.455
1312
2020-02-10 00:00:00
3.449
1313
2020-02-17 00:00:00
3.441
1314
2020-02-24 00:00:00
3.443
1315
2020-03-02 00:00:00
3.435
1316
2020-03-09 00:00:00
3.403
15543
2020-06-11 00:00:00
CA
15553
2020-08-18 00:00:00
CA
15562
2021-02-25 00:00:00
CA
15573
2021-02-10 00:00:00
CA
15576
2020-09-06 00:00:00
CA
15639
2020-10-16 00:00:00
CA
15649
2021-02-26 00:00:00
CA
15666
2020-11-10 00:00:00
CA
15698
2021-06-28 00:00:00
CA
15704
2020-08-10 00:00:00
CA
0
2020-01-06 00:00:00
3.505
1
2020-01-13 00:00:00
3.497
2
2020-01-20 00:00:00
3.487
3
2020-01-27 00:00:00
3.467
4
2020-02-03 00:00:00
3.455
5
2020-02-10 00:00:00
3.449
6
2020-02-17 00:00:00
3.441
7
2020-02-24 00:00:00
3.443
8
2020-03-02 00:00:00
3.435
9
2020-03-09 00:00:00
3.403
959
2021-09-27 00:00:00
3.096
960
2021-10-04 00:00:00
3.074
961
2021-10-11 00:00:00
3.22
962
2021-10-18 00:00:00
3.221
963
2021-10-25 00:00:00
3.362
964
2021-11-01 00:00:00
3.348
965
2021-11-08 00:00:00
3.321
966
2021-11-15 00:00:00
3.299
967
2021-11-22 00:00:00
3.396
968
2021-11-29 00:00:00
3.376
78
2022-08-22 00:00:00
FL
93
2021-04-10 00:00:00
FL
102
2020-10-17 00:00:00
FL
112
2021-08-18 00:00:00
FL
133
2021-03-10 00:00:00
FL
191
2022-08-25 00:00:00
FL
230
2021-01-18 00:00:00
FL
272
2021-10-13 00:00:00
FL
316
2020-02-09 00:00:00
FL
334
2021-09-23 00:00:00
FL
0
2020-01-06 00:00:00
2.576
1
2020-01-13 00:00:00
2.52
2
2020-01-20 00:00:00
2.546
3
2020-01-27 00:00:00
2.474
4
2020-02-03 00:00:00
2.401
5
2020-02-10 00:00:00
2.409
6
2020-02-17 00:00:00
2.357
7
2020-02-24 00:00:00
2.444
8
2020-03-02 00:00:00
2.374
9
2020-03-09 00:00:00
2.309
1024
2020-01-06 00:00:00
2.722
1025
2020-01-13 00:00:00
2.725
1026
2020-01-20 00:00:00
2.705
1027
2020-01-27 00:00:00
2.673
1028
2020-02-03 00:00:00
2.635
1029
2020-02-10 00:00:00
2.609
1030
2020-02-17 00:00:00
2.587
1031
2020-02-24 00:00:00
2.584
1032
2020-03-02 00:00:00
2.57
1033
2020-03-09 00:00:00
2.547
58450
2022-08-19 00:00:00
NY
8440
2022-08-20 00:00:00
NY
1233
2022-08-21 00:00:00
NY
8544
2022-08-22 00:00:00
NY
52381
2022-08-23 00:00:00
NY
53271
2022-08-24 00:00:00
NY
45058
2022-08-25 00:00:00
NY
56764
2022-08-26 00:00:00
NY
4955
2022-08-27 00:00:00
NY
51429
2022-08-28 00:00:00
NY
70
2021-05-10 00:00:00
3.017
71
2021-05-17 00:00:00
3.061
72
2021-05-24 00:00:00
3.068
73
2021-05-31 00:00:00
3.062
74
2021-06-07 00:00:00
3.088
75
2021-06-14 00:00:00
3.135
76
2021-06-21 00:00:00
3.146
77
2021-06-28 00:00:00
3.156
78
2021-07-05 00:00:00
3.186
79
2021-07-12 00:00:00
3.201
1024
2020-01-06 00:00:00
2.325
1025
2020-01-13 00:00:00
2.324
1026
2020-01-20 00:00:00
2.274
1027
2020-01-27 00:00:00
2.244
1028
2020-02-03 00:00:00
2.18
1029
2020-02-10 00:00:00
2.134
1030
2020-02-17 00:00:00
2.127
1031
2020-02-24 00:00:00
2.204
1032
2020-03-02 00:00:00
2.163
1033
2020-03-09 00:00:00
2.111
12323
2021-09-03 00:00:00
TX
8963
2021-09-04 00:00:00
TX
14305
2021-09-05 00:00:00
TX
59632
2021-09-06 00:00:00
TX
4953
2021-09-07 00:00:00
TX
14616
2021-09-08 00:00:00
TX
47091
2021-09-09 00:00:00
TX
45523
2021-09-10 00:00:00
TX
52431
2021-09-11 00:00:00
TX
54300
2021-09-12 00:00:00
TX
50
2020-12-21 00:00:00
1.984
51
2020-12-28 00:00:00
1.971
52
2021-01-04 00:00:00
1.962
53
2021-01-11 00:00:00
2.057
54
2021-01-18 00:00:00
2.173
55
2021-01-25 00:00:00
2.149
56
2021-02-01 00:00:00
2.154
57
2021-02-08 00:00:00
2.209
58
2021-02-15 00:00:00
2.268
59
2021-02-22 00:00:00
2.403
Causal Inference Modelling
Requirement already satisfied: statsmodels==0.13.5 in /root/venv/lib/python3.9/site-packages (0.13.5)
Requirement already satisfied: patsy>=0.5.2 in /root/venv/lib/python3.9/site-packages (from statsmodels==0.13.5) (0.5.3)
Requirement already satisfied: scipy>=1.3 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from statsmodels==0.13.5) (1.9.3)
Requirement already satisfied: packaging>=21.3 in /shared-libs/python3.9/py-core/lib/python3.9/site-packages (from statsmodels==0.13.5) (21.3)
Requirement already satisfied: pandas>=0.25 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from statsmodels==0.13.5) (1.2.5)
Requirement already satisfied: numpy>=1.17 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from statsmodels==0.13.5) (1.23.4)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /shared-libs/python3.9/py-core/lib/python3.9/site-packages (from packaging>=21.3->statsmodels==0.13.5) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7.3 in /shared-libs/python3.9/py-core/lib/python3.9/site-packages (from pandas>=0.25->statsmodels==0.13.5) (2.8.2)
Requirement already satisfied: pytz>=2017.3 in /shared-libs/python3.9/py/lib/python3.9/site-packages (from pandas>=0.25->statsmodels==0.13.5) (2022.5)
Requirement already satisfied: six in /shared-libs/python3.9/py-core/lib/python3.9/site-packages (from patsy>=0.5.2->statsmodels==0.13.5) (1.16.0)
WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available.
You should consider upgrading via the '/root/venv/bin/python -m pip install --upgrade pip' command.
0
2020-01-06 00:00:00
3.505
1
2020-01-13 00:00:00
3.497
2
2020-01-20 00:00:00
3.487
3
2020-01-27 00:00:00
3.467
4
2020-02-03 00:00:00
3.455
5
2020-02-10 00:00:00
3.449
6
2020-02-17 00:00:00
3.441
7
2020-02-24 00:00:00
3.443
8
2020-03-02 00:00:00
3.435
9
2020-03-09 00:00:00
3.403
OLS Regression Results
=======================================================================================
Dep. Variable: gas_all_grades R-squared (uncentered): 0.577
Model: OLS Adj. R-squared (uncentered): 0.569
Method: Least Squares F-statistic: 69.61
Date: Tue, 13 Dec 2022 Prob (F-statistic): 8.61e-20
Time: 05:36:56 Log-Likelihood: -237.82
No. Observations: 104 AIC: 479.6
Df Residuals: 102 BIC: 484.9
Df Model: 2
Covariance Type: nonrobust
==============================================================================
coef std err t P>|t| [0.025 0.975]
------------------------------------------------------------------------------
lockdown 2.5434 0.353 7.196 0.000 1.842 3.244
new_case 1.342e-05 3.33e-06 4.032 0.000 6.82e-06 2e-05
==============================================================================
Omnibus: 4.560 Durbin-Watson: 0.045
Prob(Omnibus): 0.102 Jarque-Bera (JB): 2.805
Skew: -0.200 Prob(JB): 0.246
Kurtosis: 2.302 Cond. No. 1.26e+05
==============================================================================
Notes:
[1] R² is computed without centering (uncentered) since the model does not contain a constant.
[2] Standard Errors assume that the covariance matrix of the errors is correctly specified.
[3] The condition number is large, 1.26e+05. This might indicate that there are
strong multicollinearity or other numerical problems.