Question

In: Statistics and Probability

Write a R script that calculates the mean and variance of two random variables X~F(m=2,n=5) and...

Write a R script that calculates the mean and variance of two random variables

X~F(m=2,n=5) and Y~F(m=10,n=5) from their density functions.

Solutions

Expert Solution

X~ F(m,n)

mean(x) = ;n >2

var(x) = for n > 4

----------------------------------------------------------------------------------------------------------------------

We can calculate mean and variance using R software for that we need to generate random number from F distribution.

R-script

set.seed(1234)
#x ~f(m=2,n=5)
x=rf(1000,2,5) # Generate random sample from F(2,5)
mean(x)
var(x)

# x1~ f(m=10,n=5)
set.seed(12345)
x1=rf(10000,10,5) # Generate random sample from F(10,5)
mean(x1)
var(x1)

Output-

Answer -

If X ~ F(m=2,n=5)

then ,

mean= 1.6

var= 8.2

If X~F(m=10,n=5)

mean=1.6

var=4.8

Note : some variation may come in mean and variance because we have done calculation using random sample .

----------------------------------------------------------------------------------------------------------------------------------------------------

Dear student,
I am waiting for your feedback. I have given my 100% to solve your queries. If you are satisfied by my given answer. Can you please help me out by giving thumbs up.
  
Thank You!


Related Solutions

Let X; be n IID U(0, 1) random variables. What are the mean and variance of...
Let X; be n IID U(0, 1) random variables. What are the mean and variance of the minimum-order and maximum-order statistics? PLEASE SHOW ALL WORK AND FORMULAS USED
Suppose that X and Y are two normally distributed random variables. X has mean 2 and...
Suppose that X and Y are two normally distributed random variables. X has mean 2 and standard deviation 3.Y has mean 3 and standard deviation 2. Their correlation is 0.6 . What is the mean and standard deviation of X + Y ?What is the distribution of X + Y ? What if X and Y are jointly normally distributed? What if they are not jointly normally distributed? Explain your answer.
Suppose that X and Y are two normally distributed random variables. X has mean 2 and...
Suppose that X and Y are two normally distributed random variables. X has mean 2 and standard deviation 3.Y has mean 3 and standard deviation 2. Their correlation is 0.6 . What is the mean and standard deviation of X + Y? What is the distribution of X + Y? What if X and Y are jointly normally distributed? What if they are not jointly normally distributed? Explain your answer. (Why we cannot conclude if they are not jointly normally...
Suppose that f(x)=x^n+a_(n-1) x^(n-1)+⋯+a_0∈Z[x]. If r is rational and x-r divides f(x), prove that r is...
Suppose that f(x)=x^n+a_(n-1) x^(n-1)+⋯+a_0∈Z[x]. If r is rational and x-r divides f(x), prove that r is an integer.
5. (a) Let f : R \ {−1} → R, f(x) = x+1. Show that f...
5. (a) Let f : R \ {−1} → R, f(x) = x+1. Show that f is injective, but not surjective. (b) Suppose g : R\{−1} → R\{a} is a function such that g(x) = x−1, where a ∈ R. Determine x+1 a, show that g is bijective and determine its inverse function.
Let X, Y, and Z independent random variables with variance 4 and mean 1. Find the...
Let X, Y, and Z independent random variables with variance 4 and mean 1. Find the correlation coefficient between (X-2YX+1) and (4X+Y)
Let X and Y be two jointly continuous random variables with joint PDF f(x,y) = Mxy^2...
Let X and Y be two jointly continuous random variables with joint PDF f(x,y) = Mxy^2 0<x<y<1 a) Find M = ? b) Find the marginal probability densities. c) P( y> 1/2 | x = .25) = ? d) Corr (x,y) = ?
Suppose X and Y are two independent random variables with X~N(1,4) and Y~N(4,6). a. P(X <...
Suppose X and Y are two independent random variables with X~N(1,4) and Y~N(4,6). a. P(X < -1.5). b. P(0.5Y+1 > 5). c. P(-2 < X + Y < 5). d. P(X – Y ≥ 3).
Let X and Y be two independent random variables, and g : R2 --> R an...
Let X and Y be two independent random variables, and g : R2 --> R an arbitrary bivariate function. 1) Suppose that X and Y are continuous with densities fX and fY . Prove that for any y ? R withfY (y) > 0, the conditional density of the random variable Z = g(X, Y ) given Y = y is the same as the density of the random variable W = g(X, y). 2) Suppose that X and Y...
1. Which of these are random variables: Population mean, sample mean, population variance, sample variance, population...
1. Which of these are random variables: Population mean, sample mean, population variance, sample variance, population standard deviation, sample standard deviation, population range, sample range 2. Does variance matter? I have two routes to my work. Travel time on the first route takes me on average 20 minutes, and the second route 19 minutes. The standard deviation of travel time on the first route is 1.5 minutes, on the second is 5 minutes. Which route should I take?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT