why does probplot return negative/larger than 1 values ?

조회 수: 4 (최근 30일)
Itzik Ben Shabat
Itzik Ben Shabat 2015년 10월 9일
댓글: Tom Lane 2015년 10월 24일
Hi,
h=probplot(Y);
is supposed to show the probability distrbution of the values in Y. so probability cant be negative or larger than 1 but if i check
get(h,'ydata');
it has both negative values and values larger than 1. how is that possible ? perhaps i misunderstood something?

답변 (2개)

Walter Roberson
Walter Roberson 2015년 10월 9일
get(h,'ydata') is going to return whatever data the routine needed to generate in order to plot nicely. If you look at the y axis locations you can see that the spacing is not nearly equidistant in probability value, with values being close together near the middle and further apart near the top or bottom.
A plausible explanation would be that the data stored is in terms of standard deviations from mean 0.5
  댓글 수: 3
Walter Roberson
Walter Roberson 2015년 10월 9일
http://www.mathworks.com/help/stats/cdf.html if you know the probability distribution. If you do not know the probability distribution and want to find the "best" fit, then you would use other routines.
Tom Lane
Tom Lane 2015년 10월 24일
For a normal distribution, Walter is correct. The plot is constructed from standard normal values on the Y axis. The ticks are positioned and labeled, though, to indicate the probability values rather than the normal values. For instance, the tick mark labeled 0.75 is at the position where the plotted points have the value y=norminv(.75). Why all this? Because this construction (y values from standard normal) means that x data having a normal distribution with any mean or standard deviation will look roughly linear. If the points had been plotted with y data on the probability scale (rather than just labeled with those values), we would not have this simple linear relationship.

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


Image Analyst
Image Analyst 2015년 10월 10일
In the Statistics and Machine Learning Toolbox:
[f,xi] = ksdensity(x,pts) returns a probability density estimate, f, for the sample in the vector x, evaluated at the specified values in vector pts. Here, the xi and pts vectors contain identical values.
[pdca,gn,gl] = fitdist(x,distname,'By',groupvar) creates probability distribution objects by fitting the distribution specified by distname to the data in x based on the grouping variable groupvar. It returns a cell array of fitted probability distribution objects, pdca, a cell array of group labels, gn, and a cell array of grouping variable levels, gl.
  댓글 수: 3
Walter Roberson
Walter Roberson 2015년 10월 11일
I am unclear as to the task here. Is it to figure out which probability distribution something is? Is it to estimate the probability distribution? Is it to assume that the data is already normally distributed and to figure out the probability of each sample relative to the known distribution?
If the task is to figure out which probability distribution something is, then you need to use one of the fitting routines.
If the task is to estimate the shape of the probability distribution, then ksdensity() is appropriate.
If the task is to figure out the probability of each sample relative to the known distribution then the cdf() function I linked to above is what should be used.
Image Analyst
Image Analyst 2015년 10월 11일
To give a probability, you'd have to give a range, like the probability you'll get a value between 0.42 and 0.43 or whatever. You can use the CDF for that like Walter says. Do you have such a range? Because the probability of an exact value is zero for continuous functions, though it is non-zero for discrete data sets like a quantized image of 256 gray levels.

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

카테고리

Help CenterFile Exchange에서 Exploration and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by