
    doiI                     z   S SK r S SKrS SKJr  S SKJr  S SKJr  S SK	J
r  S SKJrJrJrJrJrJrJr  / SQr " S S	\5      rS
 r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r\ R:                  \   R>                  r \ H  r!\" \ \!   5      \ \!   l"        M     g)    N)inf)array_api_extra)special)_ufuncs)ContinuousDistributionDiscreteDistribution_RealInterval_IntegerInterval_RealParameter_Parameterization_combine_docs)NormalLogisticUniformBinomialc                     ^  \ rS rSrSr\" \* \4S9r\" S\4S9r\" \* \4S9r	\
" SS\SS9r\
" S	S
\SS9r\
" S\	SS9r\" \\5      /r\rS\R$                  " S\R&                  -  5      -  r\R*                  " S\R&                  -  5      S-  rS'U 4S jjrSSS.U 4S jjrS rS rS rS rS rS rS rS r S r!S r"S r#S  r$S! r%S" r&S# r'SS/\'l(        S$ r)S% r*S&r+U =r,$ )(r      a  Normal distribution with prescribed mean and standard deviation.

The probability density function of the normal distribution is:

.. math::

    f(x) = \frac{1}{\sigma \sqrt{2 \pi}} \exp {
        \left( -\frac{1}{2}\left( \frac{x - \mu}{\sigma} \right)^2 \right)}

	endpointsr   muz\mu)   symboldomaintypicalsigmaz\sigma)      ?g      ?xr   r   r      c                 T   > Uc  Uc  [         TU ]  [        5      $ [         TU ]  U 5      $ N)super__new__StandardNormal)clsr   r   kwargs	__class__s       Z/var/www/html/land-ocr/venv/lib/python3.13/site-packages/scipy/stats/_new_distributions.pyr%   Normal.__new__.   s*    :%-7?>22ws##                  ?r   r   c                *   > [         TU ]  " SXS.UD6  g )Nr/    r$   __init__)selfr   r   r(   r)   s       r*   r3   Normal.__init__3   s    6B6v6r,   c                f    [         R                  XU-
  U-  5      [        R                  " U5      -
  $ r#   )r&   _logpdf_formulanplogr4   r   r   r   r(   s        r*   r7   Normal._logpdf_formula6   s(    --dVUNCbffUmSSr,   c                >    [         R                  XU-
  U-  5      U-  $ r#   )r&   _pdf_formular:   s        r*   r=   Normal._pdf_formula9   s     **4b&%@5HHr,   c                8    [         R                  XU-
  U-  5      $ r#   )r&   _logcdf_formular:   s        r*   r@   Normal._logcdf_formula<   s    --dVUNCCr,   c                8    [         R                  XU-
  U-  5      $ r#   )r&   _cdf_formular:   s        r*   rC   Normal._cdf_formula?   s    **4b&%@@r,   c                8    [         R                  XU-
  U-  5      $ r#   )r&   _logccdf_formular:   s        r*   rF   Normal._logccdf_formulaB   s    ..t"fe^DDr,   c                8    [         R                  XU-
  U-  5      $ r#   )r&   _ccdf_formular:   s        r*   rI   Normal._ccdf_formulaE   s    ++Dr65.AAr,   c                8    [         R                  X5      U-  U-   $ r#   )r&   _icdf_formular:   s        r*   rL   Normal._icdf_formulaH   s    ++D4u<rAAr,   c                8    [         R                  X5      U-  U-   $ r#   )r&   _ilogcdf_formular:   s        r*   rO   Normal._ilogcdf_formulaK   s    ..t7%?"DDr,   c                8    [         R                  X5      U-  U-   $ r#   )r&   _iccdf_formular:   s        r*   rR   Normal._iccdf_formulaN   s    ,,T5=BBr,   c                8    [         R                  X5      U-  U-   $ r#   )r&   _ilogccdf_formular:   s        r*   rU   Normal._ilogccdf_formulaQ   s    //85@2EEr,   c                l    [         R                  U 5      [        R                  " [	        U5      5      -   $ r#   )r&   _entropy_formular8   r9   absr4   r   r   r(   s       r*   rX   Normal._entropy_formulaT   s%    ..t4rvvc%j7IIIr,   c                H   [         R                  U 5      n[        R                  " SS9   [        R                  " [        R                  " [        U5      5      S-   5      nS S S 5        [        R                  " [        R                  " UW5      SS9$ ! , (       d  f       N8= f)Nignoredividey                r   axis)	r&   _logentropy_formular8   errstater9   rY   r   	logsumexpbroadcast_arrays)r4   r   r   r(   lH0llss         r*   rb   Normal._logentropy_formulaW   sp    006[[) &&E
+B./C *   !4!4S#!>QGG	 *)s   7B
B!c                    U$ r#   r1   rZ   s       r*   _median_formulaNormal._median_formula_       	r,   c                    U$ r#   r1   rZ   s       r*   _mode_formulaNormal._mode_formulab   rl   r,   c                L    US:X  a  [         R                  " U5      $ US:X  a  U$ g )Nr   r   )r8   	ones_liker4   orderr   r   r(   s        r*   _moment_raw_formulaNormal._moment_raw_formulae   s'    A:<<##aZIr,   c                    US:X  a  [         R                  " U5      $ US-  (       a  [         R                  " U5      $ X1-  [        R                  " [        U5      S-
  SS9-  $ )Nr   r!   r   T)exact)r8   rq   
