← 返回题库
中级

指数分布顾客等待时间

未完成
中级参考 代码结构已给出,请填写 ____ 处
def solve():
    from scipy.stats import expon
    import numpy as np
    import matplotlib.pyplot as plt
    scale = ____
    print(____)
    print(____)
    print(____)
    x = np.linspace(____, ____, ____)
    plt.plot(x, expon.pdf(____), '____', lw=____)
    plt.fill_between(x, expon.pdf(____), where=(____), alpha=____, color='____', label='____')
    plt.fill_between(x, expon.pdf(____), where=(____), alpha=____, color='____', label='____')
    plt.xlabel(____); plt.ylabel(____); plt.title(____); plt.legend()
    plt.tight_layout(); plt.show()

示例

输入
solve()
期望输出
期望等待=10.0分钟
P(>10min)=0.3679
P(<5min)=0.3935
Python 代码 🔒 登录后使用
🔒

登录后即可练习

注册免费账号,在浏览器中直接运行 Python 代码