フィルターのクリア

How to compare two different sample size on basis of datapoints in same interval?

4 ビュー (過去 30 日間)
Alex
Alex 2018 年 4 月 17 日
コメント済み: Alex 2018 年 4 月 17 日
Dear all,
Here is my problem:
I have two datasets of size N1 and N2. In both the datasets, I have data from .5 to 1.0. I want to plot two histograms showing the frequency of occurrence of 0.5-0.6, 0.7-0.8 and 0.9-1.0. Since the size of datasets are different, it would be unfair to just plot the occurrence of intervals. So, I calculated the percentage of occurrence of each intervals.
But then I am lost as how to visualize it?
Any pointers will be really helpful.
Thanks

採用された回答

njj1
njj1 2018 年 4 月 17 日
編集済み: njj1 2018 年 4 月 17 日
You can use a histogram, but with the property 'Normalization' set to 'pdf'. This will plot an estimated probability density function histogram. You can also set bin lengths in histogram.
  2 件のコメント
Alex
Alex 2018 年 4 月 17 日
Thank you @njj17 for the answer. I did try to use Normalization but could not succeed. Maybe you have an example and don't mind sharing?
x1 = randn(1000,1);
x2 = randn(1500,1);
y1 = 0.1 + randn(1000,1);
y2 = 0.4 + randn(1500,1);
How should I proceed next?
Alex
Alex 2018 年 4 月 17 日
I got it :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by