Use R statistical software to answer the following:
Let X1, ..., X6 be a random sample...
Use R statistical software to answer the following:
Let X1, ..., X6 be a random sample of size n = 6 from the
distribution with pdf
f(x) = x / 8 , 0 < x < 4 and 0 otherwise.
(a) Use Monte Carlo to calculate Var(Xbar), and knowing that
Var(Xbar) = sigma^2 / n, what is the true value of Var(Xbar)?
## use runif() to generate samples
use R software
Suppose that X1, …, Xn
are a random sample from a lognormal distribution....
use R software
Suppose that X1, …, Xn
are a random sample from a lognormal distribution. Construct a 95%
confidence interval for the parameter μ. Use a Monte Carlo
method to obtain an empirical estimate of the confidence level when
data is generated from standard lognormal.
Use R to code a function to generate a random sample of size n
from the...
Use R to code a function to generate a random sample of size n
from the Beta(a, b) distribution by the acceptance-rejection
method.
(1) Generate a random sample of size 3000 from the Beta(4,3)
distribution.
(2) Graph the histogram of the sample with the theoretical
Beta(4,3) density superimposed.
Answer the above questions by showing the R codes and
results.
Randomly generate 100 numbers in Excel. These numbers are
supposed to be from a normal distribution...
Randomly generate 100 numbers in Excel. These numbers are
supposed to be from a normal distribution with mean equal to 1 and
standard deviation equal to 5. Use Excel to do the Normality Check.
Compare the estimated mean and standard deviation to the actual
value (i.e., 1 and 5). Use Monte Carlo Analysis in Excel to
estimate the value of π. Choose N= 100, 1000, and 10000 and compare
the results.
i.Bias of Sample Mean Draw 20 samples from the normal
distribution N(5, 4). Compute the mean...
i.Bias of Sample Mean Draw 20 samples from the normal
distribution N(5, 4). Compute the mean of your 20 samples. Report
the bias of the sample mean
ii. Variance of Sample Mean (Continue of problem i) To estimate
the variance of the sample mean, we need to draw many different
samples of size 20. Now, we draw 1000 times a sample of size 20.
Store all the 1000 sample means. Report the variance of the
estimated sample mean. Hint: To...
2) Airline accidents: According to the U.S. National
Transportation Safety Board, the number of airline accidents...
2) Airline accidents: According to the U.S. National
Transportation Safety Board, the number of airline accidents by
year from 1983 to 2006 were 23, 16, 21, 24, 34, 30, 28, 24, 26, 18,
23, 23, 36, 37, 49, 50, 51, 56, 46, 41, 54, 30, 40, and 31.
a. For the sample data, compute the mean and its standard error
(from the standard deviation), and the median.
b. Using R, compute bootstrap estimates of the mean, median and
25% trimmed...
How to do the following in R:
Write a function to generate a random sample of...
How to do the following in R:
Write a function to generate a random sample of size n from the
Gamma(α,1) distribution by the
acceptance-rejection method. Generate a random sample of size 1000
from the Gamma(3,1) distribution. (Hint: you may use g(x) ∼
Exp(λ = 1/α) as your proposal distribution, where λ is the
rate parameter. Figure out the appropriate constant c).
How to do the following in R:
Write a function to generate a random sample of...
How to do the following in R:
Write a function to generate a random sample of size n from the
Gamma(α,1) distribution by the acceptance-rejection method.
Generate a random sample of size 1000 from the Gamma(3,1)
distribution. (Hint: you may use g(x) ∼ Exp(λ = 1/α) as your
proposal distribution, where λ is the rate parameter. Figure out
the appropriate constant c).
Use R and the RANDBETWEEN(1,300) function to generate: a) 100
random numbers, b) 100 samples of...
Use R and the RANDBETWEEN(1,300) function to generate: a) 100
random numbers, b) 100 samples of size 5, and c) 100 samples of
size 20. For each sample in parts (b) and (c), find the sample
means. Create histograms for parts (a), (b) and (c). For part (a)
use the random numbers (i.e. sample size 1), for parts (b) and (c)
use the sample means to create the histograms. Copy and Paste just
the histograms into your homework paper. Explain...