How can I estimate a recursive (expanding) empirical cumulative distribution function?

3 ビュー (過去 30 日間)
Theshne Kisten
Theshne Kisten 2018 年 8 月 20 日
回答済み: Himanshu 2024 年 10 月 23 日 4:58
Hi. I would like to know how to estimate an empirical cumulative distribution function over an expanding window. The initial window includes 10 observations and I would like the window to increase by 1 observation each time i.e. recursive estimation? Can anyone help with the code?
Thanks in advance.

回答 (1 件)

Himanshu
Himanshu 2024 年 10 月 23 日 4:58
Hey Theshne,
You can follow the steps mentioned below to implement the same:
  1. Start by computing the ECDF for the initial set of observations. This gives you a baseline from which to begin your recursive updates.
  2. As you expand the window by one observation, incorporate this new data point into your existing ECDF.
  3. Instead of recalculating the ECDF from scratch, adjust the existing ECDF to account for the new observation. This involves updating the cumulative counts and probabilities.
  4. Repeat the process by adding each subsequent observation to the existing ECDF, updating the distribution recursively with each addition.
You can use the 'ecdf' function from the 'Statistics and Machine Learning Toolbox' for this purpose. Here is the documentaion for the same:
https://www.mathworks.com/help/stats/ecdf.html#description

カテゴリ

Help Center および File ExchangeExploration and Visualization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by