How to generate random numbers between min and max value with gevrnd?I
3 ビュー (過去 30 日間)
古いコメントを表示
I have 16 value with distributed by generalized extreme value. I have k, sigma and mu of this data. I want to increase the data with this distribution between 20 and 21. How can I do it, may I get your help with code sharing?
Thanks
4 件のコメント
Walter Roberson
2020 年 7 月 1 日
Do I understand properly that currently you have the situation where you have a continuous distribution that includes the range 20 to 21, and that you would like to create a new distribution with increased probability between 20 and 21? If the probability from -inf to 20 is currently p1, and the probability from 20 to 21 is p2, and the probability from 21 to infinity is currently p3, that instead of that [p1, p2, p3] situation, you would like a situation where middle section was C times higher, so your distribution would be in sections with probabilities
[(C*p2 - 1)/(p2 - 1) * p1, C*p2, (C*p2 - 1)/(p2 - 1) * p3]
??
If so then note that the pdf would no longer be continuous and that the sigma and mu would change.
採用された回答
Walter Roberson
2020 年 7 月 1 日
truncate() the distribution. That will automatically re-scale the pdf so that the probability integral over the given range becomes 1.
11 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!