I hereby claim:
- I am stucchio on github.
- I am stucchio (https://keybase.io/stucchio) on keybase.
- I have a public key ASA_kgAJceWD7PGBJvFyqObwCMqZDv2hcDqFPpdi8DrJvgo
To claim this, I am signing this object:
import numpy as np | |
from numpy.linalg import solve | |
def vmat(n, discount_rate, tax_rate): | |
m = np.zeros(shape=(n,n)) | |
discount = tax_rate*np.exp(-1*discount_rate*np.arange(n)) | |
for i in range(n): | |
m[i, i:n] = discount[0:n-i] | |
m[i,i] = 1 | |
return m |
from pylab import * | |
from numpy import * | |
from numpy.linalg import solve | |
from scipy.integrate import odeint | |
from scipy.stats import norm, uniform, beta | |
from scipy.special import jacobi | |
a = 0.0 | |
b = 3.0 | |
theta=1.0 |
from numpy import * | |
from scipy.stats import beta | |
class BetaBandit(object): | |
def __init__(self, num_options=2, prior=(1.0,1.0)): | |
self.trials = zeros(shape=(num_options,), dtype=int) | |
self.successes = zeros(shape=(num_options,), dtype=int) | |
self.num_options = num_options | |
self.prior = prior |
# Data from: http://www.ny1.com/content/top_stories/156599/now-available--2007-2010-nyc-teacher-performance-data#doereports | |
from pylab import * | |
from pandas import * | |
import re | |
def get_data(filename): | |
d = read_csv(filename, delimiter="\t") | |
d['teacher'] = d['teacher_name_first_1'] + " " + d['teacher_name_last_1'] | |
return d |
I hereby claim:
To claim this, I am signing this object:
from scipy.stats import norm | |
from numpy import mean | |
x = norm(0,1).rvs(10000) | |
y = norm(1,1).rvs(10000) # Group Y is 1 standard deviation better than group X | |
print("Mean of group X, exceeding the cutoff: " + str(mean(x[x > 3]))) # Prints 3.22 | |
print("Mean of group Y, exceeding the cutoff: " + str(mean(y[y > 3]))) # prints 3.40 |
from pylab import * | |
from numpy import * | |
from numpy.linalg import solve | |
from scipy.integrate import odeint | |
from scipy.stats import norm, uniform, beta | |
from scipy.special import jacobi | |
a = 0.0 |
from pylab import * | |
from scipy.stats import norm, uniform | |
theta_grid = arange(0,2*pi,1.0/1024.0) | |
true_b = pi/2 | |
b_belief = ones(shape=theta_grid.shape, dtype=float) | |
b_belief /= b_belief.sum() |
from pylab import * | |
hiv_infections = 29418 | |
gun_homicides = 11078 | |
gun_suicides = 19392 | |
gun_deaths = gun_homicides + gun_suicides | |
hiv_qualys = array([22.9, 31.9]) | |
hiv_qualys_discounted = array([9.34, 13.18]) |
from pylab import * | |
from scipy.stats import * | |
num_adults = 227e6 | |
basic_income = 7.25*40*50 | |
labor_force = 154e6 | |
disabled_adults = 21e6 | |
current_wealth_transfers = 3369e9 | |
def jk_rowling(num_non_workers): |