Seven Lines of Julia (examples sought)

Addition of uniform, identically distributed random variables. In one case we are adding a variable to itself (dependent distribution), and in the other we we are adding it to an independent, identically distributed variable.

using Plots, MonteCarloMeasurements

a = 1..2
b = 1..2

default(alpha=0.5, nbins=20, normalize=true)
plot(a+a, label="a+a")
plot!(a+b, label="a+b")

image

8 Likes