开始使用免费开始使用

赛马匹敌或打破 Secretariat 纪录的机会有多大?

假设贝尔蒙特锦标赛冠军(去除 1970 年和 1973 年)用时服从正态分布,那么在任意一届贝尔蒙特锦标赛中,冠军达到或快于 Secretariat 成绩的概率是多少?

本练习是课程的一部分

Python 中的统计思维(第 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)
编辑并运行代码