Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Let Y be a uniform random variable with 1 = 0 and 2 = 1. (a) Using R, generat

ID: 3297443 • Letter: 1

Question

1. Let Y be a uniform random variable with 1 = 0 and 2 = 1.

(a) Using R, generate 10,000 observations of Y . Find the following statistics for your 10,000 observa-
tions: minimum, maximum, mean and variance. For each statistic, give the theoretical value the

statistic should be approximately equal to. Then produce a probability histogram of the 10,000
observations. Turn this histogram in with your assignment. Describe the histogram in words.
(b) Take the 10,000 observations of Y from part (a) and calculate the following variable: u = 3 +
5y. Find the following statistics for your 10,000 observations of this new variable: minimum,
maximum, mean and variance. Then produce a probability histogram of the 10,000 observation
of this new variable. Turn in this histogram with your assignment. Describe the histogram in
words.
(c) Based on your answers to part (b), what distribution do you believe the random variable U =
3 + 5Y will have? Explain your answer.
(d) Using the distribution method, find the probability density function of the random variable U =
3 + 5Y . What distribution does the random variable U have?

Explanation / Answer

Here we have generated 10000 random samples from U(0,1) and we got sample statistics as below

a) minimum 0.0049

Maximum 0.9997

Mean 0.5011

Variance 0.08334

B) it can be noticed that u=3+5y has ranged between 3 to 8

Transforming y to u we get

Maximum 7.9997

Minimum 3.0049

Mean 5.5055

Variance 2.0088

C) u Is just a linear transformation of y so that u should have uniform distribution.

D) using distribution function technique we have to find distribution of u,

Note that F(y) = y, 0<y<1

So F(u) = P(U<u) =P(3+5y<u)=P(y<(u-3)/5)=F((u-3)/5)=(u-3)/5

Hence pdf is f(u) =1/5, 3<u<8

So this has uniform distribution.