Module Expr Str ImportFrom alias Import alias identifier ImportFrom alias ImportFrom alias alias alias ImportFrom alias Assign NameStore Num Assign NameStore Num Assign NameStore BinOpDiv Num Call AttributeLoad NameLoad attr Num BinOpAdd NameLoad Num AugAssignDiv NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign SubscriptStore NameLoad Index Num BinOpSub Num Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Expr Call NameLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num AugAssignAdd SubscriptStore NameLoad Index Num NameLoad AugAssignSub SubscriptStore NameLoad Index Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr CompareLt Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num NameLoad Num Expr Call NameLoad NameLoad Expr Call NameLoad BinOpMult Call AttributeLoad NameLoad attr NameLoad BinOpDiv Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpMult NameLoad NameLoad Expr Call NameLoad Str Call NameLoad NameLoad BinOpMult NameLoad NameLoad Expr Call NameLoad Str Call NameLoad NameLoad BinOpMult NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call AttributeLoad BinOpDiv BinOpPow BinOpSub BinOpDiv NameLoad Call NameLoad NameLoad NameLoad Num NameLoad attr Expr Call NameLoad NameLoad Assign NameStore Call AttributeLoad BinOpDiv BinOpPow BinOpSub BinOpDiv NameLoad Call NameLoad NameLoad NameLoad Num NameLoad attr Expr Call NameLoad NameLoad Assign NameStore Call AttributeLoad BinOpDiv BinOpPow BinOpSub NameLoad NameLoad Num NameLoad attr Expr Call NameLoad NameLoad Expr Call NameLoad Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad BinOpMult NameLoad NameLoad Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad BinOpMult Num NameLoad Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad BinOpMult Num NameLoad Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad BinOpMult NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad BinOpMult NameLoad NameLoad keyword Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call NameLoad NameLoad BinOpMult NameLoad NameLoad keyword Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Expr Call NameLoad Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMult NameLoad NameLoad BinOpSub NameLoad Num SubscriptLoad Call NameLoad NameLoad BinOpMult NameLoad NameLoad Index Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num BinOpSub NameLoad Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpSub NameLoad Num BinOpMult BinOpPow Num Num NameLoad Expr Call NameLoad NameLoad Num keyword Num Assign NameStore Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad keyword Num Expr Call NameLoad NameLoad Num keyword Num Expr Call NameLoad Call NameLoad NameLoad BinOpMult NameLoad NameLoad keyword Num keyword Num Assign NameStore Call AttributeLoad BinOpDiv BinOpPow BinOpSub NameLoad NameLoad Num NameLoad attr Expr Call NameLoad Call NameLoad NameLoad BinOpMult NameLoad NameLoad keyword Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad Num For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr CompareLt Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call NameLoad NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call NameLoad NameLoad BinOpMult NameLoad NameLoad keyword NameLoad Assign SubscriptStore NameLoad Index NameLoad ListLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Num Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad Num NameLoad keyword ListLoad Num Num Num Num Num Expr Call NameLoad Call AttributeLoad CompareLt SubscriptLoad NameLoad ExtSlice Slice Slice Num Num attr Num Assign NameStore Call AttributeLoad CompareLt SubscriptLoad NameLoad ExtSlice Slice Slice Num Index NameLoad NameLoad attr Num Assign NameStore Call AttributeLoad CompareLt SubscriptLoad NameLoad ExtSlice Slice Slice Num Index NameLoad NameLoad attr Num Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad attr Expr Call NameLoad Str Expr Call NameLoad BinOpMult BinOpSub BinOpDiv NameLoad NameLoad Num Num
N/A N/A 

Created on Thu Feb 28 15:37:53 2013

