o
    h                     @   sX   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
mZ dd Zdd	 Zd
S )    )Function)symbols)exp)variance_prop)RandomSymbolVariance
Covariancec                  C   sj  t d\} }}t d \}}}t| }t|}tt|}tt|}	td| }
| | || || || | | | || |	 d|  d| | | ||d  || d   d|  || d  | | ||d  || d   |d  t| |td|   td|  d| td|   t|  | |d | td| |   |
t|
i}| D ]\}}t||d}||ksJ qd S )	Nx y zphi tf         )consts)r   r   r   r   r   itemsr   )xyzphitr   avar_xvar_yvar_zr   casesinpoutobs r   U/var/www/vscode/kcb/lib/python3.10/site-packages/sympy/stats/tests/test_error_prop.pytest_variance_prop	   s.   $&r!   c                  C   s  t d\} }}t d \}}}t| }t|}t|}t|}	t|}
t|
}t||}t||
}t||
}| | ||	 d|  || ||	 d|  | | | ||	 | d|  d|  d|  d|  d| | | ||d  |	| d   d| | |   d|  || d  t| |td|   td|  d| td|   t|  | |d | td| |   i	}| D ]\}}t||dd}||ksJ qd S )	Nr	   r
   r   r   r   r   T)r   include_covar)r   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   br   cr   	covar_x_y	covar_x_z	covar_y_zr   r   r   r   r   r   r    test_variance_prop_with_covar"   s>   


,&r(   N)sympy.core.functionr   sympy.core.symbolr   &sympy.functions.elementary.exponentialr   sympy.stats.error_propr    sympy.stats.symbolic_probabilityr   r   r   r!   r(   r   r   r   r    <module>   s    