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

  • Context: Undergrad 
  • Thread starter Thread starter Mark J.
  • Start date Start date
  • Tags Tags
    Distributed Numbers
Click For Summary

Discussion Overview

The discussion revolves around generating normally distributed integers using software like R and Matlab, specifically focusing on the conditions for inter-arrival times that are normally distributed. Participants explore the implications of rounding decimal values and the nature of normal distributions in relation to integer outputs.

Discussion Character

  • Exploratory
  • Debate/contested
  • Technical explanation

Main Points Raised

  • One participant seeks to generate normally distributed integers but questions the validity of normality after rounding decimal values.
  • Another participant asserts that a distribution limited to integers cannot be normal and asks for clarification on the intended outcome.
  • A participant clarifies the need for sample data representing inter-arrival times, suggesting that these should be normally distributed values that can be rounded to integers.
  • Concerns are raised about the implications of using a normal distribution for modeling arrivals, particularly the risk of generating negative values which would not be valid for inter-arrival times.
  • Further discussion includes the impact of standard deviation on the rounding process and how it affects the approximation of normality.

Areas of Agreement / Disagreement

Participants express differing views on the feasibility of generating normally distributed integers and the appropriateness of using a normal distribution for modeling inter-arrival times. The discussion remains unresolved with multiple competing perspectives.

Contextual Notes

Participants note the limitations of using a normal distribution for inter-arrival times, particularly regarding the generation of negative values and the implications of rounding on the distribution's characteristics.

Mark J.
Messages
81
Reaction score
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
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??
 
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?
 
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.
 
Can you please explain something more about?
Regards
 
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.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
1
Views
4K
  • · Replies 25 ·
Replies
25
Views
6K
  • · Replies 29 ·
Replies
29
Views
9K