How to implement this random distribution operation with matlab(beta disturbution)

1 回表示 (過去 30 日間)
YANZHI YANG
YANZHI YANG 2022 年 4 月 18 日
コメント済み: YANZHI YANG 2022 年 4 月 19 日
Satisfy beta distribution
mean:0.362
std:0.245
A:2
B:0.98
  3 件のコメント
YANZHI YANG
YANZHI YANG 2022 年 4 月 18 日
But you can't tell what the mean is.
Torsten
Torsten 2022 年 4 月 18 日
編集済み: Torsten 2022 年 4 月 18 日
mean = A/(A+B)
std = sqrt(A*B/((A+B+1)*(A+B)^2))
If mean and std are given, you can "invert" the formulae to get the A and B values for MATLAB's "betarnd".

サインインしてコメントする。

回答 (1 件)

the cyclist
the cyclist 2022 年 4 月 18 日
You can calculate the parameters of the beta distribution from the mean and variance. The formula for doing this is on the Wikipedia page for the beta distribution. There is also a good description of the process here.
Once you have that, you can use the betarnd function.

Community Treasure Hunt

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

Start Hunting!

Translated by