Please answer this question with RStudio.

R code with comments (all statements starting with # are comments)
#set the parameters of gamma distribution
k<-2
theta<-3
#part a)
#set the values of x
x<-seq(0,20,length=100)
#get the density of x
p<-dgamma(x,shape=k,scale=theta)
#plot
plot(x,p,type="l",ylab="density",main=bquote("Density of gamma
distribution with k=2,"*theta*"=3"))
#get this plot

b) The expected value (true mean) of X is
the variance of X is
#part b)
#expected value is
mu<-k*theta
sigma2<-k*theta^2
sprintf('The true mean of X is %.4f',mu)
sprintf('The true variance of X is %.4f',sigma2)
#get this poutput
![> 3printf (The true mean of X 13·4f,mu) [1] The true mean of X is 6.0000 > sprintf (The true variance f X is % .4 f, sigma2 ) [1] The true variance of X is 18.0000](http://img.homeworklib.com/questions/6ca650e0-70f2-11ea-a2aa-31c6eecee237.png?x-oss-process=image/resize,w_560)
c) Each sample of size 12 is a draw from Gamma distribution and they are different.
Since s are random
variables, the sum
is also a random variable.
If we divide this sum by n, the average that we get of these
s
is also random.
Hence
is a random variable.
d) the true mean of is
The true variance of is
The true standard deviation of is
R code
#part d)
#set the sample size
n<-12
#get the true mean of sample mean
muxbar<-mu
#get the true variance of sample mean
sigma2xbar<-sigma2/n
#get the true standard deviation of sample mean
sigmaxbar<-sqrt(sigma2xbar)
sprintf('The true mean of sample mean is %.4f',muxbar)
sprintf('The true variance of sample mean is
%.4f',sigma2xbar)
sprintf('The true standard deviation of sample mean is
%.4f',sigmaxbar)
#get this output

e) R code
#part e)
#set the random seed
set.seed(123)
#set the sample size
n<-12
#set the number of repetition
r<-10000
#intialize the variable to store the z values
z<-numeric(r)
for (i in 1:r) {
x<-rgamma(n,shape=k,scale=theta)
#get the sample mean m
m<-mean(x)
#calculate the test statistics
z[i]<-(m-6)/sigmaxbar
}
#plot the histogram of z
hist(z,breaks=50,freq=FALSE,xlab="Test statistics
(z)",main="Histogram of the test statistics")
#add dnorm
curve(dnorm(x),from=min(z),to=max(z),add=TRUE,col="red")
#get this plot

The distribution of the test statistics is reasonably well approximated by a normal distribution.
f) Using sample standard deviation
#part f)
#set the random seed
set.seed(123)
#set the sample size
n<-12
#set the number of repeatition
r<-10000
#intialize the variable to store the z values
t<-numeric(r)
for (i in 1:r) {
x<-rgamma(n,shape=k,scale=theta)
#get the sample mean m
m<-mean(x)
#get the sample standard deviation
s<-sd(x)
#calculate the test statistics
t[i]<-(m-6)/(s/sqrt(n))
}
#plot the histogram of t
hist(t,breaks=50,freq=FALSE,xlab="Test statistics
(t)",main="Histogram of the test statistics",ylim=c(0,0.4))
#add dnorm
curve(dnorm(x),from=min(t),to=max(t),add=TRUE,col="red")
#add dt
curve(dt(x,df=n-1),from=min(t),to=max(t),add=TRUE,col="blue")
legend("topleft",c("test statistics","standard normal","standard
t"),lty=1,col=c("black","red","blue"))
#get this plot

t distribution with its thicket tail seems to be a better fit than standard normal, particularly for the left tail.
Please answer this question with RStudio. 4. In this problem, you will illustrate the idea of...
please answer correctly and answer all questions.. this is
revision question...
7. Which of the following is BEST graphical method for describing categorical data? A. Bar chart B. Histogram C.Box-plot D. Pareto chart 8. Which of the following is NOT property of the variance? A. It measures the amount of spread or variability of observation from mean B. Standard deviation is square root of variance C. Normally used for describing measure of dispersion during reporting research data D. It is...
3. Testing a population mean The test statistic (Chapter 11) Aa Aa You conduct a hypothesis test about a population mean u with the following null and alternative hypotheses: Ho: u-25.8 H1: <25.8 Suppose that the population standard deviation has a known value of a observations, which provides a sample mean of % 30.7. 17.8. You obtain a sample of n =62 Since the sample size large enough, you assume that the sample mean X follows a normal distribution. Let...
please answer correctly and answer all question..
this is revision question.. thanks..
21. Which of the following is FALSE regarding ANOVA test? A. The Kruskal-Wallis test is the non-parametric equivalent for one-way ANOVA test B. The independent variable in one-way ANOVA test should be a categorical variable The dependent variable in one-way ANOVA test should be a numerical variable (D.Doe-way ANOVA test cannot be applied to compare two means (comparison of two groups) 22. Which of the following is FALSE...
Please answer both 1 & 2. 1. Use Excel to generate 100 observations from the standard Normal distribution. a.Make a histogram of these observations. How does the shape of this histogram compare with a Normal density curve? 2. Use Excel to generate 100 Normally distributed random values (that is 100 outcomes of a Normally distributed random variable with mean 10 and standard deviation of 5). a. Make a histogram for your data. How does the shape of this histogram compare...
Univariate Gaussians or normal distributions have a simple representation in that they can be completely described by their mean and variance. These distributions are particularly useful because of the central limit theorem, which posits that when a large number of independent random variables are added, the distribution of their sum is approximated by a normal distribution. In other words, normal distributions can be applied to most problems Recall the probability density function of the Univariate Gaussian with mean and variance...
Gelman's (2006) paper on noninformative prior distributions for variance parameters has attracted over 3,100 citations (Google scholar). The Half-t distribution introduced in that paper is now considered the "default" prior to use for any standard deviation parameter. a) Show that if σ 2 is generated from the following hierarchical model. λ= 1/A"), a ~ Inv-Gamma(α=1/2, then the (positive) square root σ has a marginal Half-t(v, A) distribution with density Here, the "scale" A > 0 and "degrees-of-freedom" v > 0...
Please use html format!
II. The goal of this problem is to simulate the distribution of the sample mean. We will use the buit load the dataset and avoid some problems, copy and paste the following command in dataset 1ynx. To lynx as.numeric(lynx) Assume this vector represents the population. Le, the mean of this vector is our "true mean" (a) Draw a histogram of the population, find the "true" mean, and the true" variance. Does this data look normally distributed?...
A mixture of pulverized fuel ash and Portland cement to be used for grouting should have a compressive strength of more than 1300 KN/m2. The mixture will not be used unless experimental evidence indicates conclusively that the strength specification has been met. Suppose compressive strength for specimens of this mixture is normally distributed with σ-60. Let μ denote the true average compressive strength (a) What are the appropriate null and alternative hypotheses? Ho: μ < 1300 Hai μ-1300 Hu: μ-1300...
Gelman's (2006) paper on noninformative prior distributions for variance parameters has attracted over 3,100 citations (Google scholar). The Half-t distribution introduced in that paper is now considered the "default" prior to use for any standard deviation parameter a) Show that if σ2 is generated from the following hierarchical model, a ~ Inv-Gamma(α-1/2, λ-1/A2), then the (positive) square root σ has a marginal Half-t(v, A) distribution with density Here, the "scale" A > 0 and "degrees-of-freedom" v > 0 are fixed...
A mixture of pulverized fuel ash and Portland cement to be used for grouting should have a compressive strength of more than 1300 KN/m2. The mixture will not be used unless experimental evidence indicates conclusively that the strength specification has been met. Suppose compressive strength for specimens of this mixture is normally distributed with σ-70. Let μ denote the true average compressive strength. a) What are the a null and altenative hypotheses? Ho: 1300 на: #1300 Ho:> 1300 hja: μ-1300...