
    !g)	                         d Z ddlmZ dZ G d dej                        Z eej                  d      Z eej                  d              eej                  d	             y
)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                 t    || _         || _        d}t        |   d|j                  |j
                  d       y )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       f/var/www/dash_apps/app1/venv/lib/python3.12/site-packages/statsmodels/sandbox/distributions/try_max.pyr   zMaxDist.__init__   s<    	;dff9P 	 	
    c                     | j                    | j                  j                  |g|i |z   | j                  j                  |g|i || j                   dz
  z  z  S )N   )r   r   pdfcdfr   xargskws       r   _pdfzMaxDist._pdf   sZ    vv		a5$5"55diimmA+++
;< 	<r   c                 \     | j                   j                  |g|i || j                  z  S )N)r   r   r   r   s       r   _cdfzMaxDist._cdf#   s*    tyy}}Q,,,66r   c                 b     | j                   j                  |d| j                  z  z  g|i |S )Ng      ?)r   ppfr   )r   qr   r   s       r   _ppfzMaxDist._ppf&   s.    tyy}}Q2;/=$="==r   )	__name__
__module____qualname____doc__r   r   r   r#   __classcell__)r   s   @r   r   r      s    
<7>r   r   
   )sizemvsk)momentsN)
r'   scipyr   __date__rv_continuousr   normmaxdistrprintrvs r   r   <module>r5      sd    >e!! >F 5::r" hlll  hnnVn$ %r   