AMBHAS
ambhas::stats Namespace Reference

Classes

class  SpatOutlier

Functions

def bias_correction
def mk_test
def independant

Variables

tuple oc = np.random.randn(100)
int mc = 2
int mp = 2
tuple mp_adjusted = bias_correction(oc, mc, mp)
tuple x = np.random.randn(5,20)
tuple foo = SpatOutlier(x)
tuple x1 = foo.fill_with_nan()

Function Documentation

def ambhas.stats.bias_correction (   oc,
  mc,
  mp 
)
Input:
    oc: observed current
    mc: modeled current
    mp: modeled prediction     

Output:
    mp_adjusted: adjusted modeled prediction
    
    

Definition at line 17 of file stats.py.

def ambhas.stats.independant (   x,
  y,
  alpha = 0.05 
)
this program calculates check if the joint cdf == multiplication of marginal
distribution or not 
using the chi-squared test 
    
Input:
    x:   a vector of data
    y:   a vector of data
    alpha: significance level

Output:
    ind: True (if independant) False (if dependant)
    p: p value of the significance test
    
Examples
--------
  >>> x = np.random.rand(100)
  >>> y = np.random.rand(100)
  >>> ind,p = independant(x,y,0.05)  

Definition at line 108 of file stats.py.

def ambhas.stats.mk_test (   x,
  alpha = 0.05 
)
this perform the MK (Mann-Kendall) test to check if there is any trend present in 
data or not

Input:
    x:   a vector of data
    alpha: significance level

Output:
    trend: tells the trend (increasing, decreasing or no trend)
    h: True (if trend is present) or False (if trend is absence)
    p: p value of the sifnificance test
    z: normalized test statistics 
    
Examples
--------
  >>> x = np.random.rand(100)
  >>> trend,h,p,z = mk_test(x,0.05) 

Definition at line 47 of file stats.py.


Variable Documentation

Definition at line 221 of file stats.py.

Definition at line 208 of file stats.py.

Definition at line 209 of file stats.py.

Definition at line 215 of file stats.py.

tuple ambhas::stats::oc = np.random.randn(100)

Definition at line 207 of file stats.py.

tuple ambhas::stats::x = np.random.randn(5,20)

Definition at line 219 of file stats.py.

tuple ambhas::stats::x1 = foo.fill_with_nan()

Definition at line 222 of file stats.py.

 All Classes Namespaces Files Functions Variables