Probability of being under a target

12 Ansichten (letzte 30 Tage)
Alexandra
Alexandra am 4 Nov. 2014
Kommentiert: Matt Tearle am 5 Nov. 2014
Hi,
I have a result variable X that is defined by an equation of random variables.
We used prctile to see the results we get with several probabilities, but now we need to known what is the probability that X is going to be under a certain value.
Is there any function that can give this?
One way I was thinking about doing this is to count the number of samples in the simulation where X is below the mark, but I don't known how to do this neither.
Thank you very much,

Akzeptierte Antwort

Matt Tearle
Matt Tearle am 4 Nov. 2014
Counting the number of samples with a given criterion is easy enough:
threshhold = pi;
nnz(X < threshhold)
The ecdf (empirical CDF) function might also help.
  4 Kommentare
Alexandra
Alexandra am 5 Nov. 2014
Only one column, the X column. Each row is a simulation. I think it worked. Thank you very much.
Matt Tearle
Matt Tearle am 5 Nov. 2014
For a single column bsxfun is overkill. mean(X < threshold) would do it.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by