zeros_liker   
factorial2intrr   s        r*   _moment_central_formulaNormal._moment_central_formulan   sR    A:<<##QY==$$ <'"4"4SZ!^4"PPPr,   c                (    UR                  X4US9S   $ )N)locscalesizer1   normal)r4   
full_shaperngr   r   r(   s         r*   _sample_formulaNormal._sample_formulaw   s    zzbJz?CCr,   r1   )NN)-__name__
__module____qualname____firstlineno____doc__r	   r   
_mu_domain_sigma_domain
_x_supportr   	_mu_param_sigma_param_x_paramr   _parameterizations	_variabler8   sqrtpi_normalizationr9   _log_normalizationr%   r3   r7   r=   r@   rC   rF   rI   rL   rO   rR   rU   rX   rb   rj   rn   rt   ordersr{   r   __static_attributes____classcell__r)   s   @r*   r   r      sE   	 3$5J!QH5M3$5JtVJ'.0I!')M*46Lc*gFH+I|DEIrwwqw''N"%%*$
  r 7 7TIDAEBBECFJH #$QQD Dr,   r   c                 V    [         R                  " X[        R                  S-  -   /SS9$ )Ny              ?r   r`   )r   rd   r8   r   )log_plog_qs     r*   	_log_diffr   {   s$    e2558^41==r,   c                      \ rS rSrSr\" \* \4S9r\" S\SS9r	\	r
/ rS\R                  " S\R                  -  5      -  r\R                   " S\R                  -  5      S-  r\R$                  " S	5      r\R$                  " S
5      rS rS rS rS rS rS rS rS rS rS rS rS r S r!S r"S r#S r$S r%S r&S r'Sr(g) r&      zStandard normal distribution.

The probability density function of the standard normal distribution is:

.. math::

    f(x) = \frac{1}{\sqrt{2 \pi}} \exp \left( -\frac{1}{2} x^2 \right)

