# Summing Normal random variables

I would like to plot the graph of the sum of two random variables.So, I wrote

Plot[PDF[NormalDistribution[0, 1]+NormalDistribution[0, 1], x], {x, -10, 10}]


Why doesn't it work?

-
Also, if you need exactly what you tried to execute you can use Plot[PDF[NormalDistribution[0, 1], x] + PDF[NormalDistribution[0, 1], x], {x, -10, 10}, Filling -> Axis, PlotRange -> All] –  Sektor Feb 5 at 22:25
Thanks Sektor ;) –  An old man in the sea. Feb 5 at 22:30
And also thanks to Szabolcs for the MixtureDistribution command. ;) –  An old man in the sea. Feb 5 at 22:31
@Anoldmaninthesea. Actually I was very stupid and gave you an incorrect answer. I apologize. I corrected it now. –  Szabolcs Feb 5 at 22:32
No worries. Thanks for the help. =) –  An old man in the sea. Feb 5 at 22:44

You'll need to use TransformedDistribution to achieve this:

d = TransformedDistribution[
a + b,
{a \[Distributed] NormalDistribution[0, 1], b \[Distributed] NormalDistribution[2, 2]}]

(* ==> NormalDistribution[2, Sqrt[5]] *)


This represents the distribution of a+b if a is distributed according to NormalDistribution[0, 1] and b is distributed according to NormalDistribution[2, 2].

In this case the result is automatically simplified to another NormalDistribution, but it can be used in cases when it can't be automatically simplified as well.

As usual, you can obtain the PDF using PDF[d, x], and then plot it.

-
Many thanks Szabolcs. ;) –  An old man in the sea. Feb 5 at 22:44

You can also try

Plot[PDF[NormalDistribution[0, 1], x] +
PDF[NormalDistribution[0, 1], x], {x, -10, 10}, PlotRange -> All]


so just make each Normal Distribution it's own PDF.

-
This is incorrect. The OP wanted the PDF of the sum of two random variables, not the sum of two PDFs. –  Simon Woods Sep 10 at 12:36