フィルターのクリア

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 件のコメント
Youssef Rawy
Youssef Rawy 2017 年 11 月 26 日
which n is equal to 4 right?
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 Center および File ExchangeRandom Number Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by