
    M/Ph)	                         d Z ddlmZ dZ G d dej                  Z eej        d          Z ee	                    d                      ee                    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                   4     e Zd ZdZ fdZd Zd Zd Z x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                     || _         || _        d}t                                          d|j        |j        d           d S )NzRmaximumdistribution is the distribution of the maximum of n i.i.d. random variablemaxdistzA maximumdistribution)nameablongname)distnsuper__init__r	   r
   )selfr   r   extradoc	__class__s       i/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/statsmodels/sandbox/distributions/try_max.pyr   zMaxDist.__init__   sQ    	;df9P 	 	
 	
 	
 	
 	
    c                     | j          | j        j        |g|R i |z   | j        j        |g|R i || j         dz
  z  z  S )N   )r   r   pdfcdfr   xargskws       r   _pdfzMaxDist._pdf   s`    v	a5$555"555dimA++++++
;< 	<r   c                 >     | j         j        |g|R i || j        z  S )N)r   r   r   r   s       r   _cdfzMaxDist._cdf#   s-    ty}Q,,,,,,66r   c                 D     | j         j        |d| j        z  z  g|R i |S )Ng      ?)r   ppfr   )r   qr   r   s       r   _ppfzMaxDist._ppf&   s1    ty}Q2;/=$==="===r   )	__name__
__module____qualname____doc__r   r   r   r#   __classcell__)r   s   @r   r   r      so         
 
 
 
 
< < <7 7 7> > > > > > >r   r   
   )sizemvsk)momentsN)
r'   scipyr   __date__rv_continuousr   normmaxdistrprintrvs r   r   <module>r5      s          > > > > >e! > > >F 75:r"" hlll    hnnVn$$ % % % r   