Re: Possibly Silly Question on Manipulating Statistical Distributions
- To: mathgroup at smc.vnet.net
- Subject: [mg9437] Re: [mg9352] Possibly Silly Question on Manipulating Statistical Distributions
- From: Bob Hanlon <BobHanlon at aol.com>
- Date: Wed, 5 Nov 1997 01:56:55 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Part of your problem is straightforward.
Needs["Statistics`ContinuousDistributions`"]
If the random variables Y and Z are independent then the probability
density function of their sum W = Y + Z equals the convolution of
their respective densities. (Ref: Papoulis, Athanasios; Probability,
Random Variables, and Stochastic Processes; McGraw-Hill, New York,
1965, p. 189)
Let Y be N(0, 1) and Z be N(0, 2) then the PDF for W is given by
pdf[w] :=
Evaluate[Integrate[
PDF[NormalDistribution[0, 1], y] *PDF[NormalDistribution[0, 2],
w-y],
{y, -Infinity, Infinity}]]
Plot[Evaluate[pdf[w]], {w, -7, 7}];
This convolution of their densities is equivalent to multiplying their
characteristic functions, that is, the characteristic function of W is
the product of the characteristic functions of Y and Z (Ref: Papoulis,
p. 159):
CharacteristicFunction[NormalDistribution[0, s], t]
\!\(E\^\(\(-\(1\/2\)\)\ s\^2\ t\^2\)\)
CharacteristicFunction[NormalDistribution[0, 1], t] *
CharacteristicFunction[NormalDistribution[0, 2], t]
\!\(E\^\(-\(\(5\ t\^2\)\/2\)\)\)
Consequently, W is also Normal, that is, W is N(0, Sqrt[5])
Plot[PDF[NormalDistribution[0, Sqrt[5]], w], {w, -7, 7}];
Plot[CDF[NormalDistribution[0, Sqrt[5]], w], {w, -7, 7}];
More generally,
(CharacteristicFunction[NormalDistribution[0, s1], t] *
CharacteristicFunction[NormalDistribution[0, s2], t] ==
CharacteristicFunction[NormalDistribution[0, Sqrt[s1^2 + s2^2]],
t]) //
Simplify
True
Consequently, if
Y is N(0, s1); Z is N(0, s2); W = Y + Z; Y and Z independent
then
W is N(0, Sqrt[s1^2 + s2^2])
Continuing the generalization,
CharacteristicFunction[NormalDistribution[m, s], t]
\!\(E\^\(I\ m\ t - \(s\^2\ t\^2\)\/2\)\)
(CharacteristicFunction[NormalDistribution[m1, s1], t] *
CharacteristicFunction[NormalDistribution[m2, s2], t] ==
CharacteristicFunction[NormalDistribution[m1+m2, Sqrt[s1^2 +
s2^2]], t])
// Simplify
True
Consequently, if
Y is N(m1, s1); Z is N(m2, s2); W = Y + Z; Y and Z independent
then
W is N(m1 + m2, Sqrt[s1^2 + s2^2])
I believe that the case for a product of a discrete and a continuous
distribution is much more complicated.
Bob Hanlon