필터 지우기
필터 지우기

Convolution of two independent normally distributed random variables

조회 수: 8 (최근 30일)
Wenjuan
Wenjuan 2012년 9월 12일
댓글: Torsten 2019년 3월 7일
If x and y are independent and both normal with mean=5, and v=4, then z=x+y should be normal with mean=10, and v=8. Why can't I proof this using convolution in Matlab.
a=linspace(-5,15,10000); x=normpdf(a,5,2); y=normpdf(a,5,2); z=conv(x,y); m=mean(z); sd=std(z);

답변 (3개)

Wayne King
Wayne King 2012년 9월 14일
편집: Wayne King 2012년 9월 14일
Hi, you are confusing things here a bit. You don't want to consider the mean and standard deviations of the PDFs. You want to consider the mean and standard deviation of the random variables. Those are very different things.
x = normrnd(5,2,1000,1);
y = normrnd(5,2,1000,1);
z = x+y;
mean(z), var(z)
To see that the N(0,8) (here I mean variance 8) is good fit to z
x = normrnd(5,2,1000,1);
y = normrnd(5,2,1000,1);
z = x+y;
mu = 10;
sigma = sqrt(8);
zmin = min(z); zmax = max(z); zrange = range(z);
binw = zrange / 30;
edges = zmin + binw*(0:30);
n = histc(z, edges);
bar(edges, n, 'histc');
hold on
xx = zmin:(zrange/1000):zmax;
plot(xx, binw*length(z)*normpdf(xx,mu,sigma), 'r');
title('Normal Fit');
The PDF of z is the convolution of the PDFs of x and y
  댓글 수: 2
Deepak Kumar
Deepak Kumar 2019년 3월 7일
what we will do if the z = x*y
Torsten
Torsten 2019년 3월 7일
Does this help ?
http://mathworld.wolfram.com/NormalProductDistribution.html

댓글을 달려면 로그인하십시오.


Rick Rosson
Rick Rosson 2012년 9월 14일
Please try:
mean(x)
std(x)
What does it show? Is it what you expected? Why or why not?
Likewise:
mean(y)
std(y)

Star Strider
Star Strider 2012년 9월 14일
편집: Star Strider 2012년 9월 14일
Since the convolution is based on the variables described by a specific distribution, it's likely best to look at the inverse normal distribution:
p = linspace(0.001,0.999,10000);
x = norminv(p,5,2);
y = norminv(p,5,2);
These give the values of a mean of 5 and a standard deviation of 2:
mx = mean(x);
sx = std(x);
my = mean(y);
sy = std(y);
and these give the values of a mean of 10 and standard deviation of 4:
z = x + y;
mz = mean(z);
sz = std(z);

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by