Skip to content

Instantly share code, notes, and snippets.

@koushikkhan
Created May 28, 2019 19:18
Show Gist options
  • Save koushikkhan/9cded47d515faa76dba48c651d7cebd2 to your computer and use it in GitHub Desktop.
Save koushikkhan/9cded47d515faa76dba48c651d7cebd2 to your computer and use it in GitHub Desktop.
# Usage of the class
# 1. create a new object of the class named `sm`
sm <- GaussianSimulator$new(mu=165, sigma=6.6, n_sample=1000)
# 2. generate a random sample
r <- sm$generate_sample()
# 3. compute basic ststistics of the sample
basic.stats <- sm$compute_stats()
# 4. create the histogram of the sample
p <- sm$plot_histogram(binwidth = 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment