開始使用免費開始

賽馬追平或打破 Secretariat 紀錄的機率有多大?

假設貝爾蒙錦標賽(移除 1970 與 1973 年)冠軍的成績服從常態分配,某一屆貝爾蒙錦標賽的冠軍以不慢於 Secretariat 的速度(同樣快或更快)完成比賽的機率是多少?

本練習屬於課程

Statistical Thinking in Python (Part 1)

檢視課程

練習說明

  • 使用 rng.normal() 從常態分配抽取 1,000,000 個樣本。平均數 mu 與標準差 sigma 已載入到你的 IPython 命名空間。
  • 計算樣本中成績小於或等於 Secretariat 144 秒成績的比例。
  • 印出結果。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Take a million samples out of the Normal distribution: samples


# Compute the fraction that are faster than 144 seconds: prob


# Print the result
print('Probability of besting Secretariat:', prob)
編輯並執行程式碼