始める無料で始める

パークフィールドの地震間隔時間の推定

この演習では、まず地震間隔時間の指数分布モデルおよびガウスモデルのパラメータの最適推定値を計算します。次に、それぞれのモデルの理論CDFと、パークフィールドの実際の地震間隔時間から作成したECDFを重ねてプロットします。

この演習はコースの一部です

統計的思考 ケーススタディ

コースを見る

演習の手順

  • 平均地震間隔時間を計算し、mean_time_gap に格納しましょう。主要地震間の時間間隔(単位:年)は time_gap に格納されています。
  • 地震間隔時間の標準偏差を計算し、std_time_gap に格納しましょう。
  • np.random.exponential() を使って、適切な平均を持つ指数分布から10,000サンプルを生成し、time_gap_exp に格納しましょう。
  • np.random.normal() を使って、適切な平均と標準偏差を持つ正規分布から10,000サンプルを生成し、time_gap_norm に格納しましょう。
  • この章で紹介した *dcst.ecdf() の手法を使って、それぞれの理論CDFを1行ずつプロットしましょう。
  • formal=Truemin_x=-10max_x=50 のキーワード引数を指定して、ECDFをプロットしましょう。

実践的なインタラクティブ演習

このサンプルコードを完成させて、この演習に挑戦してみましょう。

# Compute the mean time gap: mean_time_gap
mean_time_gap = ____

# Standard deviation of the time gap: std_time_gap
std_time_gap = ____

# Generate theoretical Exponential distribution of timings: time_gap_exp
time_gap_exp = ____

# Generate theoretical Normal distribution of timings: time_gap_norm
time_gap_norm = ____

# Plot theoretical CDFs
_ = plt.plot(*____)
_ = plt.plot(*____)

# Plot Parkfield ECDF
_ = plt.plot(*____(____, ____=____, ____=____, ____=____))

# Add legend
_ = plt.legend(('Exp.', 'Norm.'), loc='upper left')

# Label axes, set limits and show plot
_ = plt.xlabel('time gap (years)')
_ = plt.ylabel('ECDF')
_ = plt.xlim(-10, 50)
plt.show()
コードを編集して実行