Hi Matthew,
here is an example, where mu and sigma are calculated by numerical integration. Also shown are analytical results for those, which agree with the numerical results. For the mean of y = (y1 +y2 +y3)/3,
which is not a big surprise. The variance of y is
var = Integral (x-mu)^2*(y1 +y2 +y3)/3 dx
If y1 has mean mu1 and standard deviation sigma1 then the integral involving y1 above is
and similarly for y2 and y3. The analytic expression for the variance and standard deviation is shown below.
Note that none of these results has anything to do with whether or not the pdfs are normal distributions. The pdfs could be anything, not even of the same type (as long as each is normalized to 1), and the result is the same.
xplot = -20:.001:38;
figure(1)
plot(xplot,y(xplot))
grid on
N = integral(@(x) y(x), -inf,inf)
mu = integral(@(x) x.*y(x), -inf,inf)
var = integral(@(x) (x-mu).^2.*y(x),-inf,inf)
sig = sqrt(var)
mus = [16 3 9];
sigs = [ 2 1 3];
muA = (1/3)*sum(mus)
varA = (1/3)*(sigs(1)^2 + (mu-mus(1))^2 ...
+ sigs(2)^2 + (mu-mus(2))^2 ...
+ sigs(3)^2 + (mu-mus(3))^2)
sigA = sqrt(varA)
function a = y(x)
mus = [16 3 9];
sigs = [ 2 1 3];
y1 = normpdf(x,mus(1),sigs(1));
y2 = normpdf(x,mus(2),sigs(2));
y3 = normpdf(x,mus(3),sigs(3));
a = (1/3)*(y1+y2+y3);
end
0 Comments
Sign in to comment.