Question

In: Statistics and Probability

A random sample of size 30 from an exponential distribution with mean 5 is simulated. Describe...

A random sample of size 30 from an exponential distribution with mean 5 is simulated.

Describe the process of plotting the empirical cdf for this sample along with the true cdf in the sample graph.

Solutions

Expert Solution

We have calculated pdf and cdf of exponential with mean 5,

for plotting steps

1)

we draw 30 samples from pdf

2)

then for these 30 samples we draw find CDF of those 30 corresponding samples,

3)

then we plot PDF and CDF on same graph taking x axis as 1:30

plot is

random samples are

Observation PDF CDF
1 5.446 0.664
2 4.31 0.578
3 2.646 0.411
4 9.489 0.85
5 9.636 0.854
6 6.771 0.742
7 2.227 0.359
8 9.852 0.861
9 2.997 0.451
10 0.017 0.003
11 0.595 0.112
12 1.538 0.265
13 6.73 0.74
14 9.365 0.846
15 4.489 0.593
16 2.948 0.445
17 1.57 0.269
18 1.894 0.315
19 3.394 0.493
20 1.215 0.216
21 1.311 0.231
22 5.001 0.632
23 4.177 0.566
24 1.373 0.24
25 2.462 0.389
26 9.11 0.838
27 5.547 0.67
28 2.945 0.445
29 5.338 0.656
30 6.285 0.716

Related Solutions

A random sample of size 30 from an exponential distribution with mean 5 is simulated. Show...
A random sample of size 30 from an exponential distribution with mean 5 is simulated. Show the R-code to plot the empirical cdf for this sample along with the true cdf in the sample graph.
1. (a) Simulate a random sample of size 100 from the exponential distribution with the rate...
1. (a) Simulate a random sample of size 100 from the exponential distribution with the rate parameter λ = 10. Then make a histogram of the simulated data. (b) We use the simulated data as a data set to construct the log-likelihood function as an R function. We will find the MEL of the value λ = 10. Choose the appropriate range for the parameter λ, then make a plot of the log-likelihood function. (c) Use R function ‘optim‘ to...
Let Y1, Y2, ..., Yn be a random sample from an exponential distribution with mean theta....
Let Y1, Y2, ..., Yn be a random sample from an exponential distribution with mean theta. We would like to test H0: theta = 3 against Ha: theta = 5 based on this random sample. (a) Find the form of the most powerful rejection region. (b) Suppose n = 12. Find the MP rejection region of level 0.1. (c) Is the rejection region in (b) the uniformly most powerful rejection region of level 0.1 for testing H0: theta = 3...
e. Suppose a random sample of size 100 is taken from a distribution with mean 200...
e. Suppose a random sample of size 100 is taken from a distribution with mean 200 and variance 400. What is the distribution of the sample mean ?%? (State the name and parameter(s) of the distribution) f. For a medical test, the probability of testing positive for a healthy person is 5%. Based on this, can we find the probability of testing positive for an infected person? If yes, explain how; if no, explain why.
Let X1, ..., Xn be a random sample of size n from an exponential ditribution with...
Let X1, ..., Xn be a random sample of size n from an exponential ditribution with parameter lambda . Let Di=(n-i+1)[X(i)-X(i-1)] i=1,.... n , where X(0)=0 be the normalized spacings. Using Jacobians, derive the joint distribution of D1,....., Dn.
Suppose X is an exponential random variable with mean 5 and Y is an exponential random...
Suppose X is an exponential random variable with mean 5 and Y is an exponential random variable with mean 10. X and Y are independent. Determine the coefficient of variation of X + Y
Let X be the mean of a random sample of size n from a N(μ,9) distribution....
Let X be the mean of a random sample of size n from a N(μ,9) distribution. a. Find n so that X −1< μ < X +1 is a confidence interval estimate of μ with a confidence level of at least 90%. b.Find n so that X−e < μ < X+e is a confidence interval estimate of μ withaconfidence levelofatleast (1−α)⋅100%.
This is the code for the LLN question iid random variable from exponential distribution with mean...
This is the code for the LLN question iid random variable from exponential distribution with mean beta. Beta is fixed 1 for illustration. # Testing LLN plot.ybar <- function(n, m = 1e5, beta = 1) { Ybars <- rep(0,m) for(i in 1:m) { Y.sample <- rexp(n,1/beta) Ybars[i] <- mean(Y.sample) }    p <- hist(Ybars, xlim=c(0,4), freq=F,main = paste("Distribution of Ybar when n=",n, sep="")) } par(mfrow = c(2,2)) for (n in c(2, 10, 50, 200)) { plot.ybar(n) } Using similar code...
In R, get a sample of size n=5 from the Cauchy distribution and calculate its mean....
In R, get a sample of size n=5 from the Cauchy distribution and calculate its mean. (mean(rcauchy(5)). Repeat this 1000 times and plot the histogram of the resulting 1000 means. Please show your R codes. n <- 5 listofmeans <- c() for(i in 1:1000){ }listofmeans <- c(listofmeans, mean(rcauchy(n))) hist(listofmeans) Create other histograms, changing the value of n to 10, 30, 100, and 500. Comment on what these graphs show in light of the Central Limit Theorem.
A random sample of size 9 from a distribution of ?(?, 36) yielded ?̅ = 40....
A random sample of size 9 from a distribution of ?(?, 36) yielded ?̅ = 40. Find the confidence intervals for ? a. 99% b. 97.5% c. 95% d. 90%
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT