the magnitude of y-axis in a ksdensity plot

4 ビュー (過去 30 日間)
Nguyen
Nguyen 2014 年 10 月 5 日
コメント済み: Nguyen 2014 年 11 月 7 日
Dear all,
Can you explain the meaning of magnitude of y-axis in a plot using ksdensity function?
Thank you very much.

採用された回答

the cyclist
the cyclist 2014 年 10 月 5 日
編集済み: the cyclist 2014 年 10 月 5 日
The output of ksdensity() is an estimate of the probability density function.
It's the function f(x) such that
f(x) * dx
is the probability of a randomly selected value from the distribution being in that particular interval of x.
People are sometimes confused by the fact that the output of ksdensity doesn't sum to 1. You have to remember to multiply by the interval width. Then it will.
  4 件のコメント
the cyclist
the cyclist 2014 年 10 月 6 日
MATLAB doesn't know that negative values of x don't make physical sense.
But you can tell the function not to allow negative values by using additional arguments:
[f xi] = ksdensity(...,'support','positive')
See the documentation for details.
Nguyen
Nguyen 2014 年 11 月 7 日
Thank you very much. You help me a lot. Wish you have a good weekend.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by