필터 지우기
필터 지우기

How to show he distribution of a random variable Y=X1+X2+……+Xn where X1,X2…,Xn are i.i.d. uniformly distributed random variables?

조회 수: 9 (최근 30일)
Try to show the distribution of a random variable Y=X1+X2+……+Xn where X1,X2…,Xn are i.i.d. uniformly distributed random variables? What can you conclude from the resulting PDF?

답변 (1개)

Image Analyst
Image Analyst 2017년 11월 26일
Try this:
numRandomNumbers = 1000
numSums = 4;
y = rand(numSums, numRandomNumbers);
sumOfRandomNumbers = sum(y, 1);
subplot(1, 2, 1);
histogram(y);
grid on;
subplot(1, 2, 2);
histogram(sumOfRandomNumbers);
grid on;
Change numSums and see what happens.
  댓글 수: 4
Image Analyst
Image Analyst 2017년 11월 26일
numSums is the number of random numbers you want to sum up. I chose numRandomNumbers = 1000 just so we'd have a good number of numbers from which to get a fairly smooth distribution. So for n = 2, we are going to add two rows together - the first row to the second row, so you'll have 1000 sums, each of which is the sum of two random numbers. Then you take the histogram (distribution) of those 1000 sums and plot them.
For n = 1, the histogram will be a rect function, i.e., flat.
For n = 2, it will be the convolution of 2 rect functions which will be a triangle.
For n = 3 it will be the convolution of a triangle and a rect, which starts looking like a Gaussian.
For each additional n it's like convolving the prior distribution with another rect function.
For larger n it becomes more and more like a Gaussian, as described by the Central Limit Theorem. A rule of thumb is that after about an n of 6 or so, you can approximate the distribution with a Gaussian/Normal distribution, which can make the math easier compute and easier to deal with mathematically because the formula(s) are well known.

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

카테고리

Help CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by