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

Create an Excel spreadsheet that will generate random numbers based on the following probability distributions. You...
Create an Excel spreadsheet that will generate random numbers based on the following probability distributions. You can keep the answers to (a) (b) and (c) on the same spreadsheet. If I click on F9 key, the random numbers must be refreshed. a. Use Excel generic function to generate randomly 50 observations following a general discrete distribution described in the table below. To keep things compact, you don’t need to put the 50 random numbers down one column, instead put them...
Generate a sample of 1000 random floating numbers (from 0 to 1) using numpy. Then plot...
Generate a sample of 1000 random floating numbers (from 0 to 1) using numpy. Then plot it and compare with a normal distribution plot close to that region (from 0 to 1) as well. Hint: Using Seaborn module
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...
Generate a random list NUMBERS of size 100. Sort NUMBERS using QUICKSORT until the sublist has...
Generate a random list NUMBERS of size 100. Sort NUMBERS using QUICKSORT until the sublist has size 15 or less; then use INSERTIONSORT on the sublist.
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT