# Seven Lines of Julia (examples sought)

**URL:** <https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416>\
**Category:** General Usage\
**Created:** [November 19, 2020, 7:37am UTC](https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416 "2020-11-19T07:37:29Z")\
**Posts on this page:** 1\
**Showing post:** 134

<div class="post-metadata">

**Author:** ![jonniedie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonniedie/32/12842_2.png) [@jonniedie](https://discourse.julialang.org/u/jonniedie)\
**Post date:** [February 2, 2022, 8:09pm UTC](https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416/134 "2022-02-02T20:09:06Z")

</div>

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.

```julia
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](https://global.discourse-cdn.com/julialang/original/3X/9/d/9d582ed8cd8c12ee822d2ee734f9713925d1c3c3.png)

---

_[View the full topic](https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416)._
