How can I estimate confidence bands for kernel density estimation?

Hi everyone
I have a series of residuals that are supposed to be standard normally distributed. By using the ksdensity function, I obtain a smooth curve that indeed looks like a Gaussian. However, I want to construct confidence intervals (95%) around this density plot. Is there a built-in way how to achieve that? I also tried the Distribution fitting tool, which yielded a density plot but no confidence intervals.
Thank you in advance!

回答 (1 件)

José-Luis
José-Luis 2016 年 10 月 14 日

0 投票

You could use fitdist(), which gives you the bounds you are looking for.

1 件のコメント

mr
mr 2016 年 10 月 14 日
But how exactly do I have to proceed? Sample a sufficient number of observations and plot a histogram that depicts the pdf of the top 95% observations?

サインインしてコメントする。

質問済み:

mr
2016 年 10 月 14 日

コメント済み:

mr
2016 年 10 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by