June 2015
Beginner
348 pages
8h 44m
English
We will apply jackknife resampling to the stock data. Each value will be omitted by setting it to Not a Number (NaN). The nanmean(), nanvar(), and nanstd() can then be used to compute the arithmetic mean, variance, and standard deviation.
estimates = np.zeros((len(c), 3))
for i in xrange(len(c)): a = c.copy() a[i] = np.nan estimates[i,] = [np.nanmean(a), np.nanvar(a), np.nanstd(a)]
Read now
Unlock full access