Question

In: Statistics and Probability

Generate 200 random numbers using each of the following continuous distributions and plot the histograms (a)...

Generate 200 random numbers using each of the following continuous distributions and plot the histograms

(a) Uniform (use A = 3 and B = 7)

(b) Exponential (use population mean = 0.2)

(c) Gamma (use parameters 3 and 2)

(d) Normal (use µ = 2 and σ = 5)

Attach the histogram plots and reflect on what you observe. Hint: Use RAND() to generate uniform random numbers and use inverse CDF to generate random numbers for each distribution.

Solutions

Expert Solution

Table is generated using Excel formula

For Uniform distribution : Rand()*(B-A) + A

For Exponential distribution : -1*Average(Rand()) * ln(1-rand())

For Gamma distribution : Gamma.inv(rand(),alpha,beta)

For normal distribution : norm.inv(rand(),mean,sd)


a) Histogram of a uniform distribution :

b) Histogram of a exponential distribution :

c) Histogram of a Gamma distribution :

d) Histogram of a normal distribution :

Data table was deleted due to answer size limits : data was generated using the above formulas in excel


Related Solutions

Using Python, generate 100 random numbers ranging from 1 to 5, then plot them using matplotlib...
Using Python, generate 100 random numbers ranging from 1 to 5, then plot them using matplotlib or Seaborn as a histogram
In R, Draw 1000 samples from the following distributions and create histograms for each. Be sure...
In R, Draw 1000 samples from the following distributions and create histograms for each. Be sure to comment about each histogram. Remember all histograms should have four items addressed. (a) X ∼ N (0, 1) using rnorm function.   (b) X ∼ Gamma(2, 3) using the rgamma function. (c) X+Y where X ∼ N(5,2) and Y ∼ χ2(15). (d) X ∼ Binomial(1, 0.3). (e) Calculate a mean of a vector X = (X1, X2, ..., Xn ) 1000 times, where Xi...
Assume that Z  (6). Generate 1000 random numbers from Z and plot the corresponding histogram.
Assume that Z  (6). Generate 1000 random numbers from Z and plot the corresponding histogram.
Use Python to plot poisson process for time interval [0,50] that generate 50 random numbers.
Use Python to plot poisson process for time interval [0,50] that generate 50 random numbers.
Part 1: Using Excel’s Randbetween(0,9) function, generate 200 samples of five random numbers between 0 and...
Part 1: Using Excel’s Randbetween(0,9) function, generate 200 samples of five random numbers between 0 and 9, calculate the mean of each sample. Show me the list of the 200 means. Typically, they should look like: 4.8, 3.6, 4.4, 6.0, etc. Part 2: Using Excel, calculate the overall mean of the 200 sample means (the average of the averages). This should be around 4.5. Part 3:    Using Excel, calculate the standard error of the mean (SEM)  (i.e. the standard deviation of...
<<Using R code>> Set seed nuumber as 12345" every time you generate random numbers. For each...
<<Using R code>> Set seed nuumber as 12345" every time you generate random numbers. For each anser, use # to explain if necessary. 3. Use data "thusen" in ibrary ISwR" 3-1) Remove missing observations in the data, name this set as thu1, and print the first 6 and last 6 observations. 3-2) Rename a variable "short.velocity" -> "x", "blood.glucose" -> "y". 3-3) Draw a scatter plot for "y" by "x", give title "velocity vs.glucose". Put tick marks of x-axis at...
1)Using R, construct one plot of the density function for a uniformly distributed continuous random variable...
1)Using R, construct one plot of the density function for a uniformly distributed continuous random variable defined between 0 and 6. Make sure you include a main title, label both axis correctly and include a legend in your figure. The main title needs to include your last name, also include your R code with your answer. 2) Using R, construct one plot of the density function for a Chi-square distributed random variable. The plots should contain six lines corresponding to...
Write an Arduino code that does the following. Generate 50 random numbers between the numbers 100...
Write an Arduino code that does the following. Generate 50 random numbers between the numbers 100 and 300. Pick a number at random out of these 50 random variables. a. Determine the probability of the chosen number being greater than 200. This may be achieved by counting the numbers that are greater than 200 and dividing the count by 50. Make sure you, i.Formulate the appropriate if-conditions to check for a number being greater than 200 ii. Use a for-loop...
(Using R Scholar) For each of the distributions, begin by creating 1000 random samples, each of...
(Using R Scholar) For each of the distributions, begin by creating 1000 random samples, each of size ?. Then, for each of the 1000 samples, you will calculate the sample average, ?̅. After calculating 1000 different ?̅’s, you will be able to make a histogram and normal probability plot of the ?̅ values and thus visualize the distribution of ?̅. The goal is to see what value of ? is large enough for the distribution of ?̅ to become approximately...
Generate 1000 random numbers from ??3? starting with standard normal random numbers in R.
Generate 1000 random numbers from ??3? starting with standard normal random numbers in R.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT