How do I make a probability plot with data on the y axis and probability on the x axis?

7 ビュー (過去 30 日間)
Bruce Rhoads
Bruce Rhoads 2020 年 10 月 13 日
コメント済み: Jeff Miller 2020 年 10 月 14 日
I want to make a plot for flood frequency showing the data on the y axis and probability (normal or other distributions, e.g. Weibull) on the x axis. I have looked at normplot and probplot but they do not appear to have options for plotting probability on the x axis.

回答 (1 件)

Jeff Miller
Jeff Miller 2020 年 10 月 13 日
Something like this:
% some random data for an example
nSample = 500;
floodData = rand(nSample,1);
% percentiles/probabilities at which to
% compare predicted and observed distributions:
percentiles = 1:99;
observed = prctile(floodData,percentiles);
predicted = icdf('normal',percentiles/100,0.5,0.1);
plot(predicted,observed)
  2 件のコメント
Bruce Rhoads
Bruce Rhoads 2020 年 10 月 14 日
thanks, but this is note quite what I am looking for. I need the x axis to be a probability scale. Also I am not trying to compare distribution - the exccedence probability (x values) of the observed y values (data) are already known - it is really normplot but with the probabilities on the x axis and the values of the data on the y axis. It is frustrating that in normplot there just isnt an option to switch which axes the data are plotting on.
Jeff Miller
Jeff Miller 2020 年 10 月 14 日
Hmmm, still not sure what you want. Maybe this?
predicted2 = cdf('normal',observed,0.5,0.1);
plot(predicted2,observed)

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

Community Treasure Hunt

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

Start Hunting!

Translated by