शुरू करेंमुफ़्त में शुरू करें

Parkfield के लिए भूकंप-अंतराल समय के अनुमान

इस अभ्यास में, आप पहले interearthquake times के लिए Exponential और Gaussian मॉडलों के parameters के सर्वोत्तम अनुमान निकालेंगे. उसके बाद, आप इन मॉडलों के theoretical CDFs को वास्तविक Parkfield interearthquake times की formal ECDF के साथ प्लॉट करेंगे.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Statistical Thinking के केस स्टडीज़

पाठ्यक्रम देखें

अभ्यास निर्देश

  • Mean interearthquake time निकालिए और उसे mean_time_gap के रूप में स्टोर कीजिए. बड़े भूकंपों के बीच के समय-अंतराल, वर्षों में, time_gap में स्टोर हैं.
  • Interearthquake times का standard deviation निकालिए और उसे std_time_gap के रूप में स्टोर कीजिए.
  • np.random.exponential() का उपयोग करके उचित mean के साथ Exponential distribution से 10,000 samples ड्रॉ कीजिए. उन्हें वैरिएबल time_gap_exp में स्टोर करें.
  • np.random.normal() का उपयोग करके उचित mean और standard deviation के साथ Normal distribution से 10,000 samples ड्रॉ कीजिए. उन्हें वैरिएबल time_gap_norm में स्टोर करें.
  • Theoretical CDFs को हर मॉडल के लिए एक-एक लाइन में प्लॉट कीजिए, इस अध्याय में पहले बताए गए *dcst.ecdf() वाले तरीके का उपयोग करते हुए.
  • ECDF प्लॉट कीजिए और formal=True, min_x=-10, और max_x=50 keyword arguments का उपयोग कीजिए.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# 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()
कोड संपादित करें और चलाएँ