truncated.T¶
Module: truncated.T¶
Inheritance diagram for selectinf.truncated.T:
truncated_T¶
- 
class selectinf.truncated.T.truncated_T(intervals, df)[source]¶
- Bases: - selectinf.truncated.base.truncated- 
__init__(intervals, df)[source]¶
- Create a new truncated distribution object This method is abstract : it has to be overriden - Parameters
- intervals : [(float, float)] - The intervals the distribution is truncated to 
 
 - 
dps= 20¶
 - 
cdf(z)¶
- Compute the survival function of the truncated distribution - Parameters
- z : float - Minimum bound of the interval 
- Returns
- cdf : float - function The cumulative distribution function of the truncated distribution cdf(z) = P( X < z | X is in intervals ) - WARNING : This method only use the sf method - more precise 
 
 - 
pdf(z)¶
- Compute the probability distribution funtion of the truncated distribution - Parameters
- z : float 
- Returns
- p : float - p(z) such that E[f(X)] = int f(z)p(z)dz 
 
 - 
quantile(q, tol=1e-06)¶
 - 
rvs(size=1)¶
- Sample a random variable from the truncated disribution - Parameters
- size : int - Number of samples. Default : 1 
- Returns
- X : np.array - array of sample 
 
 - 
sf(z)¶
- Compute the survival function of the truncated distribution - Parameters
- z : float - Minimum bound of the interval 
- Returns
- sf : float - The survival function of the truncated distribution sf(z) = P( X > z | X is in intervals ) 
 
 
-