Python 時系列分析 1,000本ノック
– ノック46: 見せかけの回帰と共和分検定 –

Python 時系列分析 1,000本ノック– ノック46: 見せかけの回帰と共和分検定 –
次の Python コードの出力はどれでしょうか?

Python コード:

from statsmodels.tsa.stattools import coint
import numpy as np

np.random.seed(42)

x = np.random.randn(100).cumsum()

y = x + np.random.randn(100) 

coint_t, p_value, crit_value = coint(x, y)
print(f'Cointegration test statistic: {coint_t}')
print(f'p-value: {p_value}')

 

回答の選択肢:

(A) p値が0.01未満
(B) p値が0.01以上0.05未満
(C) p値が0.05以上0.10未満
(D) p値が0.10以上

Python 時系列分析 1,000本ノック– ノック47: 時系列特徴量 –