U
    Ãmœdª	  ã                   @   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__© úb/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/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   $