Created
July 15, 2012 14:53
-
-
Save benjic/3117281 to your computer and use it in GitHub Desktop.
Random Normal Distribution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#First and foremost, we must have data. We see that there is a variable named RandomData and the asingment operation <- is assigning the value of rnorm(). rnorm(n) is a funciton which returns a vector of n values which lie within one standard deviation of the mean of 0. | |
RandomData <- rnorm(10000) | |
#hist displays a histogram of the vector of values. | |
hist(RandomData, col="blue") | |
#mean() computes the mean of the vector of values. | |
mean(RandomData) | |
#sd() computes the standard deviation of the vector of values. | |
sd(RandomData) | |
#summary() generates a table of all quartiles and max and min values. | |
summary(RandomData) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment