import pandas as pd
import numpy as np
Naive_Esitmate={}#dictionary
Naive_Variance ={}
Theta_t1 = {}
IS_t1_Esitmate ={}
IS_t1_Variance ={}
Theta_t2 = {}
IS_t2_Esitmate ={}
IS_t2_Variance ={}
for a in [0.76,1.28,1.47,1.852]:
Naive_Esitmate["a ="+str(a)], Naive_Variance["a ="+str(a)] = [a,a]
IS_t1_Esitmate["a ="+str(a)] ,IS_t1_Variance["a ="+str(a)],Theta_t1["a ="+str(a)] = a,2*a,np.array([1, 2])
IS_t2_Esitmate["a ="+str(a)] ,IS_t2_Variance["a ="+str(a)],Theta_t2["a ="+str(a)] = a,3*a,[3.,4.]
eff_Naive_IS_t1 = pd.Series(Naive_Variance)/pd.Series(IS_t1_Variance)
eff_Naive_IS_t1
eff_Naive_IS_t1.name
eff_Naive_IS_t1.name = "eff(Naive,IS_t1)"
eff_Naive_IS_t1.name
pd.Series(Theta_t1,name ='Theta_t1')
x=np.array([0.7989,0.72234])
x.round(4)
pd.concat([pd.Series(Naive_Esitmate, name = "Naive Estimate" ).round(4),
pd.Series(Naive_Variance, name = "Naive Variance" ),
pd.Series(Theta_t1,name ='Theta_t1').apply(lambda x :(x[0].round(2),x[1].round(2))),],axis=1).T
pd.concat([pd.Series(Naive_Esitmate, name = "Naive Estimate" ).round(4),
pd.Series(Naive_Variance, name = "Naive Variance" ),
pd.Series(Theta_t1,name ='Theta_t1').apply(lambda x :(x[0].round(2),x[1].round(2))),
eff_Naive_IS_t1.round(2),
pd.Series(IS_t1_Esitmate,name ='IS_t1 Estimate').round(4),
pd.Series(IS_t1_Variance,name ='IS_t1 Variance'),
pd.Series(Theta_t2,name ='Theta_t2').apply(lambda x :(x[0].round(2),x[1].round(2))),
pd.Series(IS_t2_Esitmate,name ='IS_t2 Estimate').round(4),
pd.Series(IS_t2_Variance,name ='IS_t2 Variance'),
]
,axis=1).T