how to plot probability density of a given data

Hi,
I tried to get something like this
i want to know if ksdensity is the best solution
Thanks in advance

답변 (1개)

the cyclist
the cyclist 2016년 4월 23일

0 개 추천

I would say that there is a very good chance that ksdensity is the function you want to use. If you want a smooth curve that estimates the probability density function of your data, then it's a good choice.
The main question, which you do not provide any information about, is "What is your input data?" Do you have a sample of actual data that you want the density of? That's what you'll need to use ksdensity.

댓글 수: 4

Hi,
thanks for the response, my data is a vector containing uptake values from PET image , the plot of ksdensity wasn't that good, so i used fitdist with normal distibution , here my plots for the two functions
fitdist
ksdensity
i think fitdist solve the problem, i will be grateful if you think that i am in the good way since i want to have a gaussian distribution (wich is non uniform in this case like the exemple that i showed before) to estimate mean and the standard deviation values
thanks in advance
If you assume that the underlying distribution is normal (i.e. Gaussian), then fitdist is fine. But your distribution is very clearly not normal. So the fit will not be a good representation of your data.
ksdensity will not assume normality. It is non-parametric.
But, I am confused. If you just want to estimate the mean and standard deviation, then why not just use mean() and std()?
fitdist() can take as an input quite a number of distributions to fit your data to, not only Normal. If you believe you have one on its list, then put that in.
Do you have any theory as to what your distribution might be? Otherwise, can you show us a screenshot of the histogram of your actual data - the actual observations instead of the smooth theoretical curve you showed so far?
sbei arafet
sbei arafet 2016년 4월 23일
편집: sbei arafet 2016년 4월 24일
Hi,
According to fuzzy connectedness theory the affinity function takes a normal distibution the general form is
so i thought to plot my data with normal distribution wich are as the cyclist said not normal and i can't design a function from a plot using ksdensity, that's why i assumed that this distribution is normal,
here is a screenshot of the histogram:
thanks

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

질문:

2016년 4월 23일

편집:

2016년 4월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by