Creating Distribution by Specifying Densities
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I would like to fit a distribution to a vector that contains the probability mass/densities of the desired distribution.
For example, assume my vector of probability masses is [0.02 0.1 0.015] with the corresponding x-coordinates being [-1 0 1.2].
(So I have a probability mass of 0.02 at x = -1, a probability mass of 0.1 at x = 0 and so on).
Is there any function in MATLAB that would allow me to fit say, a normal distribution to a distribution with the probability masses at the specified coordinates? I understand that options such as fitdist are available if I am dealing with a histogram/dataset but here I would like to fit a distribution given the probability masses/densities at certain points.
Any help would be much appreciated and thank you in advance.
0 个评论
回答(1 个)
Torsten
2023-4-27
编辑:Torsten
2023-4-27
If the masses add to 1, your x-coordinates together with the probability masses already define the distribution. There is no reason for fitting here.
If the masses don't add to 1, you can arbitrarily distribute (1-sum of masses) on the x-axis. So there is not senseful way of fitting and obtaining a distribution in this case.
2 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!