In [1]:
using StatsBase

s = [874, 1293, 1070] ./ 3237
p = [224, 242, 236] ./ 702

s = WeightVec(s)
p = WeightVec(p)


Out[1]:
StatsBase.WeightVec{Float64,Array{Float64,1}}([0.319088,0.344729,0.336182],1.0)

In [2]:
rs_1 = [0.6224256292906178, 0.6906419180201083, 0.6336448598130842];
rp_1 = [0.20535714285714285, 0.2231404958677686, 0.19915254237288135];

In [3]:
rs_2 = [0.6132723112128147, 0.6945088940448569, 0.6420560747663552];
rp_2 = [0.17410714285714285, 0.21074380165289255, 0.21610169491525424];

In [4]:
rs_3 = [0.5949656750572082, 0.6682134570765661, 0.6224299065420561];
rp_3 = [0.20089285714285715, 0.19008264462809918, 0.15677966101694915];

In [5]:
rs_m = (rs_1 + rs_2 + rs_3) / 3
rp_m = (rp_1 + rp_2 + rp_3) / 3


Out[5]:
3-element Array{Float64,1}:
 0.193452
 0.207989
 0.190678

In [9]:
mean_and_std(rs_m, s)


Out[9]:
(0.6473071774276593,0.03151181365749166)

In [7]:
mean_and_std(rp_m, p)


Out[7]:
(0.19753086419753085,0.007668076468908827)

In [10]:
rs_e = [0.6052631578947368, 0.6805877803557618, 0.6271028037383177];
rp_e = [0.19642857142857142, 0.1859504132231405, 0.19915254237288135];

In [11]:
mean_and_std(rs_e, s)


Out[11]:
(0.642570281124498,0.03212797725844331)

In [13]:
mean_and_std(rp_e, p)


Out[13]:
(0.19373219373219375,0.005750867870283137)

In [17]:
rs_e_greedy = [0.6430205949656751, 0.7177107501933488, 0.6570093457943925]
rp_e_greedy = [0.23214285714285715, 0.24380165289256198, 0.23728813559322035]


Out[17]:
3-element Array{Float64,1}:
 0.232143
 0.243802
 0.237288

In [18]:
mean_and_std(rs_e_greedy, s)


Out[18]:
(0.6774791473586654,0.03325113661986212)

In [19]:
mean_and_std(rp_e_greedy, s)


Out[19]:
(0.23850067946175024,0.004756526126527522)

In [ ]: