making normally distributed over Specific Range

how can i make 10 normally distributed number over [8 10] for example

8 Kommentare

Torsten
Torsten am 1 Nov. 2022
What so you mean by restricting the normal distribution to a specified interval ?
Use a truncated normal distribution that only has mass on [8 10] ?
Generate random numbers from the usual normal distribution until 10 of them have fallen in the interval [8 10] ?
It is written in an article that:
10 battery capacities are normally distributed over [22,25] kwh
Torsten
Torsten am 1 Nov. 2022
Is the article freely available ? Can you give a link ?
Torsten
Torsten am 1 Nov. 2022
Use
That's the only way I can interprete "normally distributed random numbers over an interval".
A google search of terms from that paragraph turned up this thesis.
Perhaps they mention what they mean in another section, or have some code included so that you can see directly. (I didn't look.) Or perhaps you can contact Behnam Khaki and find out.
See my best guess in my answer.
Torsten
Torsten am 1 Nov. 2022
I agree that most probably, "uniformly" instead of "normally" is meant.
The reason is that it is totally unclear which "universal" normal distribution (mean & variance) could be suited for all the intervals addressed in the thesis.
John D'Errico
John D'Errico am 1 Nov. 2022
Bearbeitet: John D'Errico am 1 Nov. 2022
I would hazard it is unlikely that arrival and departure times would be truly normally distributed in some time interval. Honestly, that would make little sense. However, a uniform distribution of arrivals and departures on some interval makes complete sense.
In turn, that suggests that when that reference talks about normally distributed, they have no idea what they are saying. Sigh.
How about a distribution of battery energies, on an interval? Here, we MIGHT argue for either case. But even then a normal distribution on a fixed, finite interval makes no sense. At best, we might see a truncated normal distribution. So perhaps a charger tries to charge a system to target level, but does not attain that level of charge perfectly due to limits on the ability of the charger to measure what it does, or the capability of the battery to accept a charge. However even there it seems much simpler to argue for a uniform distribution of charge levels over some interval.
Again, I'd give good odds the author had no idea what they meant when they wrote the words normally distributed, not understanding that normally distributed carries with it a very specific connotation in terms of the mathematics. It is not uncommon.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

the cyclist
the cyclist am 1 Nov. 2022
Bearbeitet: the cyclist am 1 Nov. 2022
It is not possible to have a normal distribution in a finite range.
So, we are all left guessing what the author of this document actually intends.
My best guess is that they actually meant uniformly distributed, rather than normally distributed. Part of the reason I think that is that a normal distribution (even a truncated one), would need to have a variance defined to be fully specified.
If you want to go with that guess, then one way to generate 10 random numbers from a uniform distribution over [8, 10], then
unifrnd(8,10,10,1)
ans = 10×1
8.0782 8.6706 8.9102 9.3289 8.0229 9.8072 9.9151 9.2215 8.0922 8.0361
will do that for you.

Kategorien

Mehr zu Thermal Analysis finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 1 Nov. 2022

Bearbeitet:

am 1 Nov. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by