R code with comments
get this
We can see that the Poisson and normal samples have similar sample means and sample variances for all the values of lambda.
However the minimum and maximum sample values are not similar.
3.b) R code with comments
get this graph
and get these
The normal approximation to Poisson distribution improves with the increase in value of lambda
The value of the R function "mean" applied to a vector $\mathbf{v}=(v_1,v_2,...v_n)$ is the arithmentic mean...
# 3. The following code draws a sample of size $n=30$ from a chi-square distribution with 15 degrees of freedom, and then puts $B=200$ bootstrap samples into a matrix M. After that, the 'apply' function is used to calculate the median of each bootstrap sample, giving a bootstrap sample of 200 medians. "{r} set.seed (117888) data=rchisq(30,15) M=matrix(rep(0,30*200), byrow=T, ncol=30) for (i in 1:200 M[i,]=sample(data, 30, replace=T) bootstrapmedians=apply(M,1,median) (3a) Use the 'var' command to calculate the variance of the bootstrapped medians....
Suppose x has a distribution with a mean of 40 and a standard deviation of 20. Random samples of size n = 64 are drawn. (a) Describe the x bar distribution. x bar has a normal distribution. x bar has a geometric distribution. x bar has an approximately normal distribution. x bar has a Poisson distribution. x bar has an unknown distribution. x bar has a binomial distribution. Compute the mean and standard deviation of the distribution. (For each answer,...
Suppose X is a random vector, where X = (X(1), . . . , x(d))T , d with mean 0 and covariance matrix vv1 , for some vector v ER 1point possible (graded) Let v = . (i.e., v is the normalized version of v). What is the variance of v X? (If applicable, enter trans(v) for the transpose v of v, and normv) for the norm |vll of a vector v.) Var (V STANDARD NOTATION SubmitYou have used 0...
R studio #Exercise : Calculate the following probabilities : #1. Probability that a normal random variable with mean 22 and variance 25 #(i)lies between 16.2 and 27.5 #(ii) is greater than 29 #(iii) is less than 17 #(iv)is less than 15 or greater than 25 #2.Probability that in 60 tosses of a fair coin the head comes up #(i) 20,25 or 30 times #(ii) less than 20 times #(iii) between 20 and 30 times #3.A random variable X has Poisson...
R commands 2) Illustrating the central limit theorem. X, X, X, a sequence of independent random variables with the same distribution as X. Define the sample mean X by X = A + A 2 be a random variable having the exponential distribution with A -2. Denote by -..- The central limit theorem applied to this particular case implices that the probability distribution of converges to the standard normal distribution for certain values of u and o (a) For what...
Suppose x has a distribution with a mean of 90 and a standard deviation of 3. Random samples of size n = 36 are drawn. (a) Describe the x distribution and compute the mean and standard deviation of the distribution. x has ---Select--- a normal a geometric an unknown a Poisson a binomial an approximately normal distribution with mean μx = and standard deviation σx = . (b) Find the z value corresponding to x = 91. z = (c) Find P(x...
4 and 5 samples, the other in small samples. Which is which? Explain. (d) Suppose we know that the 5 values are from a symmetric distribution. Then the sample median is also unbiased and consistent for the population mean. The sample mean has lower variance. Would you prefer to use the sample 4. Suppose Yi, Y, are iid r ables with E(n)-μ, Var(K)-σ2 < oo. For large n, find the approximate 5. Suppose we observe Yi...Yn from a normal distribution...
7. #4. 18 Following is a recursive function which takes as input (argument) a vector $x$ and returns a scalar. Either by looking carefully at the function, or by running the function with a few simple input vectors and observing the returned values in each case, determine what the function is doing. 29 00- "**{r} 01 - myfun=function(x){ 02 - if(length(x)=-1){return(x) C03 - } else 84 return(x[1]+my funcx[-1])) 205 - ) 206 myfun(c(1:1000)) #here's what happens when it is applied...
Problem 5. Given a vector space V, a bilinear form on V is a function f : V x V -->R satisfying the following four conditions: f(u, wf(ū, ) + f(7,i) for every u, õ, wE V. f(u,ū+ i) = f(u, u) + f(ū, w) for every ā, v, w E V. f(ku, kf (ū, v) for every ū, uE V and for every k E R f(u, ku) = kf(u, u) for every u,uE V and for every k...
Suppose x has a distribution with a mean of 70 and a standard deviation of 20. Random samples of size n = 64 are drawn. (a) Describe the distribution. x has a geometric distribution. has a normal distribution. x has an unknown distribution. x has a Poisson distribution. X has an approximately normal distribution. x has a binomial distribution. Compute the mean and standard deviation of the distribution. (For each answer, enter a number.) Hy = Oz = (b) Find...