How to calculate empirical cumulative distribution function of a dataset? If I use ecdf function then why the number of datapoints are decreasing? Is there any other formula?
11 次查看(过去 30 天)
显示 更早的评论
How to calculate empirical cumulative distribution function of a dataset which is a (18993x1) matrix? If I use ecdf function then why the number of datapoints (the matrix f1 becomes (1564x1) and x1 becomes(1564x1) matrix) are decreasing? Is there any other formula or method or function to do so?
0 个评论
回答(1 个)
Torsten
2023-8-9
编辑:Torsten
2023-8-9
If I use ecdf function then why the number of datapoints (the matrix f1 becomes (1564x1) and x1 becomes(1564x1) matrix) are decreasing?
Usually, a lower number of data points is sufficient to describe the cdf. If you want to get the values of the cdf exactly for the points of your data vector, you can use interpolation.
Is there any other formula or method or function to do so?
If you know that your data points follow a known distribution, you can try to use "mle" to fit the distribution parameters. After that, you can plot the cumulative distribution function of the fitted distribution (maybe together with the empirical cumulative distribution you get from "ecdf").
But this is all explained here with a lot of examples:
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!