필터 지우기
필터 지우기

Plotting on probability paper

조회 수: 6 (최근 30일)
Amital
Amital 2011년 6월 27일
편집: the cyclist 2019년 11월 15일
Need some help with plotting: I'm calculating probability of detection (Pd) as a function of number of pulses (N). Is there any way to scale the Pd axis to match a probability paper display? I'm familiar with functions such as probplot and normplot but I think they are useless in my case (my data is already probability values).
  댓글 수: 6
bym
bym 2011년 7월 4일
just give some sample data, there is no way to attach sample data except via 3rd party host site
Amital
Amital 2011년 7월 16일
For example:
N = 1:50;
Pd = [ 0.000383300630824923 0.00304135866412469 0.0115018297345039 0.0299724820999226 0.0620021866776590 0.109393828951169 0.171732062381264 0.246552187406658 0.329955743864937 0.417405529850324 0.504469775589605 0.587373712581881 0.663308835662832 0.730518912100307 0.788219407087160 0.836417608881746 0.875693476402896 0.906985359331223 0.931407248664091 0.950109249769390 0.964182240138594 0.974601251259546 0.982199211646827 0.987662230603251 0.991538575189021 0.994255111160449 0.996136711333829 0.997425684412606 0.998299510385346 0.998886064327547 0.999276105246741 0.999533163271662 0.999701142182148 0.999810022829196 0.999880051534573 0.999924758662280 0.999953097907271 0.999970939636442 0.999982099032798 0.999989035045252 0.999993320015178 0.999995951806419 0.999997559162203 0.999998535534269 0.999999125521121 0.999999480227800 0.999999692439166 0.999999818798839 0.999999893693984 0.999999937888214 ];
Now, plotting Pd as a function of N on a probability paper.

댓글을 달려면 로그인하십시오.

채택된 답변

the cyclist
the cyclist 2011년 7월 16일
Use the norminv() function to convert your Pd probability values into z-scores.
z = norminv(Pd);
figure
plot(N,z);
p_label = [0.001 0.01 0.05 0.1 0.25 0.5 0.75 0.9 0.95 0.99 0.999 0.9999 0.99999];
set(gca,'YTick',norminv(p_label))
set(gca,'YTickLabel',p_label)
  댓글 수: 3
Amital
Amital 2011년 7월 18일
Thanks a lot. This is exactly what I was looking for.
Yimin Lim
Yimin Lim 2018년 2월 2일
Hi, is there any way to plot this while retaining the probability scale? can't really find any thread on this at all.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Oleg Komarov
Oleg Komarov 2011년 7월 16일
N = 1:50;
Pd = [ 0.000383300630824923 0.00304135866412469 0.0115018297345039 0.0299724820999226 0.0620021866776590 0.109393828951169 0.171732062381264 0.246552187406658 0.329955743864937 0.417405529850324 0.504469775589605 0.587373712581881 0.663308835662832 0.730518912100307 0.788219407087160 0.836417608881746 0.875693476402896 0.906985359331223 0.931407248664091 0.950109249769390 0.964182240138594 0.974601251259546 0.982199211646827 0.987662230603251 0.991538575189021 0.994255111160449 0.996136711333829 0.997425684412606 0.998299510385346 0.998886064327547 0.999276105246741 0.999533163271662 0.999701142182148 0.999810022829196 0.999880051534573 0.999924758662280 0.999953097907271 0.999970939636442 0.999982099032798 0.999989035045252 0.999993320015178 0.999995951806419 0.999997559162203 0.999998535534269 0.999999125521121 0.999999480227800 0.999999692439166 0.999999818798839 0.999999893693984 0.999999937888214 ];
f = figure;
ax = axes('Parent',f,'YScale','log','YMinorTick','on',...
'YMinorGrid','on','YGrid','on',...
'YColor',[.5 .5 .5],'XScale','log',...
'XMinorTick','on','XMinorGrid','on',...
'XGrid','on','XColor',[.5 .5 .5],...
'MinorGridLineStyle','-','box','on');
hold(ax(1),'all');
% Create loglog
loglog(N,Pd,'LineWidth',2);
% Overwrite axes to make it black keeping grey grid
prop = get(ax(1),{'Xlim','Ylim','Xtick','Ytick'});
ax(2) = axes('Parent',f,'YScale','log','XScale','log','box','on',...
'Color','none','Xlim',prop{1},'Ylim',prop{2},...
'Xtick',prop{3},'Ytick',prop{4});
The result:
EDIT: QQplot against normal
qqplot(norminv(Pd))
PS. Here Pd is a cdf
  댓글 수: 4
