find the probability that the mean is between a and b

1 Ansicht (letzte 30 Tage)
HrMmz
HrMmz am 27 Nov. 2016
Beantwortet: Torsten am 28 Nov. 2016
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 Kommentar
HrMmz
HrMmz am 27 Nov. 2016
i just need the part of finding the probability between (a) and (b) i should have the rest figured out tyvm

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 27 Nov. 2016
Try this
theProbability = sum(nsamples > a & nsamples < b) / n;
  1 Kommentar
HrMmz
HrMmz am 27 Nov. 2016
thank you! i'll test it later but perfect, i'm used to getting flamed for asking programming questions hehe

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

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

Kategorien

Mehr zu Descriptive Statistics and Visualization finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by