Google News
logo
SciPy - Interview Questions
What is SciPy Stats?
The scipy.stats contains a large number of statistics, probability distributions functions. The list of statistics functions can be obtained by info(stats). A list of a random variable can also be acquired from the docstring for the stat sub-package.
 
rv_continuous : A generic continuous random variable class meant for subclassing
rv_discrete : A generic discrete random variable class meant for subclassing
rv_histogram : Generates a distribution given by a histogram
 
 
Example : 
 
from scipy.stats import norm  
import numpy as np  
print(norm.cdf(np.array([3,-1., 0, 1, 2, 4, -2, 5])))
 
Output :
 
[0.9986501  0.15865525 0.5        0.84134475 0.97724987 0.99996833
 0.02275013 0.99999971]

 

Advertisement