필터 지우기
필터 지우기

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?

조회 수: 15 (최근 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?

답변 (1개)

Torsten
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:

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by