Author: Josef Perktold
 __future__ print_function N/A numpy np scipy stats statsmodels.stats.gof chisquare chisquare_power chisquare_effectsize numpy.testing assert_almost_equal N/A nobs 30000 N/A n_bins 5 N/A probs N/A 1.0 N/A N/A np arange 2 N/A n_bins 2 N/A probs N/A N/A probs sum N/A probs N/A N/A np round probs 2 N/A N/A probs N/A -1 N/A 1 N/A N/A N/A probs N/A -1 sum N/A N/A print probs probs N/A probs_d N/A N/A probs copy N/A delta 0.01 N/A N/A probs_d N/A 0 delta N/A N/A probs_d N/A 1 delta N/A probs_cs N/A N/A probs cumsum N/A rvs N/A N/A np argmax N/A N/A N/A N/A np random rand nobs 1 probs_cs 1 N/A N/A print probs N/A N/A print N/A N/A N/A np bincount rvs N/A 1.0 nobs N/A freq N/A N/A np bincount rvs N/A N/A print N/A N/A stats chisquare freq N/A nobs probs N/A N/A print null N/A chisquare freq N/A nobs probs N/A N/A print delta N/A chisquare freq N/A nobs probs_d N/A N/A chisq_null pval_null N/A chisquare freq N/A nobs probs N/A d_null N/A N/A N/A N/A N/A N/A freq N/A float nobs probs 2 probs sum N/A N/A print d_null N/A d_delta N/A N/A N/A N/A N/A N/A freq N/A float nobs probs_d 2 probs_d sum N/A N/A print d_delta N/A d_null_alt N/A N/A N/A N/A N/A probs probs_d 2 probs_d sum N/A N/A print d_null_alt N/A N/A print 
chisquare with value N/A N/A chisq pval N/A chisquare freq N/A nobs probs_d N/A N/A print N/A N/A N/A stats ncx2 sf chisq_null n_bins N/A 0.001 nobs N/A N/A print N/A N/A N/A stats ncx2 sf chisq n_bins N/A 0.001 nobs N/A N/A print N/A N/A N/A stats ncx2 sf chisq n_bins N/A d_delta nobs N/A N/A print N/A chisquare freq N/A nobs probs_d value N/A N/A np sqrt d_delta N/A N/A print N/A chisquare freq N/A nobs probs_d value N/A N/A np sqrt N/A chisq nobs N/A N/A print N/A N/A assert_almost_equal N/A N/A N/A stats chi2 sf N/A d_delta nobs N/A n_bins 1 N/A N/A chisquare freq N/A nobs probs_d N/A 1 decimal 13 N/A crit N/A N/A N/A stats chi2 isf 0.05 N/A n_bins 1 N/A power N/A N/A N/A stats ncx2 sf crit N/A n_bins 1 N/A N/A 0.001 2 nobs N/A N/A assert_almost_equal power 0.05147563 decimal 7 N/A effect_size 0.001 N/A power N/A chisquare_power effect_size nobs n_bins alpha 0.05 N/A N/A assert_almost_equal power 0.05147563 decimal 7 N/A N/A print N/A chisquare freq N/A nobs probs value 0 ddof 0 N/A d_null_alt N/A N/A N/A N/A N/A probs probs_d 2 probs sum N/A N/A print N/A chisquare freq N/A nobs probs value N/A N/A np sqrt d_null_alt ddof 0 N/A d_delta_r N/A chisquare_effectsize probs probs_d N/A n_rep 10000 N/A nobs 3000 N/A res_boots N/A N/A np zeros N/A n_rep 6 N/A i N/A range n_rep N/A N/A rvs N/A N/A np argmax N/A N/A N/A N/A np random rand nobs 1 probs_cs 1 N/A freq N/A N/A np bincount rvs N/A res1 N/A chisquare freq N/A nobs probs N/A res2 N/A chisquare freq N/A nobs probs_d N/A res3 N/A chisquare freq N/A nobs probs_d value d_delta_r N/A N/A res_boots N/A i N/A N/A res1 N/A 0 N/A res2 N/A 0 N/A res3 N/A 0 N/A res1 N/A 1 N/A res2 N/A 1 N/A res3 N/A 1 N/A alpha N/A N/A np array N/A 0.01 0.05 0.1 0.25 0.5 N/A chi2_power N/A chisquare_power N/A chisquare_effectsize probs probs_d 3000 n_bins alpha N/A 0.01 0.05 0.1 0.25 0.5 N/A N/A print N/A N/A N/A N/A res_boots N/A N/A N/A 3 0.05 mean 0 N/A reject_freq N/A N/A N/A N/A res_boots N/A N/A N/A 3 N/A None alpha mean 0 N/A reject N/A N/A N/A N/A res_boots N/A N/A N/A 3 N/A None alpha sum 0 N/A desired N/A N/A N/A np column_stack N/A alpha chi2_power alpha T N/A N/A print relative difference Monte Carlo rejection and expected (in %) N/A N/A print N/A N/A N/A reject_freq desired 1 100