How do I calculate PDF (probability density function) in Python?

前端 未结 3 1084
故里飘歌
故里飘歌 2021-02-06 05:07

I have the following code below that prints the PDF graph for a particular mean and standard deviation.

http://imgur.com/a/oVgML

Now I need to find the actual pr

3条回答
  •  野性不改
    2021-02-06 05:38

    Unless you have a reason to implement this yourself. All these functions are available in scipy.stats.norm

    I think you asking for the cdf, then use this code:

    from scipy.stats import norm
    print(norm.cdf(x, mean, std))
    

提交回复
热议问题