Warda Panondi
Warda Panondi 2019년 11월 15일
Dear Everyone,
i will take as an oppurtunity to ask related to this topic, I just what to ask on how to plot linear probablity plot as the picture shown.
for example.
x=[ 44 38 36 35 27 26.5 26 26 24 23.5 23 23 21 20.5 19.5 19 19 19 19 19 18 18 17.6 17 17 17 16 16 16 16 14.5 14 13 11 11 10 9 8.5 ]
y = [ 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 0.974359 ]
and im looking that my result would be like this.
probabilityPlot.JPG
Hoping for your help.
Best Regards,
Warda
the cyclist
the cyclist 2019년 11월 15일
편집: the cyclist 2019년 11월 15일
Every value in your y vector seems to identical, so you cannot get a plot that looks like that from the data you posted.

댓글을 달려면 로그인하십시오.


Larry B
Larry B 2015년 10월 9일
Do not know if this is an issue for you anymore, but I also wanted to do CDF curves on probability paper. Cam Sulzberger, MathWorks Technical Support Department, created the below program for doing so. I added the following lines to my CDF program plotting both simulation results and theoretical curves: .... plotProbGraphPaper(a1,w1,'-k','linewidth',3); hold on plotProbGraphPaper(a1,w2,'vk','linewidth',3); hold on plotProbGraphPaper(a1,w3,'--k','linewidth',3); hold on plotProbGraphPaper(a1,w4,'sk','linewidth',3); hold on plotProbGraphPaper(a1,w5,':k','linewidth',3); hold on plotProbGraphPaper(a1,w6,'dk','linewidth',3); hold on plotProbGraphPaper(a1,w7,'-.k','linewidth',3); hold on plotProbGraphPaper(a1,w8,'dk','linewidth',3); hAx = gca; hAx.YLim(1) = norminv(0.0001); hAx.YLim(2) = norminv(0.999); hold off...
Attached is the resulting curves for a non-central Chi-Squared CDF. Pretty slick!! Thanks, Cam!!
------function plotProbGraphPaper(x,y,varargin) % plotProbGraphPaper(x,y,_) % Sets the y-axis limits and tick marks to display in the style of % probability graph paper
% Plot the data, converting to z-scores z = norminv(y); plot(x,z,varargin{:}) hAx = gca; % % Define potential tick locations ticks = [.0001 .0005 .001 .005 .01 .05 .1 .25 .5 ... .75 .9 .95 .99 .995 .999 .9999 .99995]; ticksNV = norminv(ticks);
% Remove ticks that are outside the y-axis range hAx.YLimMode = 'auto'; keepTicks = ticksNV >= hAx.YLim(1) & ticksNV <= hAx.YLim(2); ticks = ticks(keepTicks); ticksNV = ticksNV(keepTicks);
% Remove ticks that are too close together tol = 0.025*diff(hAx.YLim); iTickBack = ceil(length(ticksNV)/2); iTickFwd = iTickBack-1; keepTicks = true(size(ticksNV)); while iTickFwd > 0 if ticksNV(iTickFwd) > ticksNV(iTickBack)-tol keepTicks(iTickFwd) = false; else iTickBack = iTickFwd; end iTickFwd = iTickFwd-1; end iTickFwd = iTickBack+1; while iTickFwd < length(ticksNV) if ticksNV(iTickFwd) < ticksNV(iTickBack)+tol keepTicks(iTickFwd) = false; else iTickBack = iTickFwd; end iTickFwd = iTickFwd+1; end if ~all(keepTicks) ticks = ticks(keepTicks); ticksNV = ticksNV(keepTicks); end
% Assign the tick values and labels using norminv hAx.YTick = ticksNV; hAx.YTickLabel = ticks;
% Add grid hAx.XGrid = 'on'; hAx.XMinorGrid = 'off'; hAx.YGrid = 'on'; hAx.YMinorGrid = 'off';

Community Treasure Hunt

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

Start Hunting!

Translated by