U
    Kvf	                     @   sV   d Z ddlmZ dZG dd dejZeejdZeej	dd eejdd	 d
S )zh

adjusted from Denis on pystatsmodels mailing list

there might still be problems with loc and scale,

    )statsz2010-12-29 decc                       s8   e Zd ZdZ fddZdd Zdd Zdd	 Z  ZS )
MaxDistz max of n of scipy.stats normal expon ...
        Example:
            maxnormal10 = RVmax( scipy.stats.norm, 10 )
            sample = maxnormal10( size=1000 )
            sample.cdf = cdf ^ n,  ppf ^ (1/n)
    c                    s0   || _ || _d}tt| jd|j|jdd d S )NzRmaximumdistribution is the distribution of the maximum of n i.i.d. random variableZmaxdistzA maximumdistribution)nameablongname)distnsuperr   __init__r   r   )selfr   r	   Zextradoc	__class__ M/tmp/pip-unpacked-wheel-2v6byqio/statsmodels/sandbox/distributions/try_max.pyr      s    zMaxDist.__init__c                 O   s8   | j | jj|f|| | jj|f||| j d   S )N   )r	   r   Zpdfcdfr   xargskwr   r   r   _pdf    s    zMaxDist._pdfc                 O   s   | j j|f||| j S )N)r   r   r	   r   r   r   r   _cdf$   s    zMaxDist._cdfc                 O   s   | j j|d| j  f||S )Ng      ?)r   Zppfr	   )r   qr   r   r   r   r   _ppf'   s    zMaxDist._ppf)	__name__
__module____qualname____doc__r   r   r   r   __classcell__r   r   r   r   r      s
   
r   
   )sizeZmvsk)ZmomentsN)
r   Zscipyr   __date__Zrv_continuousr   ZnormZmaxdistrprintZrvsr   r   r   r   <module>   s   $