


R Programs
#a)
f=function(n,nu,sigma)
{
for(i in 1:n)
{
u=runif(1,0,1)
v=runif(1,0,1)
x=sqrt(-2*log(u))*sin(2*pi*v)
y=sqrt(-2*log(u))*cos(2*pi*v)
print(x)
}
}
#b)
f=function(n,p)
{
lambda=-log(1-p)
for(i in 1:n)
{
u=rexp(1,rate=lambda)
x=trunc(u)
print(x)
}
}
4 a) Prove that the Box-Muller method described in class generates independent standard ll generate n...
Prove that Box-Muller method described in class generates
independent standard normal random variables.
4 a) Prove that the Box-Muller method described in class generates independent standard ll generate n to write a function which wi σ-) random variables b) Suppose that X is an exponential random variable with rate parameter λ and that Y is the integer part of X. Show that Y has a geometric distribution and use this result to give an algorithm to generate a random sample...
4. Let X and Y be independent standard normal random variables. The pair (X,Y) can be described in polar coordinates in terms of random variables R 2 0 and 0 e [0,27], so that X = R cos θ, Y = R sin θ. (a) (10 points) Show that θ is uniformly distributed in [0,2 and that R and 0 are independent. (b) (IO points) Show that R2 has an exponential distribution with parameter 1/2. , that R has the...
(1 point) In Unit 3, I claimed that the sum of independent, identically distributed exponential random variables is a gamma random variable. Now that we know about moment generating functions, we can prove it. Let X be exponential with mean A 4. The density is 4 a) Find the moment generating function of X, and evaluate at t 3.9 The mgf of a gamma is more tedious to find, so l'll give it to you here. Let W Gamma(n, A...
please help me! Thanks in advance :)
5. Let N be a Poisson random variable with parameter λ Suppose ξ1S2, is a sequence of 1.1.d. random variables with mean μ and variance σ2, independent of N. Let SN-ξι 5N. Determi ne the me an and variance of Sw. 6. Let X, Y be independent random variables, each having Exponential(A) distribution. What is the conditional density function of X given that Z =
python coding please
1.2 Sum of the Independent Random Variables Consider a set of 'n random variables XI,Xy . . . Х,, . Let's define the random variable Y as the stinmation of all X, variables: A) For the case m 10 and Xis being independent uniform variables in the interval -0.5,0.5, generate 100,000 samples of Y. Use the discretization technique from the previous section for the [-5,5 interval and plot the pmf of Y B) Now increase m to...
Practice problems using various statistical methods
If n independent random variables X have normal distributions with means μ and the standard deviations σ , then determine the distribution of a. I. X-E(X) var(X) C. 2. If n independent random variables Xi have normal distributions with means μί and the standard deviations σί, then determine the distribution of a. b. Y -a1X1 + a2X2+ + anXn (ai constant) X-E(X) Vvar(X) 3. What is CLT? Proof briefly? What are t-, Chi-squared- and...
4. Let Xi,X2, , Xn be n i.id. exponential random variables with parameter λ > Let X(i) < X(2) < < X(n) be their order statistics. Define Yǐ = nX(1) and Ya = (n +1 - k)(Xh) Xk-n) for 1 < k Sn. Find the joint probability density function of y, . . . , h. Are they independent? 15In
Part 2. Random Variables 4. Two independent random variables Xand y are given with their distribution laws 0.3 0.7 0.8 0.2 Pi Find the distribution law and variance for the random variable V-3XY 5. There are 7 white balls and 3 red balls in a box. Balls are taken from the box without return at randomm until one white ball is taken. Construct the distribution law for the number of taken balls. 6. Let X be a continuous random variable...
5. Three boxes are numbered 1, 2 and 3. For k 1, 2, 3, box k contains k blue marbles and 5 - k red marbles. In a two-step experiment, a box is selected and 2 marbles are drawn from it without replacement. If the probability of selecting box k is proportional to k, then the probability that two marbles drawn have different colours is 6. Two balls are.dropped in such a way that each ball is equally likely to...
1. Suppose that Xi,..,Xn are independent Exponential random variables with density f(x; λ) λ exp(-1x) for x > 0 where λ > 0 is an unknown parameter (a) Show that the τ quantile of the Exponential distribution is F-1 (r)--X1 In(1-7) and give an approximation to Var(X(k)) for k/n-T. What happens to this variance as τ moves from 0 to 1? (b) The form of the quantile function in part (a) can be used to give a quantile-quantile (QQ) plot...