Probability (U>X).
2 ビュー (過去 30 日間)
古いコメントを表示
ABU SADAT MOHAMMAD SAYEM
2020 年 3 月 8 日
コメント済み: Walter Roberson
2020 年 3 月 8 日
Here U have been generated uniformly from [0,1]. X is in the range[.4,.6]. What should the algorithm for this problem and how to plot it?
0 件のコメント
採用された回答
Walter Roberson
2020 年 3 月 8 日
When U is in [0,1] and X is any single value in that range, then the probability that
is 
When U is in [0,1] and X is a range of values in that range, you should not really be asking for
: you should be asking for
and in the uniform random case, that would be max(X)-min(X)
3 件のコメント
Walter Roberson
2020 年 3 月 8 日
That depends upon whether you need to simulate the probabilities, or to calculate the probabilities.
Walter Roberson
2020 年 3 月 8 日
In order to simulate, you are going to need to break down the probability range into a number of "bins", such as every 0.01 probability. Let the number of bins be called N. Create a vector of counts, C, which is B long.
Now generate a random number, U. Multiply it by B, and take the ceiling. If you are using any of the MATLAB supplied random number generators, the result will be at least 1. Now add 1 to every entry in C that is indexed from 1 to that number.
Repeat this random number generation a number of times.
Now for any given entry in C, at index K, then C(K) is the probability that U was at least (K-1)/B
その他の回答 (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!