# Thread: Normal distributions in Mathematica

1. Hello, I'm fairly new to programming and I have an upcoming due date for an assignment. I'm implementing a recursion based on normal (or Gaussian) variables. R is very useful here because it has a built-in function for generating normal distributions. The problem is, R seems to be way more difficult to work with than Mathematica (and there are fewer resources available), so I'd really rather do this in Mathematica. The trade-off is that in Mathematica I'd have to construct my own normal variables from scratch.

Is there any simple way for me to just generate a list of 500 normally distributed numbers and then just "copy and paste" this into Mathematica? Ideally I'd like to end up in Mathematica with 5 sets of 500 normally distributed numbers with each of the sets indexed by u_1, u_2, ..., u_500.  2.

3. Check the RandomReal function.  4. Originally Posted by oldfold Hello, I'm fairly new to programming and I have an upcoming due date for an assignment. I'm implementing a recursion based on normal (or Gaussian) variables. R is very useful here because it has a built-in function for generating normal distributions. The problem is, R seems to be way more difficult to work with than Mathematica (and there are fewer resources available), so I'd really rather do this in Mathematica. The trade-off is that in Mathematica I'd have to construct my own normal variables from scratch.

Is there any simple way for me to just generate a list of 500 normally distributed numbers and then just "copy and paste" this into Mathematica? Ideally I'd like to end up in Mathematica with 5 sets of 500 normally distributed numbers with each of the sets indexed by u_1, u_2, ..., u_500.
Box

The above describes a method to generate pairs of independent normal random variables, given pairs of random numbers.  5. Originally Posted by mathman Box

The above describes a method to generate pairs of independent normal random variables, given pairs of random numbers.
Okay that doesn't look too bad. Just two questions:

1. Can I just substitute every mention of U_1 and U_2 with "RandomReal[]"?

2.Do I use Z_0 or Z_1 for my recursion based on normal variables? Some combination of both? Should I just make sure that each of Z_0 and Z_1 is used an equal number of times as the input for my recursion?  6. Mathematica also has a NormalDistribution... distribution, so there's no need to use a transformation, and actually using the Box-Muller method would be a pain since it works on pairs at a time.  7. Originally Posted by MagiMaster Mathematica also has a NormalDistribution... distribution, so there's no need to use a transformation, and actually using the Box-Muller method would be a pain since it works on pairs at a time.
Wow, thank you so much. I thought I tried to look this up earlier but I think my using "Gaussian Distribution" as my key words rather than "Normal Distribution" had me doomed from the start of my search.  8. I'm surprised nothing came up as the two are synonymous.  Tags for this Thread
 mathematica, r language, recursions, statistics Bookmarks
 Posting Permissions
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts   BB code is On Smilies are On [IMG] code is On [VIDEO] code is On HTML code is Off Trackbacks are Off Pingbacks are Off Refbacks are On Terms of Use Agreement