r   r   )   r    r   r!   r-   r.   c                 2    [         R                  " U 40 UD6  g r#   )r   r3   r4   r(   s     r*   r3   StandardNormal.__init__   s    ''77r,   c                 .    U R                   US-  S-  -   * $ Nr!   )r   r4   r   r(   s      r*   r7   StandardNormal._logpdf_formula   s    ((1a46122r,   c                 V    U R                   [        R                  " US-  * S-  5      -  $ r   )r   r8   expr   s      r*   r=   StandardNormal._pdf_formula   s%    ""RVVQTE!G_44r,   c                 .    [         R                  " U5      $ r#   r   log_ndtrr   s      r*   r@   StandardNormal._logcdf_formula   s    ""r,   c                 .    [         R                  " U5      $ r#   r   ndtrr   s      r*   rC   StandardNormal._cdf_formula   s    ||Ar,   c                 0    [         R                  " U* 5      $ r#   r   r   s      r*   rF   StandardNormal._logccdf_formula   s    ##r,   c                 0    [         R                  " U* 5      $ r#   r   r   s      r*   rI   StandardNormal._ccdf_formula   s    ||QBr,   c                 .    [         R                  " U5      $ r#   r   ndtrir   s      r*   rL   StandardNormal._icdf_formula       }}Qr,   c                 .    [         R                  " U5      $ r#   r   	ndtri_expr   s      r*   rO   StandardNormal._ilogcdf_formula         ##r,   c                 0    [         R                  " U5      * $ r#   r   r   s      r*   rR   StandardNormal._iccdf_formula       a   r,   c                 0    [         R                  " U5      * $ r#   r   r   s      r*   rU    StandardNormal._ilogccdf_formula   s    !!!$$$r,   c                 \    S[         R                  " S[         R                  -  5      -   S-  $ Nr   r!   )r8   r9   r   r   s     r*   rX   StandardNormal._entropy_formula   s"    BFF1RUU7O#Q&&r,   c                     [         R                  " [         R                  " S[         R                  -  5      5      [         R                  " S5      -
  $ r   )r8   log1pr9   r   r   s     r*   rb   "StandardNormal._logentropy_formula   s.    xxqw(266!944r,   c                     gNr   r1   r   s     r*   rj   StandardNormal._median_formula       r,   c                     gr   r1   r   s     r*   rn   StandardNormal._mode_formula   r   r,   c                 8    SSSSSSS.nUR                  US 5      $ )Nr   r      )r   r   r!   r      r   )get)r4   rs   r(   raw_momentss       r*   rt   "StandardNormal._moment_raw_formula   s%    aA!:ud++r,   c                 (    U R                   " U40 UD6$ r#   rt   r4   rs   r(   s      r*   r{   &StandardNormal._moment_central_formula       ''888r,   c                 (    U R                   " U40 UD6$ r#   r   r   s      r*   _moment_standardized_formula+StandardNormal._moment_standardized_formula   r   r,   c                 &    UR                  US9S   $ Nr   r1   r   r4   r   r   r(   s       r*   r   StandardNormal._sample_formula   s    zzzz*2..r,   r1   N))r   r   r   r   r   r	   r   r   r   r   r   r   r8   r   r   r   r9   r   float64r   r   r3   r7   r=   r@   rC   rF   rI   rL   rO   rR   rU   rX   rb   rj   rn   rt   r{   r   r   r   r1   r,   r*   r&   r&      s     3$5Jc*gFHIrwwqw''N"%%*	BBJJrNE835#$  $!%'5,99/r,   r&   c                       \ rS rSrSr\" \* \4S9r\" S\SS9=r	r
Sr\R                  \R                  " S5      -  rS	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rSr g)r      zStandard logistic distribution.

The probability density function of the standard logistic distribution is:

.. math::

    f(x) = \frac{1}{\left( e^{x / 2} + e^{-x / 2} \right)^2}

r   r   )i	   r    r1   r   c                     [         R                  " U5      * nUS[        R                  " [         R                  " U5      5      -  -
  $ r   )r8   rY   r   r   r   )r4   r   r(   ys       r*   r7   Logistic._logpdf_formula   s2    VVAYJ1w}}RVVAY////r,   c                 @    S[         R                  " US-  5      -  S-  $ )Nr   r!   )r8   coshr   s      r*   r=   Logistic._pdf_formula   s    RWWQU^#a''r,   c                 .    [         R                  " U5      $ r#   r   	log_expitr   s      r*   r@   Logistic._logcdf_formula   r   r,   c                 .    [         R                  " U5      $ r#   r   expitr   s      r*   rC   Logistic._cdf_formula   r   r,   c                 0    [         R                  " U* 5      $ r#   r   r   s      r*   rF   Logistic._logccdf_formula   s      !$$r,   c                 0    [         R                  " U* 5      $ r#   r   r   s      r*   rI   Logistic._ccdf_formula   s    }}aR  r,   c                 .    [         R                  " U5      $ r#   r   logitr   s      r*   rL   Logistic._icdf_formula   r   r,   c                 0    [         R                  " U5      * $ r#   r   r   s      r*   rR   Logistic._iccdf_formula   r   r,   c                     g)Ng       @r1   r   s     r*   rX   Logistic._entropy_formula   s    r,   c                 .    [         R                  " S5      $ r   r8   r9   r   s     r*   rb   Logistic._logentropy_formula   s    vvayr,   c                     gr   r1   r   s     r*   rj   Logistic._median_formula   r   r,   c                     gr   r1   r   s     r*   rn   Logistic._mode_formula   r   r,   c           	          [        U5      nUS-  (       a  g[        R                  U-  [        SU-  S-
  [	        [
        R                  " U5      S   5      -  5      -  $ )Nr!   r-   r   )rz   r8   r   rY   floatr   	bernoulli)r4   rs   r(   ns       r*   rt   Logistic._moment_raw_formula  sO    Jq5uuax#q!tax51B1B11Eb1I+JJKKKr,   c                 (    U R                   " U40 UD6$ r#   r   r   s      r*   r{    Logistic._moment_central_formula	  r   r,   c                 H    U R                   " U40 UD6U R                  U-  -  $ r#   )rt   _scaler   s      r*   r   %Logistic._moment_standardized_formula  s&    ''884;;;MMMr,   c                 &    UR                  US9S   $ r   )logisticr   s       r*   r   Logistic._sample_formula  s    |||,R00r,   N)!r   r   r   r   r   r	   r   r   r   r   r   r   r8   r   r   r  r7   r=   r@   rC   rF   rI   rL   rR   rX   rb   rj   rn   rt   r{   r   r   r   r1   r,   r*   r   r      s     3$5J)#j'RRIUURWWQZF0($ %! !L9N1r,   r   c                     ^  \ rS rSrSr\" S\4S9r\" S\4S9r\" \* \4S9r	\" S\4S9r
\" SSS	9r\" S\S
S9r\" S\SS9r\" SS\	SS9r\" SS\
SS9r\" S\SS9r\R%                  \5        \
R%                  \5        \R%                  \\5        \" \\5      \" \\5      /r\rSSSSS.U 4S jjrSS jrS rS rSrU =r$ )_LogUniformi  a  Log-uniform distribution.

The probability density function of the log-uniform distribution is:

.. math::

    f(x; a, b) = \frac{1}
                      {x (\log(b) - \log(a))}

If :math:`\log(X)` is a random variable that follows a uniform distribution
between :math:`\log(a)` and :math:`\log(b)`, then :math:`X` is log-uniformly
distributed with shape parameters :math:`a` and :math:`b`.

r   r   alog_ar  bTTr   	inclusivegMbP?g?r    r  g?g     @@z\log(a))gr   log_bz\log(b))皙?r   r   Nr  r  r  r&  c                ,   > [         TU ]  " SXX4S.UD6  g )Nr(  r1   r2   )r4   r  r  r  r&  r(   r)   s         r*   r3   _LogUniform.__init__:  s    F1FvFr,   c           	         Uc  [         R                  " U5      OUnUc  [         R                  " U5      OUnUc  [         R                  " U5      OUnUc  [         R                  " U5      OUnUR                  [	        XX4S95        U$ )Nr(  )r8   r   r9   updatedict)r4   r  r  r  r&  r(   s         r*   _process_parameters_LogUniform._process_parameters=  sf    YBFF5MAYBFF5MA"]q	"]q	dQ5>?r,   c                    X2-
  U-  S-  $ )Nr   r1   )r4   r   r  r&  r(   s        r*   r=   _LogUniform._pdf_formulaH  s    !B&&r,   c           	          US:X  a  U R                   $ U R                   X2-
  -  U-  n[        R                  " [        R                  " [	        X-  X-  5      5      5      nXV-  $ r   )_oner8   realr   r   )r4   rs   r  r&  r(   t1t2s          r*   rt   _LogUniform._moment_raw_formulaN  sQ    A:99YY%-(50WWRVVIemU]CDEwr,   r1   )NNNN)r   r   r   r   r   r	   r   	_a_domain	_b_domain_log_a_domain_log_b_domainr   r   _a_param_b_param_log_a_param_log_b_paramr   define_parametersr   r   r   r3   r.  r=   rt   r   r   r   s   @r*   r  r    s    C1Ic
