finding the probability that the mean is between (a) and (b) for a generated sample "nsamples" of sample size "n" from u(a,b)..
just need to find that.. If anyone is interested I may have a few more questions as well, thanks...

1 件のコメント

HrMmz
HrMmz 2016 年 11 月 27 日
i just need the part of finding the probability between (a) and (b) i should have the rest figured out tyvm

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

 採用された回答

Image Analyst
Image Analyst 2016 年 11 月 27 日

0 投票

Try this
theProbability = sum(nsamples > a & nsamples < b) / n;

1 件のコメント

HrMmz
HrMmz 2016 年 11 月 27 日
thank you! i'll test it later but perfect, i'm used to getting flamed for asking programming questions hehe

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

その他の回答 (1 件)

Torsten
Torsten 2016 年 11 月 28 日

1 投票

The probabiliy is 1 since the arithmetic mean of n numbers between a and b is also between a and b.
Best wishes
Torsten.

カテゴリ

質問済み:

2016 年 11 月 27 日

回答済み:

2016 年 11 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by