MATLAB: Probability (U>X).

probability

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?

Best Answer

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)