Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mean = 0
- variance = 1
- samples = 100000
- # vectors
- a = np.random.normal(mean, variance, samples)
- b = np.random.normal(mean, variance, samples)
- c = np.random.normal(mean, variance, samples)
- # weights
- weight_a = 0.3
- weight_b = 0.3
- weight_c = 0.4
- result = (a * weight_a) + (b * weight_b) + (c * weight_c)
- print(np.mean(result), np.var(result))
- # 0.001295722463321136 0.34123206614565454
Add Comment
Please, Sign In to add comment