why does probplot return negative/larger than 1 values ?

4 views (last 30 days)
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
it has both negative values and values larger than 1. how is that possible ? perhaps i misunderstood something?

Answers (2)

Walter Roberson
Walter Roberson on 9 Oct 2015
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
Tom Lane
Tom Lane on 24 Oct 2015
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.

Sign in to comment.

Image Analyst
Image Analyst on 10 Oct 2015
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.
Image Analyst
Image Analyst on 11 Oct 2015
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by