       Re: TransformedDistribution, for a sum of M iid variables

• To: mathgroup at smc.vnet.net
• Subject: [mg120428] Re: TransformedDistribution, for a sum of M iid variables
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Fri, 22 Jul 2011 03:42:34 -0400 (EDT)

```Clear[distSN]

distSN = NormalDistribution[0, 1];

Assume that

distSN[n_] = NormalDistribution[0, Sqrt[n]];

Proof by induction

distSN[n + 1] ==
TransformedDistribution[
x + y, {Distributed[x, distSN[n]],
Distributed[y, NormalDistribution[0, 1]]}]

True

More generally,

Clear[distN]

distN = NormalDistribution[m, s];

Assume

distN[n_] = NormalDistribution[n*m, Sqrt[n*s^2]];

Proof by induction

distN[n + 1] ==
TransformedDistribution[
x + y, {Distributed[x, distN[n]],
Distributed[y, NormalDistribution[m, s]]}] // ExpandAll

True

More general forms cannot be as proved as readily; however, the extensions are obvious.

Clear[dist]

dist[n_Integer?Positive] =
NormalDistribution[Sum[m[k], {k, n}], Sqrt[Sum[s[k]^2, {k, n}]]];

dist[m_List, s_List] :=

NormalDistribution[Total[m], Norm[s]] /; Length[m] == Length[s];

For example,

dist

NormalDistribution[m + m + m + m,
Sqrt[s^2 + s^2 + s^2 + s^2]]

With[{n = RandomInteger[{10, 100}]},
Simplify[
dist[n] == dist[Table[m[k], {k, n}], Table[s[k], {k, n}]],

True

Testing consistency with the simpler cases:

With[{n = RandomInteger[{10, 100}]},
(dist[n] /. {m[_] -> m, s[_] -> s}) == distN[n]]

True

With[{n = RandomInteger[{10, 100}]},
(dist[n] /. {m[_] -> 0, s[_] -> 1}) == distSN[n]]

True

Bob Hanlon

---- paulvonhippel at yahoo <paulvonhippel at yahoo.com> wrote:

=============
Using the TransformedDistribution function it is easy to show that the
sum of two normal variables is normal, e.g.,

Input:
TransformedDistribution[Z1+Z2,{Z1\
[Distributed]NormalDistribution[0,1],Z2\
[Distributed]NormalDistribution[0,1]}]

Output:
NormalDistribution[0, Sqrt]

Likewise it wouldn't be hard to show that the sum of 3 normal
variables is normal, or 4.

But how do I show that the sum of M normal variables is normal, where
M is an arbitrary positive integer.

I'm thinking I should use the Sum function inside
TransformedDistribution, but I don't know how the notation would work.
I see that there's a UniformSumDistribution function, but that's
limited to uniform variables.

Later I will want to do similar calculations for nonnormal
distributions.

Thanks for any pointers.

--

Bob Hanlon

```

• Prev by Date: Re: TransformedDistribution, for a sum of M iid variables
• Next by Date: Re: TransformedDistribution, for a sum of M iid variables
• Previous by thread: Re: TransformedDistribution, for a sum of M iid variables
• Next by thread: Re: TransformedDistribution, for a sum of M iid variables