3I!cT3K8M!WcN;M|LJc)[IHc)ZHH!'*)6
LL!'*)6JLc*jIH)##L1  84+L,G+Hh?AI DD G G' r,   r  c                   b  ^  \ rS rSrSr\" \* \4S9r\" S\4S9r\" SSS9r	\
" S\SS	9r\
" S
\SS	9r\
" S\	SS	9r\R                  \5        \	R                  \\5        \" \\5      /r\rSSS.U 4S jjrS S jrS rS rS rS rS rS rS rS rS rS rS rS rS r S/\ l!        S r"Sr#U =r$$ )!r   iV  zUniform distribution.

The probability density function of the uniform distribution is:

.. math::

    f(x; a, b) = \frac{1}
                      {b - a}

r   r  r  r   r!  r#  r    r  r$  r   Nc                *   > [         TU ]  " SXS.UD6  g )Nr  r1   r2   )r4   r  r  r(   r)   s       r*   r3   Uniform.__init__p      ,1,V,r,   c                 @    X!-
  nUR                  [        XUS95        U$ )N)r  r  ab)r,  r-  r4   r  r  rF  r(   s        r*   r.  Uniform._process_parameterss  s!    UdQ+,r,   c                    [         R                  " [         R                  " U5      [         R                  [         R                  " U5      * 5      $ r#   )r8   whereisnannanr9   r4   r   rF  r(   s       r*   r7   Uniform._logpdf_formulax  s+    xxRVVbffRj[99r,   c                |    [         R                  " [         R                  " U5      [         R                  SU-  5      $ Nr   )r8   rJ  rK  rL  rM  s       r*   r=   Uniform._pdf_formula{  s%    xxRVVQrT22r,   c                    [         R                  " SS9   [         R                  " X-
  5      [         R                  " U5      -
  sS S S 5        $ ! , (       d  f       g = fNr]   r^   r8   rc   r9   r4   r   r  rF  r(   s        r*   r@   Uniform._logcdf_formula~  4    [[)66!%=266":- *))   /A
Ac                    X-
  U-  $ r#   r1   rU  s        r*   rC   Uniform._cdf_formula      |r,   c                    [         R                  " SS9   [         R                  " X!-
  5      [         R                  " U5      -
  sS S S 5        $ ! , (       d  f       g = frS  rT  r4   r   r  rF  r(   s        r*   rF   Uniform._logccdf_formula  rW  rX  c                    X!-
  U-  $ r#   r1   r]  s        r*   rI   Uniform._ccdf_formula  r[  r,   c                    X#U-  -   $ r#   r1   )r4   pr  rF  r(   s        r*   rL   Uniform._icdf_formula      a4xr,   c                    X#U-  -
  $ r#   r1   )r4   rb  r  rF  r(   s        r*   rR   Uniform._iccdf_formula  rd  r,   c                .    [         R                  " U5      $ r#   r  )r4   rF  r(   s      r*   rX   Uniform._entropy_formula  s    vvbzr,   c                    USU-  -   $ Nr   r1   rG  s        r*   rn   Uniform._mode_formula      3r6zr,   c                    USU-  -   $ rj  r1   rG  s        r*   rj   Uniform._median_formula  rl  r,   c                 (    US-   nX6-  X&-  -
  Xd-  -  $ rP  r1   )r4   rs   r  r  rF  r(   np1s          r*   rt   Uniform._moment_raw_formula  s     aiCH--r,   c                 "    US:X  a  US-  S-  $ S $ )Nr!      r1   )r4   rs   rF  r(   s       r*   r{   Uniform._moment_central_formula  s     A:r1uRx/4/r,   r!   c                 x     UR                  X4US9S   $ ! [         a    UR                  SSUS9U-  U-   s $ f = f)Nr   r1   r   r   )uniformOverflowError)r4   r   r   r  r  rF  r(   s          r*   r   Uniform._sample_formula  sM    	=;;q*;5b99 	=;;q!*;5b81<<	=s    !99r1   )NNN)%r   r   r   r   r   r	   r   r8  r9  r   r   r<  r=  r   r@  r   r   r   r3   r.  r7   r=   r@   rC   rF   rI   rL   rR   rX   rn   rj   rt   r{   r   r   r   r   r   s   @r*   r   r   V  s    	 #s4Ic
3I|LJc)[IHc)ZHHc*jIH)  84+Hh?@I D - -
:3...0 '(S"= =r,   r   c                   r    \ rS rSr\" S\4S9r\" S\4SS9r\" S\SS9r	\" S	\SS9r
\" \	5      /r\
rS
 rSrg)_Gammai  r   r   FFr!  r  )r'  
   r    r   c                n    XS-
  -  [         R                  " U* 5      -  [        R                  " U5      -  $ rP  )r8   r   r   gamma)r4   r   r  r(   s       r*   r=   _Gamma._pdf_formula  s+    U|bffaRj(7==+;;;r,   r1   N)r   r   r   r   r	   r   r8  r   r   r<  r   r   r   r   r=   r   r1   r,   r*   rz  rz    sT    C1I!S^LJc)YGHc*iHH+H56I<r,   rz  c                     ^  \ rS rSrSr\" S\4SS9r\" SSS9r	\" SSS9r
\" S	\S
S9r\" S\	SS9r\" S\
SS9r\" \\5      /r\rU 4S jrS rS rS rS rS rS rS rS rS rS rSS/\l        S r/ SQ\l        SrU =r $ ) r   i  zBinomial distribution with prescribed success probability and number of trials

The probability density function of the binomial distribution is:

.. math::

    f(x) = {n \choose x} p^x (1 - p)^{n-x}

r   r{  r!  )r   r   )r   r  r   r  )r|     r    rb  )g      ?g      ?r   )r   r|  c                *   > [         TU ]  " SXS.UD6  g )Nr  rb  r1   r2   )r4   r  rb  r(   r)   s       r*   r3   Binomial.__init__  rD  r,   c                0    [         R                  " XU5      $ r#   )scu
_binom_pmfr4   r   r  rb  r(   s        r*   _pmf_formulaBinomial._pmf_formula      ~~aA&&r,   c                   [         R                  " US-   5      [         R                  " US-   5      [         R                  " X!-
  S-   5      -   -
  nU[         R                  " X5      -   [         R                  " X!-
  U* 5      -   $ rP  )r   gammalnxlogyxlog1py)r4   r   r  rb  r(   combilns         r*   _logpmf_formulaBinomial._logpmf_formula  si    
 OOAaC GOOAaC$87??13q5;Q$QR 	 q,,wqsQB/GGGr,   c                0    [         R                  " XU5      $ r#   )r  
_binom_cdfr  s        r*   rC   Binomial._cdf_formula  r  r,   c                `    U R                  SX#S9n[        R                  " X:  XU4S S 5      $ )Nr   r  c                  P    [         R                  " [        R                  " U 6 5      $ r#   )r8   r9   r  r  argss    r*   <lambda>*Binomial._logcdf_formula.<locals>.<lambda>  s    "&&!67r,   c                  R    [         R                  " [        R                  " U 6 * 5      $ r#   )r8   r   r  	_binom_sfr  s    r*   r  r    s    "((CMM4$8#89r,   rL   xpxapply_wherer4   r   r  rb  r(   medians         r*   r@   Binomial._logcdf_formula  s:     ##C1#2qzA!979
 	
r,   c                0    [         R                  " XU5      $ r#   )r  r  r  s        r*   rI   Binomial._ccdf_formula  s    }}Q1%%r,   c                `    U R                  SX#S9n[        R                  " X:  XU4S S 5      $ )Nr   r  c                  R    [         R                  " [        R                  " U 6 * 5      $ r#   )r8   r   r  r  r  s    r*   r  +Binomial._logccdf_formula.<locals>.<lambda>  s    "((CNND$9#9:r,   c                  P    [         R                  " [        R                  " U 6 5      $ r#   )r8   r9   r  r  r  s    r*   r  r    s    "&&!56r,   r  r  s         r*   rF   Binomial._logccdf_formula  s8    ##C1#2qzA!9:6
 	
r,   c                0    [         R                  " XU5      $ r#   )r  
_binom_ppfr  s        r*   rL   Binomial._icdf_formula  r  r,   c                0    [         R                  " XU5      $ r#   )r  
_binom_isfr  s        r*   rR   Binomial._iccdf_formula  r  r,   c                    [         R                  " US-   U-  5      n[         R                  " US:H  US-
  U5      nUS   $ )Nr   r1   )r8   floorrJ  )r4   r  rb  r(   modes        r*   rn   Binomial._mode_formula  s;    xx1a xxQq$/Bxr,   c                B    US:X  a  X#-  $ US:X  a  X#-  SU-
  X#-  -   -  $ g r   r1   r4   rs   r  rb  r(   s        r*   rt   Binomial._moment_raw_formula   s1    A:3JA:3A$$r,   r   r!   c                    US:X  a  [         R                  " U5      $ US:X  a
  X#-  SU-
  -  $ US:X  a  X#-  SU-
  -  SSU-  -
  -  $ US:X  a  X#-  SU-
  -  SSU-  S-
  U-  SU-
  -  -   -  $ g )Nr   r!   r   r      )r8   rx   r  s        r*   r{    Binomial._moment_central_formula	  s    A:==##A:3A;A:3A;AaC((A:3A;QqS1WaKQ$7 788r,   )r   r!   r   r   r1   )!r   r   r   r   r   r
   r   	_n_domainr	   	_p_domainr   r   _n_param_p_paramr   r   r   r   r3   r  r  rC   r@   rI   rF   rL   rR   rn   rt   r   r{   r   r   r   s   @r*   r   r     s     !As8~NI.II!HMJc)XFHc)\JHc*gFH+Hh?@I-'H'
&
'' #$Q
 &2""r,   r   )#sysnumpyr8   r   
scipy._libr   r  scipyr   scipy.specialr   r  (scipy.stats._distribution_infrastructurer   r   r	   r
   r   r   r   __all__r   r   r&   r   r  r   rz  r   modulesr   __dict___module	dist_namer   r1   r,   r*   <module>r     s    
   -  (6 6 6 8hD# hDV>K/V K/\C1% C1N?( ?DR=$ R=j<# <Z2# Z2@ ++h

(
(I!.wy/A!BGI r,   