Asked by Itzik Ben Shabat
on 9 Oct 2015

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?

Answer by 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

Itzik Ben Shabat
on 9 Oct 2015

Walter Roberson
on 9 Oct 2015

Tom Lane
on 24 Oct 2015

Sign in to comment.

Answer by 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.

Itzik Ben Shabat
on 11 Oct 2015

so

[f,xi] = ksdensity(x,pts)

seems to be the closest to what i need. Is there a functio that converts to probability instead of probability density ?

Walter Roberson
on 11 Oct 2015

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
on 11 Oct 2015

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 0 Comments

Sign in to comment.