Generate a population of size N= 10000 from an exponential distribution with mean θ= 10.
a. Generate 1000 samples of sizen= 200 from the population and plot the density of the sample means.
b. Generate a single sample of sizen= 200. Resample with sizen= 200 with replacement fromthis single sample 1000 times. Plot the density of the resample means.
c. Comment on the two densities you have plotted
I will use R to answer this question.
Following is the R code.
#########################
set.seed(122337)
pop=rexp(10000,rate=1/10)
######a
means=array(dim=1)
for(i in 1:1000)
{
samp=sample(size=200,x=pop,replace=TRUE)
means[i]=mean(samp)
}
######b
samp1=sample(size=200,x=pop,replace=TRUE)
means_re=array(dim=1)
for(i in 1:1000)
{
samp=sample(x=samp1,size=200,replace=TRUE)
means_re[i]=mean(samp)
}
par(mfrow=c(2,1))
hist(means,freq=FALSE)
hist(means_re,freq=FALSE)
###########
Running the whole code, we can se that both are giving good estimates of the Exponential densities sample means. However, the resampled mean is a bit deviated from the value of 10
Generate a population of size N= 10000 from an exponential distribution with mean θ= 10. a....
List all possible samples of size n=3, with replacement, from the population (1,3,5). Calculate the mean of each sample. Construct a probability distribution of the sample means and compute the mean, variance, and standard deviation of the sample means and compare to the mean, variance, and standard deviation of the population.
Using R programming language, supply the code for: Generate a random sample of size 10, 000 from gamma distribution with scale parameter equal to 1 and shape parameter equal to 2, and form it into a 1000 x 10 matrix. Use the apply() function on this matrix to compute the means of the 1000 rows. Note that the resulting vector comprises the mean of 1000 random samples of size 10 from the above distribution. Examine the distribution of the sample...
Using R,
Exercise 4 (CLT Simulation) For this exercise we will simulate from the exponential distribution. If a random variable X has an exponential distribution with rate parameter A, the pdf of X can be written for z 2 0 Also recall, (a) This exercise relies heavily on generating random observations. To make this reproducible we will set a seed for the randomization. Alter the following code to make birthday store your birthday in the format yyyymmdd. For example, William...
Generate 20 samples of size n = 30 from your population. To do this: i. Generating a sample of just size n = 30. Calculate the sample mean, X¯, for this sample. Record this value somewhere in your spreadsheet (you will need it later). ii. Repeat the previous step 19 more times, so that you end up with a spreadsheet with 20 columns, each column has 30 randomly generated values from your population, and you have calculated a sample mean...
If selecting samples of size n≤30 from a population with a known mean and standard deviation, what requirement, if any, must be satisfied in order to assume that the distribution of the sample means is a normal distribution? A) The population must have a normal distribution. B) The population must have a mean of 1. C) The population must have a standard deviation of 1. D) None; the distribution of sample means will be approximately normal.
A large population has a mean of 400, a standard deviation of 50, and is skewed right. For samples of size n=100 obtained from this population, the sampling distribution of the sample means has mean fe and standard deviation 0. Which of the following sets of graphs correctly display the population distribution and the sampling distribution of the sample means of size 100? Please note that the x-axis values differ within and across the options. A) Population Distribution Sampling Distribution...
For random samples of size n = 16 selected from a normal distribution with a mean of 75 and a standard deviation of 20, find each of the following: a. The range of sample means that defines the middle 95% of the distribution of sample means b. The range of sample means that defines the middle 99% of the distribution of sample means
mathematical statistic
5.4.11 Generate a sample of 1000 from an N (3, 2) distribution. (a) Calculate Fx for this sample. 280 Section 5.4: Data Collection (b) Plot a density histogram based on these data using the intervals of length 1 over the range (-5, 10). (c) Plot a density histogram based on these data using the intervals of length 0.1 over the range (-5,10) d) Comment on the difference in the look of the histograms in parts (b) and (c)....
USING MATLAB PLEASE PROVIDE THE CODE. THANK YOU
1s an exponential random variable with rate parameter 2. 1. Assume (1) Generate 1000 samples from this exponential distribution using inverse transform method (2) Compare the histogram of your samples with the true density of Y
1s an exponential random variable with rate parameter 2. 1. Assume (1) Generate 1000 samples from this exponential distribution using inverse transform method (2) Compare the histogram of your samples with the true density of Y
Show that the mean X bar of a random sample of size n from a distribution having probability density function f(x;θ)=(1/θ)e-(x/θ) , ,0 < x < ∞ , 0 < θ < ∞ , zero elsewhere, is an unbiased estimator of θ and has variance θ2/n.