Generating Normally Distributed Integers in R, Matlab, and Other Software

In summary, the conversation discusses the difficulty of generating normally distributed random numbers that are also integers. The speaker suggests rounding the numbers, but raises concerns about the accuracy of the normal distribution in this case. They also mention the possibility of negative values when using a normal distribution for modeling arrivals.
  • #1
Mark J.
81
0
Hi.
Any ideas how to generate in any software R, Matlab etc normally distributed random numbers by one condition so they will be integers like 1, 2,3...and not decimal values.
I tried to round up the generated decimal values but in my guess normality is doubted after that.
Regards
 
Physics news on Phys.org
  • #2
You will have to be clearer than this. A distribution which only takes on integers can never be normal.

What is it you really want??
 
  • #3
Thanks,
I mean I need to generate some sample data like 9.00 AM 9.04 AM 9.07 AM but with condition that inter-arrival times are normally distributed.
That's why I need some numbers like 4 (9.04AM -9.00AM ) etc normally distributed.
Any help on this?
 
  • #4
Arrivals are continuous. Your numbers will be real. You can round them if you like but if you do that then the approximation to normal depends on the parameters of the distribution.

I don't know what you're trying to do, but has it occurred to you that modeling arrivals with a normal distribution allows for the possibility of an arrival occurring before the previous arrival? You might want to consider that.
 
  • #5
Can you please explain something more about?
Regards
 
  • #6
I don't know which part you're referring to. For the first, just consider a normal density with s.d.=.01 vs. one with a very large s.d. If you draw from the first and round everything to the nearest integer then you basically end up with the mean for virtually all of your points. In the second case you could round to the nearest integer and still "approximate" normal, whatever that means in your context.

As to the second point, inter-arrival times are positive. T1 is the time from zero to the first arrival, T2 is the time from T1 of the second arrival, etc. So the times are usually described with a density that is zero for t<0 such as an exponential. If you use a normal distribution then you permit negative values and risk that, for example, T2<0, and your second arrival occurred prior to your first. You would take this into account in the context of what exactly you are trying to do.
 

What is a normal distribution?

A normal distribution is a type of probability distribution that is symmetrical, with most of the data falling near the mean and decreasing in frequency towards the tails of the distribution. It is also known as a Gaussian distribution.

What are the characteristics of a normally distributed set of numbers?

A normally distributed set of numbers has a bell-shaped curve, with the mean, median, and mode all being equal. The distribution is also characterized by the 68-95-99.7 rule, where approximately 68% of the data falls within one standard deviation of the mean, 95% within two standard deviations, and 99.7% within three standard deviations.

How is a normal distribution different from other types of distributions?

Unlike other distributions, a normal distribution is symmetrical and follows a specific mathematical equation. It is also the most commonly occurring type of distribution in nature and is often used in statistical analysis due to its predictable characteristics.

What is the importance of normally distributed numbers in scientific research?

Normally distributed numbers are important in scientific research because they allow for meaningful statistical analysis and hypothesis testing. They also represent real-life phenomena and can be used to make predictions about future events.

Can a set of numbers be considered normally distributed if it does not fit the exact mathematical definition?

Yes, a set of numbers can still be considered normally distributed if it is close enough to the mathematical definition. The 68-95-99.7 rule allows for some deviation from the exact equation, and statistical tests can be used to determine if a set of numbers is approximately normally distributed.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
191
  • Programming and Computer Science
Replies
1
Views
591
  • Set Theory, Logic, Probability, Statistics
Replies
25
Views
5K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
13
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
12
Views
2K
Replies
24
Views
2K
Back
Top