Question 4 Let X have the normal distribution N(0, 1), and let Y = ex. (a) Find the support of Y. My answer:

A First Course in Probability (10th Edition)
10th Edition
ISBN:9780134753119
Author:Sheldon Ross
Publisher:Sheldon Ross
Chapter1: Combinatorial Analysis
Section: Chapter Questions
Problem 1.1P: a. How many different 7-place license plates are possible if the first 2 places are for letters and...
icon
Related questions
Question

all Q5 please

need R studio

 

(i)
BONUS QUESTION (optional: you will not loose mark if you do not answer this question, but will receive
extra mark(s) if you answwer correctly): How would you generate observations of the pair (X,Y)?
My answer:
Question 4
Let X have the normal distribution N(0, 1), and let Y = e*.
(a)
Find the support of Y.
My answer:
(b)
Find the pdf of Y using the change of variable technique. You should define four functions throughout the
process: f(x), v(y), v'(y), and the pdf of Y. Then plot the pdf of Y over (0,5].
(c)
Find the third moment of Y, E(Y³), in two different ways: (i) using the pdf of Y, and (ii) using the known
form of the mgf of a standard normal random variable.
Note: You cannot simply write xf(x) as the first argument of the integrate(...) function; instead you need to
define a new function as xf(x).
(d)
Compute P(Y > 1). What do you conclude about the median of Y?
My answer:
Question 5
Let X be a continuous random variable with the density function
2
1 < x < 2,
f(x) =
{
x²
0,
elsewhere.
(a)
Define a function that computes the kth moment of X for any k ≥ 1.
(b)
Use the function in (a) to obtain the variance of X.
(c)
Find the theoretical cdf of X, and explain how you could use it to simulate a realisation/observation from X.
My answer:
Transcribed Image Text:(i) BONUS QUESTION (optional: you will not loose mark if you do not answer this question, but will receive extra mark(s) if you answwer correctly): How would you generate observations of the pair (X,Y)? My answer: Question 4 Let X have the normal distribution N(0, 1), and let Y = e*. (a) Find the support of Y. My answer: (b) Find the pdf of Y using the change of variable technique. You should define four functions throughout the process: f(x), v(y), v'(y), and the pdf of Y. Then plot the pdf of Y over (0,5]. (c) Find the third moment of Y, E(Y³), in two different ways: (i) using the pdf of Y, and (ii) using the known form of the mgf of a standard normal random variable. Note: You cannot simply write xf(x) as the first argument of the integrate(...) function; instead you need to define a new function as xf(x). (d) Compute P(Y > 1). What do you conclude about the median of Y? My answer: Question 5 Let X be a continuous random variable with the density function 2 1 < x < 2, f(x) = { x² 0, elsewhere. (a) Define a function that computes the kth moment of X for any k ≥ 1. (b) Use the function in (a) to obtain the variance of X. (c) Find the theoretical cdf of X, and explain how you could use it to simulate a realisation/observation from X. My answer:
(d)
Generate a sample of 10000 observations from the distribution of X, and plot the corresponding histogram.
Compare the shape of the histogram with that of the density of X (try to superimpose them on the same
figure).
Question 6
Let X be a Gamma distribution with mean 8 and variance 16.
Let X1, X2, …, Xn be n independent random variables with the same distribution as X. Let Y₁ = Σï=1 Xi/n
be the sample mean.
(a)
Define a function which generates 10000 observations from Yn for any value of n.
My answer:
(b)
Plot the histogram of the generated observations from Yn for n = 1, n = 5, n = 25. What do you observe?
Can you compare Yɲ to a known distribution when n is large? Elaborate on your answer.
My answer:
(c)
Find an appropriate normal random variable which approximates Y25, and plot the histogram of the generated
observations from Y25 on the same graph as the density of that normal random variable for comparison.
My answer:
Question 7
Let N be the number of offspring of a female Seychelles warbler (a species of birds) during a one-year period.
One may assume that N has a Poisson distribution with mean 4.
Seychelles warblers are known to have an adaptive sex ratio bias: on high quality territories, females produce
90% daughters. Let X be the number of daughters of one female bird during a one-year period (on a high
quality territory).
(a)
What are the theoretical mean and variance of X?
My answer:
(b)
Conduct a two-step simulation analysis to verify these theoretical values by replacing the '#?' in the code
chunk with the appropriate commands (and remove the argument eval=FALSE before running the code or
knitting the file).
Transcribed Image Text:(d) Generate a sample of 10000 observations from the distribution of X, and plot the corresponding histogram. Compare the shape of the histogram with that of the density of X (try to superimpose them on the same figure). Question 6 Let X be a Gamma distribution with mean 8 and variance 16. Let X1, X2, …, Xn be n independent random variables with the same distribution as X. Let Y₁ = Σï=1 Xi/n be the sample mean. (a) Define a function which generates 10000 observations from Yn for any value of n. My answer: (b) Plot the histogram of the generated observations from Yn for n = 1, n = 5, n = 25. What do you observe? Can you compare Yɲ to a known distribution when n is large? Elaborate on your answer. My answer: (c) Find an appropriate normal random variable which approximates Y25, and plot the histogram of the generated observations from Y25 on the same graph as the density of that normal random variable for comparison. My answer: Question 7 Let N be the number of offspring of a female Seychelles warbler (a species of birds) during a one-year period. One may assume that N has a Poisson distribution with mean 4. Seychelles warblers are known to have an adaptive sex ratio bias: on high quality territories, females produce 90% daughters. Let X be the number of daughters of one female bird during a one-year period (on a high quality territory). (a) What are the theoretical mean and variance of X? My answer: (b) Conduct a two-step simulation analysis to verify these theoretical values by replacing the '#?' in the code chunk with the appropriate commands (and remove the argument eval=FALSE before running the code or knitting the file).
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer