Exemplo n.º 1
0
def t2_test():
    mc = 100
    ts = np.zeros(mc)
    for i in range(mc):
        data = make_data(0,1)
        ts[i] = t2_value(data)
    histo(ts)
Exemplo n.º 2
0
def hotelling_T2_test():
    '''
    This is not working!
    There is no rhyme or reason in the p value - 
    
    '''
    mc = 100
    p = np.zeros(mc)
    for i in range(mc):
        data = make_data(0,1)
        p[i] = hotelling_T2(data)
    histo(p)
Exemplo n.º 3
0
def analyze_lots_of_trials():
    ''''
        plots a histogram of T2 values for many iterations
    
    '''
    sigma_known = 0.2
    mu_known = 0

    #faux data
    mc = 100
    ts = np.zeros(mc)
    for i in range(mc):
        data = make_data(mu_known, sigma_known)
        
        ts[i] = return_T2_value(data)
    
    from visualization import histo
    histo(ts,'r', 'lots of trials') 
Exemplo n.º 4
0
def analyze_varying_sigma():
    '''
    plots a histogram of T2 values for many iterations of varying sigma
    '''
    mc = 100
    sigma = np.linspace(eps, 1, mc)
    mu_known = 0


    ts = np.zeros(mc)
    
    #change keep track of T2 over varying sigma
    for i, s in zip(range(mc), sigma):
        
        data = make_data(mu_known, s)
        
        ts[i] = return_T2_value(data)
    
    
    from visualization import histo
    histo(ts,'r', 'varying sigma')
    plt.plot(ts)